From 33cfbd08fd1ec4b323a218197e90b3e10c396065 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:34:44 +0000 Subject: [PATCH 1/2] [adyen-sdk-automation] automated changes --- src/Adyen/Model/BinLookup/Amount.php | 4 +- .../Model/BinLookup/ObjectSerializer.php | 6 +- src/Adyen/Model/BinLookup/Recurring.php | 6 +- src/Adyen/Model/Checkout/AchDetails.php | 31 + .../Model/Checkout/AdditionalDataLevel23.php | 4 +- .../Checkout/AdditionalDataSubMerchant.php | 2 +- src/Adyen/Model/Checkout/AffirmDetails.php | 31 + src/Adyen/Model/Checkout/AfterpayDetails.php | 31 + src/Adyen/Model/Checkout/AmazonPayDetails.php | 31 + src/Adyen/Model/Checkout/Amount.php | 4 +- src/Adyen/Model/Checkout/AncvDetails.php | 31 + .../Model/Checkout/AndroidPayDetails.php | 31 + src/Adyen/Model/Checkout/ApplePayDetails.php | 33 + .../Model/Checkout/ApplePayDonations.php | 33 + .../Model/Checkout/BacsDirectDebitDetails.php | 31 + .../Model/Checkout/BalanceCheckRequest.php | 2 +- src/Adyen/Model/Checkout/BillDeskDetails.php | 31 + src/Adyen/Model/Checkout/BlikDetails.php | 31 + src/Adyen/Model/Checkout/CardDetails.php | 95 ++ .../Model/Checkout/CardDetailsRequest.php | 7 +- src/Adyen/Model/Checkout/CardDonations.php | 95 ++ src/Adyen/Model/Checkout/CashAppDetails.php | 31 + src/Adyen/Model/Checkout/CellulantDetails.php | 31 + .../Checkout/CheckoutBankTransferAction.php | 62 + .../Model/Checkout/CheckoutForwardRequest.php | 633 +++++++++++ .../Checkout/CheckoutForwardRequestCard.php | 714 ++++++++++++ .../CheckoutForwardRequestOptions.php | 528 +++++++++ .../Checkout/CheckoutForwardResponse.php | 500 ++++++++ .../CheckoutForwardResponseFromUrl.php | 466 ++++++++ .../Checkout/CheckoutNetworkTokenOption.php | 435 +++++++ .../CheckoutOutgoingForwardRequest.php | 569 ++++++++++ .../Model/Checkout/CheckoutPaymentMethod.php | 144 ++- .../Checkout/CreateCheckoutSessionRequest.php | 6 +- .../CreateCheckoutSessionResponse.php | 6 +- src/Adyen/Model/Checkout/Destination.php | 466 ++++++++ src/Adyen/Model/Checkout/DokuDetails.php | 31 + .../Model/Checkout/DonationPaymentMethod.php | 95 +- .../Model/Checkout/DonationPaymentRequest.php | 13 +- src/Adyen/Model/Checkout/DragonpayDetails.php | 31 + .../Model/Checkout/EBankingFinlandDetails.php | 31 + .../Model/Checkout/EcontextVoucherDetails.php | 31 + src/Adyen/Model/Checkout/EftDetails.php | 31 + .../Model/Checkout/EnhancedSchemeData.php | 43 +- .../Model/Checkout/ExternalTokenDetails.php | 692 ++++++++++++ src/Adyen/Model/Checkout/FastlaneDetails.php | 31 + .../GenericIssuerPaymentMethodDetails.php | 33 + src/Adyen/Model/Checkout/GooglePayDetails.php | 33 + .../Model/Checkout/GooglePayDonations.php | 33 + src/Adyen/Model/Checkout/IdealDetails.php | 31 + src/Adyen/Model/Checkout/IdealDonations.php | 31 + src/Adyen/Model/Checkout/ItemDetailLine.php | 621 ++++++++++ src/Adyen/Model/Checkout/KlarnaDetails.php | 31 + src/Adyen/Model/Checkout/LevelTwoThree.php | 621 ++++++++++ src/Adyen/Model/Checkout/LineItem.php | 8 +- .../Model/Checkout/MasterpassDetails.php | 33 + src/Adyen/Model/Checkout/MbwayDetails.php | 35 +- src/Adyen/Model/Checkout/MobilePayDetails.php | 31 + src/Adyen/Model/Checkout/MolPayDetails.php | 31 + src/Adyen/Model/Checkout/ObjectSerializer.php | 6 +- .../Model/Checkout/OpenInvoiceDetails.php | 31 + .../PayByBankAISDirectDebitDetails.php | 31 + src/Adyen/Model/Checkout/PayByBankDetails.php | 31 + src/Adyen/Model/Checkout/PayPalDetails.php | 31 + src/Adyen/Model/Checkout/PayPayDetails.php | 31 + src/Adyen/Model/Checkout/PayToDetails.php | 31 + .../Model/Checkout/PayToPaymentMethod.php | 1 - src/Adyen/Model/Checkout/PayUUpiDetails.php | 31 + .../Model/Checkout/PayWithGoogleDetails.php | 33 + .../Model/Checkout/PayWithGoogleDonations.php | 33 + src/Adyen/Model/Checkout/PaymentDetails.php | 43 +- .../Model/Checkout/PaymentDetailsResponse.php | 31 + src/Adyen/Model/Checkout/PaymentMethod.php | 2 + .../Model/Checkout/PaymentMethodsRequest.php | 2 +- src/Adyen/Model/Checkout/PaymentRequest.php | 39 +- src/Adyen/Model/Checkout/PaymentResponse.php | 31 + .../Model/Checkout/PaymentResponseAction.php | 62 + .../Model/Checkout/PaymentValidations.php | 404 +++++++ .../PaymentValidationsNameRequest.php | 407 +++++++ .../PaymentValidationsNameResponse.php | 501 ++++++++ ...aymentValidationsNameResultRawResponse.php | 528 +++++++++ .../PaymentValidationsNameResultResponse.php | 497 ++++++++ .../Checkout/PaymentValidationsResponse.php | 404 +++++++ src/Adyen/Model/Checkout/PixDetails.php | 31 + src/Adyen/Model/Checkout/PseDetails.php | 31 + .../Model/Checkout/RakutenPayDetails.php | 31 + src/Adyen/Model/Checkout/RatepayDetails.php | 31 + src/Adyen/Model/Checkout/Recurring.php | 6 +- .../Checkout/ResponseAdditionalDataCommon.php | 10 +- .../Checkout/ResponseAdditionalDataSepa.php | 31 + .../Checkout/ResponseAdditionalDataSwish.php | 404 +++++++ src/Adyen/Model/Checkout/Result.php | 2 +- src/Adyen/Model/Checkout/RivertyDetails.php | 31 + .../Model/Checkout/SamsungPayDetails.php | 33 + .../Model/Checkout/SepaDirectDebitDetails.php | 62 + src/Adyen/Model/Checkout/ShopperName.php | 441 ++++++++ src/Adyen/Model/Checkout/Split.php | 2 +- .../Checkout/StoredPaymentMethodDetails.php | 55 + .../Checkout/StoredPaymentMethodResource.php | 62 + src/Adyen/Model/Checkout/TokenMandate.php | 1006 +++++++++++++++++ src/Adyen/Model/Checkout/TwintDetails.php | 31 + src/Adyen/Model/Checkout/UPIPaymentMethod.php | 1 - .../Model/Checkout/UpiCollectDetails.php | 38 +- src/Adyen/Model/Checkout/UpiIntentDetails.php | 62 + src/Adyen/Model/Checkout/UpiQrDetails.php | 626 ++++++++++ .../Checkout/ValidateShopperIdResponse.php | 2 +- src/Adyen/Model/Checkout/VippsDetails.php | 33 +- .../Model/Checkout/VisaCheckoutDetails.php | 33 + src/Adyen/Model/Checkout/WeChatPayDetails.php | 31 + .../Checkout/WeChatPayMiniProgramDetails.php | 95 ++ src/Adyen/Model/Checkout/ZipDetails.php | 31 + src/Adyen/Model/Disputes/ObjectSerializer.php | 6 +- .../Model/Payments/AdditionalDataLevel23.php | 4 +- .../Payments/AdditionalDataSubMerchant.php | 2 +- src/Adyen/Model/Payments/Amount.php | 4 +- src/Adyen/Model/Payments/ObjectSerializer.php | 6 +- src/Adyen/Model/Payments/PaymentRequest.php | 4 +- src/Adyen/Model/Payments/PaymentRequest3d.php | 2 +- .../Model/Payments/PaymentRequest3ds2.php | 2 +- src/Adyen/Model/Payments/Recurring.php | 6 +- .../Payments/ResponseAdditionalDataSepa.php | 31 + .../Payments/ResponseAdditionalDataSwish.php | 404 +++++++ src/Adyen/Model/Payments/Split.php | 2 +- .../Model/PaymentsApp/ObjectSerializer.php | 6 +- src/Adyen/Model/Payout/Amount.php | 4 +- src/Adyen/Model/Payout/ObjectSerializer.php | 6 +- src/Adyen/Model/Payout/Recurring.php | 6 +- .../Payout/ResponseAdditionalDataSepa.php | 31 + .../Payout/ResponseAdditionalDataSwish.php | 404 +++++++ .../Model/PosMobile/ObjectSerializer.php | 6 +- src/Adyen/Model/Recurring/Amount.php | 4 +- .../Model/Recurring/ObjectSerializer.php | 6 +- src/Adyen/Model/Recurring/Recurring.php | 6 +- src/Adyen/Model/StoredValue/Amount.php | 4 +- .../Model/StoredValue/ObjectSerializer.php | 6 +- src/Adyen/Service/Checkout/DonationsApi.php | 2 +- src/Adyen/Service/Checkout/RecurringApi.php | 18 +- src/Adyen/Service/Checkout/UtilityApi.php | 2 +- src/Adyen/Service/RecurringApi.php | 10 +- 138 files changed, 15091 insertions(+), 158 deletions(-) create mode 100644 src/Adyen/Model/Checkout/CheckoutForwardRequest.php create mode 100644 src/Adyen/Model/Checkout/CheckoutForwardRequestCard.php create mode 100644 src/Adyen/Model/Checkout/CheckoutForwardRequestOptions.php create mode 100644 src/Adyen/Model/Checkout/CheckoutForwardResponse.php create mode 100644 src/Adyen/Model/Checkout/CheckoutForwardResponseFromUrl.php create mode 100644 src/Adyen/Model/Checkout/CheckoutNetworkTokenOption.php create mode 100644 src/Adyen/Model/Checkout/CheckoutOutgoingForwardRequest.php create mode 100644 src/Adyen/Model/Checkout/Destination.php create mode 100644 src/Adyen/Model/Checkout/ExternalTokenDetails.php create mode 100644 src/Adyen/Model/Checkout/ItemDetailLine.php create mode 100644 src/Adyen/Model/Checkout/LevelTwoThree.php create mode 100644 src/Adyen/Model/Checkout/PaymentValidations.php create mode 100644 src/Adyen/Model/Checkout/PaymentValidationsNameRequest.php create mode 100644 src/Adyen/Model/Checkout/PaymentValidationsNameResponse.php create mode 100644 src/Adyen/Model/Checkout/PaymentValidationsNameResultRawResponse.php create mode 100644 src/Adyen/Model/Checkout/PaymentValidationsNameResultResponse.php create mode 100644 src/Adyen/Model/Checkout/PaymentValidationsResponse.php create mode 100644 src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php create mode 100644 src/Adyen/Model/Checkout/ShopperName.php create mode 100644 src/Adyen/Model/Checkout/TokenMandate.php create mode 100644 src/Adyen/Model/Checkout/UpiQrDetails.php create mode 100644 src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php create mode 100644 src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php diff --git a/src/Adyen/Model/BinLookup/Amount.php b/src/Adyen/Model/BinLookup/Amount.php index 7a087e9b2..de1a96617 100644 --- a/src/Adyen/Model/BinLookup/Amount.php +++ b/src/Adyen/Model/BinLookup/Amount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount. * * @return self */ @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + * @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @return self */ diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 67b57c23b..d9c9dec53 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index 2aef2714c..ea17995ab 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Checkout/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index 87369a829..962fd7705 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -50,6 +50,7 @@ class AchDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedBankLocationId' => 'string', 'ownerName' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'transferInstrumentId' => 'string', 'type' => 'string' @@ -72,6 +73,7 @@ class AchDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedBankLocationId' => null, 'ownerName' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'transferInstrumentId' => null, 'type' => null @@ -92,6 +94,7 @@ class AchDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedBankLocationId' => false, 'ownerName' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'transferInstrumentId' => false, 'type' => false @@ -192,6 +195,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedBankLocationId' => 'encryptedBankLocationId', 'ownerName' => 'ownerName', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'transferInstrumentId' => 'transferInstrumentId', 'type' => 'type' @@ -212,6 +216,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedBankLocationId' => 'setEncryptedBankLocationId', 'ownerName' => 'setOwnerName', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'transferInstrumentId' => 'setTransferInstrumentId', 'type' => 'setType' @@ -232,6 +237,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedBankLocationId' => 'getEncryptedBankLocationId', 'ownerName' => 'getOwnerName', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'transferInstrumentId' => 'getTransferInstrumentId', 'type' => 'getType' @@ -355,6 +361,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedBankLocationId', $data ?? [], null); $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('transferInstrumentId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -667,6 +674,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index adc11d915..019cd7aca 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -542,7 +542,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. * * @return self */ @@ -782,7 +782,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. + * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * For L2 data: must not be all zeroes. * For L3 data: can be zero. * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php index 0044c3500..4ba084592 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php @@ -531,7 +531,7 @@ public function getSubMerchantSubSellerSubSellerNrPhoneNumber() /** * Sets subMerchantSubSellerSubSellerNrPhoneNumber * - * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant. * Format: Alphanumeric and special characters * Maximum length: 20 characters * * @return self */ diff --git a/src/Adyen/Model/Checkout/AffirmDetails.php b/src/Adyen/Model/Checkout/AffirmDetails.php index 692ac9533..3d57ba0d6 100644 --- a/src/Adyen/Model/Checkout/AffirmDetails.php +++ b/src/Adyen/Model/Checkout/AffirmDetails.php @@ -42,6 +42,7 @@ class AffirmDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -54,6 +55,7 @@ class AffirmDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'sdkData' => null, 'type' => null ]; @@ -64,6 +66,7 @@ class AffirmDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'sdkData' => false, 'type' => false ]; @@ -154,6 +157,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -164,6 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -174,6 +179,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -247,6 +253,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -325,6 +332,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index a7eb671b7..16a220742 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -46,6 +46,7 @@ class AfterpayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => 'string', 'personalDetails' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -63,6 +64,7 @@ class AfterpayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => null, 'personalDetails' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -78,6 +80,7 @@ class AfterpayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => false, 'personalDetails' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'deliveryAddress', 'personalDetails' => 'personalDetails', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -188,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'setDeliveryAddress', 'personalDetails' => 'setPersonalDetails', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -203,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'getDeliveryAddress', 'personalDetails' => 'getPersonalDetails', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -287,6 +293,7 @@ public function __construct(?array $data = null) $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -467,6 +474,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/AmazonPayDetails.php b/src/Adyen/Model/Checkout/AmazonPayDetails.php index 128e85800..8a3be1137 100644 --- a/src/Adyen/Model/Checkout/AmazonPayDetails.php +++ b/src/Adyen/Model/Checkout/AmazonPayDetails.php @@ -44,6 +44,7 @@ class AmazonPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'amazonPayToken' => 'string', 'checkoutAttemptId' => 'string', 'checkoutSessionId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -58,6 +59,7 @@ class AmazonPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'amazonPayToken' => null, 'checkoutAttemptId' => null, 'checkoutSessionId' => null, + 'sdkData' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class AmazonPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'amazonPayToken' => false, 'checkoutAttemptId' => false, 'checkoutSessionId' => false, + 'sdkData' => false, 'type' => false ]; @@ -162,6 +165,7 @@ public function isNullableSetToNull(string $property): bool 'amazonPayToken' => 'amazonPayToken', 'checkoutAttemptId' => 'checkoutAttemptId', 'checkoutSessionId' => 'checkoutSessionId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -174,6 +178,7 @@ public function isNullableSetToNull(string $property): bool 'amazonPayToken' => 'setAmazonPayToken', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'checkoutSessionId' => 'setCheckoutSessionId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -186,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'amazonPayToken' => 'getAmazonPayToken', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'checkoutSessionId' => 'getCheckoutSessionId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -261,6 +267,7 @@ public function __construct(?array $data = null) $this->setIfExists('amazonPayToken', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('checkoutSessionId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -387,6 +394,30 @@ public function setCheckoutSessionId($checkoutSessionId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/Amount.php b/src/Adyen/Model/Checkout/Amount.php index f98781972..df592ced7 100644 --- a/src/Adyen/Model/Checkout/Amount.php +++ b/src/Adyen/Model/Checkout/Amount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount. * * @return self */ @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + * @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @return self */ diff --git a/src/Adyen/Model/Checkout/AncvDetails.php b/src/Adyen/Model/Checkout/AncvDetails.php index 2328f5c89..cb2084dd3 100644 --- a/src/Adyen/Model/Checkout/AncvDetails.php +++ b/src/Adyen/Model/Checkout/AncvDetails.php @@ -44,6 +44,7 @@ class AncvDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'beneficiaryId' => 'string', 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class AncvDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'beneficiaryId' => null, 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class AncvDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'beneficiaryId' => false, 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'beneficiaryId' => 'beneficiaryId', 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'beneficiaryId' => 'setBeneficiaryId', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'beneficiaryId' => 'getBeneficiaryId', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -267,6 +273,7 @@ public function __construct(?array $data = null) $this->setIfExists('beneficiaryId', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -396,6 +403,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/AndroidPayDetails.php b/src/Adyen/Model/Checkout/AndroidPayDetails.php index 05ff30f33..53101b3bd 100644 --- a/src/Adyen/Model/Checkout/AndroidPayDetails.php +++ b/src/Adyen/Model/Checkout/AndroidPayDetails.php @@ -42,6 +42,7 @@ class AndroidPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -54,6 +55,7 @@ class AndroidPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'sdkData' => null, 'type' => null ]; @@ -64,6 +66,7 @@ class AndroidPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'sdkData' => false, 'type' => false ]; @@ -154,6 +157,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -164,6 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -174,6 +179,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -247,6 +253,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -325,6 +332,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index 07db026b5..b888dd255 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -45,6 +45,7 @@ class ApplePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'fundingSource' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -61,6 +62,7 @@ class ApplePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'fundingSource' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -75,6 +77,7 @@ class ApplePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'fundingSource' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'fundingSource' => 'fundingSource', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -183,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fundingSource' => 'setFundingSource', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -197,6 +202,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fundingSource' => 'getFundingSource', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -244,6 +250,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_APPLEPAY = 'applepay'; /** @@ -256,6 +263,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -288,6 +296,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -463,6 +472,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/ApplePayDonations.php b/src/Adyen/Model/Checkout/ApplePayDonations.php index ae4eb0302..80c9292a4 100644 --- a/src/Adyen/Model/Checkout/ApplePayDonations.php +++ b/src/Adyen/Model/Checkout/ApplePayDonations.php @@ -45,6 +45,7 @@ class ApplePayDonations implements ModelInterface, ArrayAccess, \JsonSerializabl 'checkoutAttemptId' => 'string', 'fundingSource' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -61,6 +62,7 @@ class ApplePayDonations implements ModelInterface, ArrayAccess, \JsonSerializabl 'checkoutAttemptId' => null, 'fundingSource' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -75,6 +77,7 @@ class ApplePayDonations implements ModelInterface, ArrayAccess, \JsonSerializabl 'checkoutAttemptId' => false, 'fundingSource' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'fundingSource' => 'fundingSource', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -183,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fundingSource' => 'setFundingSource', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -197,6 +202,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fundingSource' => 'getFundingSource', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -244,6 +250,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_APPLEPAY = 'applepay'; /** @@ -256,6 +263,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -288,6 +296,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -463,6 +472,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index 11ba49279..7f32dbada 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -46,6 +46,7 @@ class BacsDirectDebitDetails implements ModelInterface, ArrayAccess, \JsonSerial 'checkoutAttemptId' => 'string', 'holderName' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'transferInstrumentId' => 'string', 'type' => 'string' @@ -64,6 +65,7 @@ class BacsDirectDebitDetails implements ModelInterface, ArrayAccess, \JsonSerial 'checkoutAttemptId' => null, 'holderName' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'transferInstrumentId' => null, 'type' => null @@ -80,6 +82,7 @@ class BacsDirectDebitDetails implements ModelInterface, ArrayAccess, \JsonSerial 'checkoutAttemptId' => false, 'holderName' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'transferInstrumentId' => false, 'type' => false @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'holderName' => 'holderName', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'transferInstrumentId' => 'transferInstrumentId', 'type' => 'type' @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'holderName' => 'setHolderName', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'transferInstrumentId' => 'setTransferInstrumentId', 'type' => 'setType' @@ -208,6 +213,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'holderName' => 'getHolderName', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'transferInstrumentId' => 'getTransferInstrumentId', 'type' => 'getType' @@ -287,6 +293,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('transferInstrumentId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -465,6 +472,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index 9cc709ae5..dbbf001e9 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -1008,7 +1008,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @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 and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters. + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If this parameter is left empty, not provided, or not applicable (in case of cross-border transactions), then **shopperStatement** is used. Currently, `localizedShopperStatement` is only supported for payments with Visa, Mastercard, JCB, Diners, and Discover. **Supported characters**: Hiragana, Katakana, Kanji, and alphanumeric. * * @return self */ diff --git a/src/Adyen/Model/Checkout/BillDeskDetails.php b/src/Adyen/Model/Checkout/BillDeskDetails.php index 476316c29..d61f349e2 100644 --- a/src/Adyen/Model/Checkout/BillDeskDetails.php +++ b/src/Adyen/Model/Checkout/BillDeskDetails.php @@ -43,6 +43,7 @@ class BillDeskDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'issuer' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class BillDeskDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'issuer' => null, + 'sdkData' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class BillDeskDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'issuer' => false, + 'sdkData' => false, 'type' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -256,6 +262,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -364,6 +371,30 @@ public function setIssuer($issuer) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/BlikDetails.php b/src/Adyen/Model/Checkout/BlikDetails.php index fc3ee3047..a9aa84798 100644 --- a/src/Adyen/Model/Checkout/BlikDetails.php +++ b/src/Adyen/Model/Checkout/BlikDetails.php @@ -44,6 +44,7 @@ class BlikDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'blikCode' => 'string', 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class BlikDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'blikCode' => null, 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class BlikDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'blikCode' => false, 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'blikCode' => 'blikCode', 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'blikCode' => 'setBlikCode', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'blikCode' => 'getBlikCode', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -267,6 +273,7 @@ public function __construct(?array $data = null) $this->setIfExists('blikCode', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -396,6 +403,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 29c5d6c5d..622c7ad29 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -41,6 +41,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'checkoutAttemptId' => 'string', 'cupsecureplusSmscode' => 'string', @@ -49,6 +50,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -58,6 +60,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'networkPaymentReference' => 'string', 'number' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'shopperNotificationReference' => 'string', 'srcCorrelationId' => 'string', 'srcDigitalCardId' => 'string', @@ -76,6 +79,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'billingSequenceNumber' => null, 'brand' => null, 'checkoutAttemptId' => null, 'cupsecureplusSmscode' => null, @@ -84,6 +88,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -93,6 +98,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'networkPaymentReference' => null, 'number' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'shopperNotificationReference' => null, 'srcCorrelationId' => null, 'srcDigitalCardId' => null, @@ -109,6 +115,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'billingSequenceNumber' => false, 'brand' => false, 'checkoutAttemptId' => false, 'cupsecureplusSmscode' => false, @@ -117,6 +124,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -126,6 +134,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'networkPaymentReference' => false, 'number' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'shopperNotificationReference' => false, 'srcCorrelationId' => false, 'srcDigitalCardId' => false, @@ -222,6 +231,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'checkoutAttemptId' => 'checkoutAttemptId', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', @@ -230,6 +240,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -239,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'shopperNotificationReference' => 'shopperNotificationReference', 'srcCorrelationId' => 'srcCorrelationId', 'srcDigitalCardId' => 'srcDigitalCardId', @@ -255,6 +267,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', @@ -263,6 +276,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -272,6 +286,7 @@ public function isNullableSetToNull(string $property): bool 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'shopperNotificationReference' => 'setShopperNotificationReference', 'srcCorrelationId' => 'setSrcCorrelationId', 'srcDigitalCardId' => 'setSrcDigitalCardId', @@ -288,6 +303,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', @@ -296,6 +312,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -305,6 +322,7 @@ public function isNullableSetToNull(string $property): bool 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'shopperNotificationReference' => 'getShopperNotificationReference', 'srcCorrelationId' => 'getSrcCorrelationId', 'srcDigitalCardId' => 'getSrcDigitalCardId', @@ -358,6 +376,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_BCMC = 'bcmc'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; @@ -375,6 +394,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -408,6 +428,7 @@ public function getTypeAllowableValues() */ public function __construct(?array $data = null) { + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); @@ -416,6 +437,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -425,6 +447,7 @@ public function __construct(?array $data = null) $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('srcCorrelationId', $data ?? [], null); $this->setIfExists('srcDigitalCardId', $data ?? [], null); @@ -495,6 +518,30 @@ public function valid() } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -689,6 +736,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * @@ -917,6 +988,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperNotificationReference * diff --git a/src/Adyen/Model/Checkout/CardDetailsRequest.php b/src/Adyen/Model/Checkout/CardDetailsRequest.php index 5939266ab..e067d8ad3 100644 --- a/src/Adyen/Model/Checkout/CardDetailsRequest.php +++ b/src/Adyen/Model/Checkout/CardDetailsRequest.php @@ -286,9 +286,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['cardNumber'] === null) { - $invalidProperties[] = "'cardNumber' can't be null"; - } if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -310,7 +307,7 @@ public function valid() /** * Gets cardNumber * - * @return string + * @return string|null */ public function getCardNumber() { @@ -320,7 +317,7 @@ public function getCardNumber() /** * Sets cardNumber * - * @param string $cardNumber A minimum of the first eight digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. + * @param string|null $cardNumber A minimum of the first six digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index ce330d4f3..568918891 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -41,6 +41,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'checkoutAttemptId' => 'string', 'cupsecureplusSmscode' => 'string', @@ -49,6 +50,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -58,6 +60,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'networkPaymentReference' => 'string', 'number' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'shopperNotificationReference' => 'string', 'srcCorrelationId' => 'string', 'srcDigitalCardId' => 'string', @@ -76,6 +79,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'billingSequenceNumber' => null, 'brand' => null, 'checkoutAttemptId' => null, 'cupsecureplusSmscode' => null, @@ -84,6 +88,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -93,6 +98,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'networkPaymentReference' => null, 'number' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'shopperNotificationReference' => null, 'srcCorrelationId' => null, 'srcDigitalCardId' => null, @@ -109,6 +115,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'billingSequenceNumber' => false, 'brand' => false, 'checkoutAttemptId' => false, 'cupsecureplusSmscode' => false, @@ -117,6 +124,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -126,6 +134,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'networkPaymentReference' => false, 'number' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'shopperNotificationReference' => false, 'srcCorrelationId' => false, 'srcDigitalCardId' => false, @@ -222,6 +231,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'checkoutAttemptId' => 'checkoutAttemptId', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', @@ -230,6 +240,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -239,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'shopperNotificationReference' => 'shopperNotificationReference', 'srcCorrelationId' => 'srcCorrelationId', 'srcDigitalCardId' => 'srcDigitalCardId', @@ -255,6 +267,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', @@ -263,6 +276,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -272,6 +286,7 @@ public function isNullableSetToNull(string $property): bool 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'shopperNotificationReference' => 'setShopperNotificationReference', 'srcCorrelationId' => 'setSrcCorrelationId', 'srcDigitalCardId' => 'setSrcDigitalCardId', @@ -288,6 +303,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', @@ -296,6 +312,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -305,6 +322,7 @@ public function isNullableSetToNull(string $property): bool 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'shopperNotificationReference' => 'getShopperNotificationReference', 'srcCorrelationId' => 'getSrcCorrelationId', 'srcDigitalCardId' => 'getSrcDigitalCardId', @@ -358,6 +376,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_BCMC = 'bcmc'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; @@ -375,6 +394,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -408,6 +428,7 @@ public function getTypeAllowableValues() */ public function __construct(?array $data = null) { + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); @@ -416,6 +437,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -425,6 +447,7 @@ public function __construct(?array $data = null) $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('srcCorrelationId', $data ?? [], null); $this->setIfExists('srcDigitalCardId', $data ?? [], null); @@ -495,6 +518,30 @@ public function valid() } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -689,6 +736,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * @@ -917,6 +988,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperNotificationReference * diff --git a/src/Adyen/Model/Checkout/CashAppDetails.php b/src/Adyen/Model/Checkout/CashAppDetails.php index e70ddc114..780c19ab9 100644 --- a/src/Adyen/Model/Checkout/CashAppDetails.php +++ b/src/Adyen/Model/Checkout/CashAppDetails.php @@ -48,6 +48,7 @@ class CashAppDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'onFileGrantId' => 'string', 'recurringDetailReference' => 'string', 'requestId' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', 'type' => 'string' @@ -68,6 +69,7 @@ class CashAppDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'onFileGrantId' => null, 'recurringDetailReference' => null, 'requestId' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'subtype' => null, 'type' => null @@ -86,6 +88,7 @@ class CashAppDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'onFileGrantId' => false, 'recurringDetailReference' => false, 'requestId' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'subtype' => false, 'type' => false @@ -184,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'onFileGrantId' => 'onFileGrantId', 'recurringDetailReference' => 'recurringDetailReference', 'requestId' => 'requestId', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', 'type' => 'type' @@ -202,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'onFileGrantId' => 'setOnFileGrantId', 'recurringDetailReference' => 'setRecurringDetailReference', 'requestId' => 'setRequestId', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', 'type' => 'setType' @@ -220,6 +225,7 @@ public function isNullableSetToNull(string $property): bool 'onFileGrantId' => 'getOnFileGrantId', 'recurringDetailReference' => 'getRecurringDetailReference', 'requestId' => 'getRequestId', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', 'type' => 'getType' @@ -301,6 +307,7 @@ public function __construct(?array $data = null) $this->setIfExists('onFileGrantId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('requestId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -527,6 +534,30 @@ public function setRequestId($requestId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/CellulantDetails.php b/src/Adyen/Model/Checkout/CellulantDetails.php index bcad22504..56b70ded3 100644 --- a/src/Adyen/Model/Checkout/CellulantDetails.php +++ b/src/Adyen/Model/Checkout/CellulantDetails.php @@ -43,6 +43,7 @@ class CellulantDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'issuer' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class CellulantDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'issuer' => null, + 'sdkData' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class CellulantDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'issuer' => false, + 'sdkData' => false, 'type' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -254,6 +260,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -356,6 +363,30 @@ public function setIssuer($issuer) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php b/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php index 9ab2e50f9..3781653b0 100644 --- a/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php +++ b/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php @@ -42,8 +42,10 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'bankCode' => 'string', 'beneficiary' => 'string', 'bic' => 'string', + 'branchCode' => 'string', 'downloadUrl' => 'string', 'iban' => 'string', 'paymentMethodType' => 'string', @@ -65,8 +67,10 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'bankCode' => null, 'beneficiary' => null, 'bic' => null, + 'branchCode' => null, 'downloadUrl' => null, 'iban' => null, 'paymentMethodType' => null, @@ -86,8 +90,10 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPINullables = [ 'accountNumber' => false, + 'bankCode' => false, 'beneficiary' => false, 'bic' => false, + 'branchCode' => false, 'downloadUrl' => false, 'iban' => false, 'paymentMethodType' => false, @@ -187,8 +193,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'bankCode' => 'bankCode', 'beneficiary' => 'beneficiary', 'bic' => 'bic', + 'branchCode' => 'branchCode', 'downloadUrl' => 'downloadUrl', 'iban' => 'iban', 'paymentMethodType' => 'paymentMethodType', @@ -208,8 +216,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', 'beneficiary' => 'setBeneficiary', 'bic' => 'setBic', + 'branchCode' => 'setBranchCode', 'downloadUrl' => 'setDownloadUrl', 'iban' => 'setIban', 'paymentMethodType' => 'setPaymentMethodType', @@ -229,8 +239,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'bankCode' => 'getBankCode', 'beneficiary' => 'getBeneficiary', 'bic' => 'getBic', + 'branchCode' => 'getBranchCode', 'downloadUrl' => 'getDownloadUrl', 'iban' => 'getIban', 'paymentMethodType' => 'getPaymentMethodType', @@ -313,8 +325,10 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('beneficiary', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('branchCode', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('paymentMethodType', $data ?? [], null); @@ -405,6 +419,30 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets bankCode + * + * @return string|null + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string|null $bankCode The bank code of the bank transfer. + * + * @return self + */ + public function setBankCode($bankCode) + { + $this->container['bankCode'] = $bankCode; + + return $this; + } + /** * Gets beneficiary * @@ -453,6 +491,30 @@ public function setBic($bic) return $this; } + /** + * Gets branchCode + * + * @return string|null + */ + public function getBranchCode() + { + return $this->container['branchCode']; + } + + /** + * Sets branchCode + * + * @param string|null $branchCode The branch code of the bank transfer. + * + * @return self + */ + public function setBranchCode($branchCode) + { + $this->container['branchCode'] = $branchCode; + + return $this; + } + /** * Gets downloadUrl * diff --git a/src/Adyen/Model/Checkout/CheckoutForwardRequest.php b/src/Adyen/Model/Checkout/CheckoutForwardRequest.php new file mode 100644 index 000000000..33bd036cc --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutForwardRequest.php @@ -0,0 +1,633 @@ + + */ +class CheckoutForwardRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutForwardRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'baseUrl' => 'string', + 'merchantAccount' => 'string', + 'merchantReference' => 'string', + 'options' => '\Adyen\Model\Checkout\CheckoutForwardRequestOptions', + 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutForwardRequestCard', + 'request' => '\Adyen\Model\Checkout\CheckoutOutgoingForwardRequest', + 'shopperReference' => 'string', + 'storedPaymentMethodId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'baseUrl' => null, + 'merchantAccount' => null, + 'merchantReference' => null, + 'options' => null, + 'paymentMethod' => null, + 'request' => null, + 'shopperReference' => null, + 'storedPaymentMethodId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'baseUrl' => false, + 'merchantAccount' => false, + 'merchantReference' => false, + 'options' => false, + 'paymentMethod' => false, + 'request' => false, + 'shopperReference' => false, + 'storedPaymentMethodId' => 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 = [ + 'baseUrl' => 'baseUrl', + 'merchantAccount' => 'merchantAccount', + 'merchantReference' => 'merchantReference', + 'options' => 'options', + 'paymentMethod' => 'paymentMethod', + 'request' => 'request', + 'shopperReference' => 'shopperReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'baseUrl' => 'setBaseUrl', + 'merchantAccount' => 'setMerchantAccount', + 'merchantReference' => 'setMerchantReference', + 'options' => 'setOptions', + 'paymentMethod' => 'setPaymentMethod', + 'request' => 'setRequest', + 'shopperReference' => 'setShopperReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'baseUrl' => 'getBaseUrl', + 'merchantAccount' => 'getMerchantAccount', + 'merchantReference' => 'getMerchantReference', + 'options' => 'getOptions', + 'paymentMethod' => 'getPaymentMethod', + 'request' => 'getRequest', + 'shopperReference' => 'getShopperReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId' + ]; + + /** + * 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('baseUrl', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('merchantReference', $data ?? [], null); + $this->setIfExists('options', $data ?? [], null); + $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('request', $data ?? [], null); + $this->setIfExists('shopperReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $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['baseUrl'] === null) { + $invalidProperties[] = "'baseUrl' can't be null"; + } + if ($this->container['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['request'] === null) { + $invalidProperties[] = "'request' can't be null"; + } + if ($this->container['shopperReference'] === null) { + $invalidProperties[] = "'shopperReference' 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 baseUrl + * + * @return string + */ + public function getBaseUrl() + { + return $this->container['baseUrl']; + } + + /** + * Sets baseUrl + * + * @param string $baseUrl The base URL of the third party API, where Adyen will send the request to forward the payment details. + * + * @return self + */ + public function setBaseUrl($baseUrl) + { + $this->container['baseUrl'] = $baseUrl; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount Your merchant account. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets merchantReference + * + * @return string|null + */ + public function getMerchantReference() + { + return $this->container['merchantReference']; + } + + /** + * Sets merchantReference + * + * @param string|null $merchantReference Merchant defined payment reference. + * + * @return self + */ + public function setMerchantReference($merchantReference) + { + $this->container['merchantReference'] = $merchantReference; + + return $this; + } + + /** + * Gets options + * + * @return \Adyen\Model\Checkout\CheckoutForwardRequestOptions|null + */ + public function getOptions() + { + return $this->container['options']; + } + + /** + * Sets options + * + * @param \Adyen\Model\Checkout\CheckoutForwardRequestOptions|null $options options + * + * @return self + */ + public function setOptions($options) + { + $this->container['options'] = $options; + + return $this; + } + + /** + * Gets paymentMethod + * + * @return \Adyen\Model\Checkout\CheckoutForwardRequestCard|null + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param \Adyen\Model\Checkout\CheckoutForwardRequestCard|null $paymentMethod paymentMethod + * + * @return self + */ + public function setPaymentMethod($paymentMethod) + { + $this->container['paymentMethod'] = $paymentMethod; + + return $this; + } + + /** + * Gets request + * + * @return \Adyen\Model\Checkout\CheckoutOutgoingForwardRequest + */ + public function getRequest() + { + return $this->container['request']; + } + + /** + * Sets request + * + * @param \Adyen\Model\Checkout\CheckoutOutgoingForwardRequest $request request + * + * @return self + */ + public function setRequest($request) + { + $this->container['request'] = $request; + + return $this; + } + + /** + * Gets shopperReference + * + * @return string + */ + public function getShopperReference() + { + return $this->container['shopperReference']; + } + + /** + * Sets shopperReference + * + * @param string $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. + * + * @return self + */ + public function setShopperReference($shopperReference) + { + $this->container['shopperReference'] = $shopperReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId The unique identifier of the token that you want to forward to the third party. This is the `storedPaymentMethodId` you received in the webhook after you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutForwardRequestCard.php b/src/Adyen/Model/Checkout/CheckoutForwardRequestCard.php new file mode 100644 index 000000000..546052174 --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutForwardRequestCard.php @@ -0,0 +1,714 @@ + + */ +class CheckoutForwardRequestCard implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutForwardRequestCard'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cvc' => 'string', + 'encryptedCardNumber' => 'string', + 'encryptedExpiryMonth' => 'string', + 'encryptedExpiryYear' => 'string', + 'encryptedSecurityCode' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'holderName' => 'string', + 'number' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cvc' => null, + 'encryptedCardNumber' => null, + 'encryptedExpiryMonth' => null, + 'encryptedExpiryYear' => null, + 'encryptedSecurityCode' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'holderName' => null, + 'number' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cvc' => false, + 'encryptedCardNumber' => false, + 'encryptedExpiryMonth' => false, + 'encryptedExpiryYear' => false, + 'encryptedSecurityCode' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'holderName' => false, + 'number' => false, + 'type' => 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 = [ + 'cvc' => 'cvc', + 'encryptedCardNumber' => 'encryptedCardNumber', + 'encryptedExpiryMonth' => 'encryptedExpiryMonth', + 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedSecurityCode' => 'encryptedSecurityCode', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'holderName' => 'holderName', + 'number' => 'number', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cvc' => 'setCvc', + 'encryptedCardNumber' => 'setEncryptedCardNumber', + 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedSecurityCode' => 'setEncryptedSecurityCode', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'holderName' => 'setHolderName', + 'number' => 'setNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cvc' => 'getCvc', + 'encryptedCardNumber' => 'getEncryptedCardNumber', + 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedSecurityCode' => 'getEncryptedSecurityCode', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'holderName' => 'getHolderName', + 'number' => 'getNumber', + 'type' => 'getType' + ]; + + /** + * 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_SCHEME = 'scheme'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_SCHEME, + ]; + } + /** + * 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('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('number', $data ?? [], null); + $this->setIfExists('type', $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->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; + } + + /** + * 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 cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is also known as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits + * + * @return self + */ + public function setCvc($cvc) + { + $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) + { + $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 expiryMonth + * + * @return self + */ + public function setEncryptedExpiryMonth($encryptedExpiryMonth) + { + $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) + { + $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 security code. + * + * @return self + */ + public function setEncryptedSecurityCode($encryptedSecurityCode) + { + $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. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November + * + * @return self + */ + public function setExpiryMonth($expiryMonth) + { + $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. + * + * @return self + */ + public function setExpiryYear($expiryYear) + { + $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 cardholder. + * + * @return self + */ + public function setHolderName($holderName) + { + $this->container['holderName'] = $holderName; + + 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). Format: Do not use separators. + * + * @return self + */ + public function setNumber($number) + { + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Default payment method details. Common for scheme payment methods, and for simple payment method details. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + error_log( + sprintf( + "type: unexpected enum value '%s' - Supported values are [%s]", + $type, + implode(', ', $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutForwardRequestOptions.php b/src/Adyen/Model/Checkout/CheckoutForwardRequestOptions.php new file mode 100644 index 000000000..2841e6a3a --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutForwardRequestOptions.php @@ -0,0 +1,528 @@ + + */ +class CheckoutForwardRequestOptions implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutForwardRequestOptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountUpdate' => 'bool', + 'dryRun' => 'bool', + 'networkToken' => '\Adyen\Model\Checkout\CheckoutNetworkTokenOption', + 'networkTxReferencePaths' => 'string[]', + 'tokenize' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountUpdate' => null, + 'dryRun' => null, + 'networkToken' => null, + 'networkTxReferencePaths' => null, + 'tokenize' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountUpdate' => false, + 'dryRun' => false, + 'networkToken' => false, + 'networkTxReferencePaths' => false, + 'tokenize' => 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 = [ + 'accountUpdate' => 'accountUpdate', + 'dryRun' => 'dryRun', + 'networkToken' => 'networkToken', + 'networkTxReferencePaths' => 'networkTxReferencePaths', + 'tokenize' => 'tokenize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountUpdate' => 'setAccountUpdate', + 'dryRun' => 'setDryRun', + 'networkToken' => 'setNetworkToken', + 'networkTxReferencePaths' => 'setNetworkTxReferencePaths', + 'tokenize' => 'setTokenize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountUpdate' => 'getAccountUpdate', + 'dryRun' => 'getDryRun', + 'networkToken' => 'getNetworkToken', + 'networkTxReferencePaths' => 'getNetworkTxReferencePaths', + 'tokenize' => 'getTokenize' + ]; + + /** + * 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('accountUpdate', $data ?? [], null); + $this->setIfExists('dryRun', $data ?? [], null); + $this->setIfExists('networkToken', $data ?? [], null); + $this->setIfExists('networkTxReferencePaths', $data ?? [], null); + $this->setIfExists('tokenize', $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 accountUpdate + * + * @return bool|null + */ + public function getAccountUpdate() + { + return $this->container['accountUpdate']; + } + + /** + * Sets accountUpdate + * + * @param bool|null $accountUpdate Whether to check for a card account update (true) or not (false) + * + * @return self + */ + public function setAccountUpdate($accountUpdate) + { + $this->container['accountUpdate'] = $accountUpdate; + + return $this; + } + + /** + * Gets dryRun + * + * @return bool|null + */ + public function getDryRun() + { + return $this->container['dryRun']; + } + + /** + * Sets dryRun + * + * @param bool|null $dryRun Set to **true** to receive a copy of the request Adyen is making to the third party in the response. Any sensitive information will be masked in the response you receive. This functionality is only available in the test environment. + * + * @return self + */ + public function setDryRun($dryRun) + { + $this->container['dryRun'] = $dryRun; + + return $this; + } + + /** + * Gets networkToken + * + * @return \Adyen\Model\Checkout\CheckoutNetworkTokenOption|null + */ + public function getNetworkToken() + { + return $this->container['networkToken']; + } + + /** + * Sets networkToken + * + * @param \Adyen\Model\Checkout\CheckoutNetworkTokenOption|null $networkToken networkToken + * + * @return self + */ + public function setNetworkToken($networkToken) + { + $this->container['networkToken'] = $networkToken; + + return $this; + } + + /** + * Gets networkTxReferencePaths + * + * @return string[]|null + */ + public function getNetworkTxReferencePaths() + { + return $this->container['networkTxReferencePaths']; + } + + /** + * Sets networkTxReferencePaths + * + * @param string[]|null $networkTxReferencePaths Set in tokenize:true case when forwarding PAN. Addresses to the possible location(s) of networkTxReference in the incoming 3rd party response + * + * @return self + */ + public function setNetworkTxReferencePaths($networkTxReferencePaths) + { + $this->container['networkTxReferencePaths'] = $networkTxReferencePaths; + + return $this; + } + + /** + * Gets tokenize + * + * @return bool|null + */ + public function getTokenize() + { + return $this->container['tokenize']; + } + + /** + * Sets tokenize + * + * @param bool|null $tokenize Set to **true**, the payment details are [tokenized](https://docs.adyen.com/online-payments/tokenization). + * + * @return self + */ + public function setTokenize($tokenize) + { + $this->container['tokenize'] = $tokenize; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutForwardResponse.php b/src/Adyen/Model/Checkout/CheckoutForwardResponse.php new file mode 100644 index 000000000..2eeb45386 --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutForwardResponse.php @@ -0,0 +1,500 @@ + + */ +class CheckoutForwardResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutForwardResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantReference' => 'string', + 'pspReference' => 'string', + 'response' => '\Adyen\Model\Checkout\CheckoutForwardResponseFromUrl', + 'storedPaymentMethodId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantReference' => null, + 'pspReference' => null, + 'response' => null, + 'storedPaymentMethodId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantReference' => false, + 'pspReference' => false, + 'response' => false, + 'storedPaymentMethodId' => 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 = [ + 'merchantReference' => 'merchantReference', + 'pspReference' => 'pspReference', + 'response' => 'response', + 'storedPaymentMethodId' => 'storedPaymentMethodId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantReference' => 'setMerchantReference', + 'pspReference' => 'setPspReference', + 'response' => 'setResponse', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantReference' => 'getMerchantReference', + 'pspReference' => 'getPspReference', + 'response' => 'getResponse', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId' + ]; + + /** + * 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('merchantReference', $data ?? [], null); + $this->setIfExists('pspReference', $data ?? [], null); + $this->setIfExists('response', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $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['response'] === null) { + $invalidProperties[] = "'response' 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 merchantReference + * + * @return string|null + */ + public function getMerchantReference() + { + return $this->container['merchantReference']; + } + + /** + * Sets merchantReference + * + * @param string|null $merchantReference Merchant defined payment reference. + * + * @return self + */ + public function setMerchantReference($merchantReference) + { + $this->container['merchantReference'] = $merchantReference; + + return $this; + } + + /** + * Gets pspReference + * + * @return string|null + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string|null $pspReference Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request. + * + * @return self + */ + public function setPspReference($pspReference) + { + $this->container['pspReference'] = $pspReference; + + return $this; + } + + /** + * Gets response + * + * @return \Adyen\Model\Checkout\CheckoutForwardResponseFromUrl + */ + public function getResponse() + { + return $this->container['response']; + } + + /** + * Sets response + * + * @param \Adyen\Model\Checkout\CheckoutForwardResponseFromUrl $response response + * + * @return self + */ + public function setResponse($response) + { + $this->container['response'] = $response; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId The unique identifier of the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutForwardResponseFromUrl.php b/src/Adyen/Model/Checkout/CheckoutForwardResponseFromUrl.php new file mode 100644 index 000000000..65141c9cc --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutForwardResponseFromUrl.php @@ -0,0 +1,466 @@ + + */ +class CheckoutForwardResponseFromUrl implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutForwardResponseFromUrl'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'body' => 'string', + 'headers' => 'array', + 'status' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'body' => null, + 'headers' => null, + 'status' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'body' => false, + 'headers' => 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 = [ + 'body' => 'body', + 'headers' => 'headers', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody', + 'headers' => 'setHeaders', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody', + 'headers' => 'getHeaders', + '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('body', $data ?? [], null); + $this->setIfExists('headers', $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 body + * + * @return string|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string|null $body The body of the response Adyen received from the third party, in string format. + * + * @return self + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + + /** + * Gets headers + * + * @return array|null + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param array|null $headers The HTTP headers of the response Adyen received from the third party. + * + * @return self + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets status + * + * @return int|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status The HTTP status of the response Adyen received from the third party. + * + * @return self + */ + public function setStatus($status) + { + $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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutNetworkTokenOption.php b/src/Adyen/Model/Checkout/CheckoutNetworkTokenOption.php new file mode 100644 index 000000000..b13fa1a57 --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutNetworkTokenOption.php @@ -0,0 +1,435 @@ + + */ +class CheckoutNetworkTokenOption implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutNetworkTokenOption'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'includeCryptogram' => 'bool', + 'useNetworkToken' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'includeCryptogram' => null, + 'useNetworkToken' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'includeCryptogram' => false, + 'useNetworkToken' => 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 = [ + 'includeCryptogram' => 'includeCryptogram', + 'useNetworkToken' => 'useNetworkToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'includeCryptogram' => 'setIncludeCryptogram', + 'useNetworkToken' => 'setUseNetworkToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'includeCryptogram' => 'getIncludeCryptogram', + 'useNetworkToken' => 'getUseNetworkToken' + ]; + + /** + * 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('includeCryptogram', $data ?? [], null); + $this->setIfExists('useNetworkToken', $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 includeCryptogram + * + * @return bool|null + */ + public function getIncludeCryptogram() + { + return $this->container['includeCryptogram']; + } + + /** + * Sets includeCryptogram + * + * @param bool|null $includeCryptogram Set to **true** to enable forwarding network token cryptograms. + * + * @return self + */ + public function setIncludeCryptogram($includeCryptogram) + { + $this->container['includeCryptogram'] = $includeCryptogram; + + return $this; + } + + /** + * Gets useNetworkToken + * + * @return bool|null + */ + public function getUseNetworkToken() + { + return $this->container['useNetworkToken']; + } + + /** + * Sets useNetworkToken + * + * @param bool|null $useNetworkToken Set to **true** to forward the network token for a card. + * + * @return self + */ + public function setUseNetworkToken($useNetworkToken) + { + $this->container['useNetworkToken'] = $useNetworkToken; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutOutgoingForwardRequest.php b/src/Adyen/Model/Checkout/CheckoutOutgoingForwardRequest.php new file mode 100644 index 000000000..a72368494 --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutOutgoingForwardRequest.php @@ -0,0 +1,569 @@ + + */ +class CheckoutOutgoingForwardRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutOutgoingForwardRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'body' => 'string', + 'credentials' => 'string', + 'headers' => 'array', + 'httpMethod' => 'string', + 'urlSuffix' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'body' => null, + 'credentials' => null, + 'headers' => null, + 'httpMethod' => null, + 'urlSuffix' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'body' => false, + 'credentials' => false, + 'headers' => false, + 'httpMethod' => false, + 'urlSuffix' => 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 = [ + 'body' => 'body', + 'credentials' => 'credentials', + 'headers' => 'headers', + 'httpMethod' => 'httpMethod', + 'urlSuffix' => 'urlSuffix' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody', + 'credentials' => 'setCredentials', + 'headers' => 'setHeaders', + 'httpMethod' => 'setHttpMethod', + 'urlSuffix' => 'setUrlSuffix' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody', + 'credentials' => 'getCredentials', + 'headers' => 'getHeaders', + 'httpMethod' => 'getHttpMethod', + 'urlSuffix' => 'getUrlSuffix' + ]; + + /** + * 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 HTTP_METHOD_POST = 'post'; + public const HTTP_METHOD_PUT = 'put'; + public const HTTP_METHOD_PATCH = 'patch'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHttpMethodAllowableValues() + { + return [ + self::HTTP_METHOD_POST, + self::HTTP_METHOD_PUT, + self::HTTP_METHOD_PATCH, + ]; + } + /** + * 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('body', $data ?? [], null); + $this->setIfExists('credentials', $data ?? [], null); + $this->setIfExists('headers', $data ?? [], null); + $this->setIfExists('httpMethod', $data ?? [], null); + $this->setIfExists('urlSuffix', $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['body'] === null) { + $invalidProperties[] = "'body' can't be null"; + } + if ($this->container['httpMethod'] === null) { + $invalidProperties[] = "'httpMethod' can't be null"; + } + $allowedValues = $this->getHttpMethodAllowableValues(); + if (!is_null($this->container['httpMethod']) && !in_array($this->container['httpMethod'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'httpMethod', must be one of '%s'", + $this->container['httpMethod'], + 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 body + * + * @return string + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string $body The request body that you want Adyen to forward to the third party on your behalf, in string format. Include key value pairs to specify the payment details, and use [placeholders](https://docs.adyen.com/online-payments/tokenization/forward-payment-details#placeholders) for the values. Adyen replaces the placeholders with the payment details when making the request to the third party. When forwarding a network token, include a [condition](https://docs.adyen.com/online-payments/tokenization/forward-payment-details#conditional-placeholders) that checks if the network token exists, and informs Adyen of which fields to send depending on the outcome. + * + * @return self + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + + /** + * Gets credentials + * + * @return string|null + */ + public function getCredentials() + { + return $this->container['credentials']; + } + + /** + * Sets credentials + * + * @param string|null $credentials Your credentials that are needed to authenticate with the third party. + * + * @return self + */ + public function setCredentials($credentials) + { + $this->container['credentials'] = $credentials; + + return $this; + } + + /** + * Gets headers + * + * @return array|null + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param array|null $headers The request headers that will be included in the request Adyen makes to the third party on your behalf. Supports the `{{credentials}}` [placeholder](https://docs.adyen.com/online-payments/tokenization/forward-payment-details#placeholders). + * + * @return self + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets httpMethod + * + * @return string + */ + public function getHttpMethod() + { + return $this->container['httpMethod']; + } + + /** + * Sets httpMethod + * + * @param string $httpMethod The HTTP method to use for the request Adyen makes on your behalf to the third party. + * + * @return self + */ + public function setHttpMethod($httpMethod) + { + $allowedValues = $this->getHttpMethodAllowableValues(); + if (!in_array($httpMethod, $allowedValues, true)) { + error_log( + sprintf( + "httpMethod: unexpected enum value '%s' - Supported values are [%s]", + $httpMethod, + implode(', ', $allowedValues) + ) + ); + } + $this->container['httpMethod'] = $httpMethod; + + return $this; + } + + /** + * Gets urlSuffix + * + * @return string|null + */ + public function getUrlSuffix() + { + return $this->container['urlSuffix']; + } + + /** + * Sets urlSuffix + * + * @param string|null $urlSuffix The suffix that Adyen needs to append to the `baseUrl` to construct the destination URL that belongs to the third party. This is usually the endpoint name for the request, for example, **_/payments**. + * + * @return self + */ + public function setUrlSuffix($urlSuffix) + { + $this->container['urlSuffix'] = $urlSuffix; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 269d51815..c8001bcdb 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -52,6 +52,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedBankLocationId' => 'string', 'ownerName' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'transferInstrumentId' => 'string', 'type' => 'string', @@ -66,6 +67,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'holderName' => 'string', 'issuer' => 'string', 'blikCode' => 'string', + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'cupsecureplusSmscode' => 'string', 'cvc' => 'string', @@ -73,6 +75,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -113,7 +116,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'deviceFingerprint' => 'string', 'iban' => 'string', 'samsungPayToken' => 'string', - 'billingSequenceNumber' => 'string', + 'dueDate' => 'string', 'appId' => 'string', 'visaCheckoutCallId' => 'string', 'openid' => 'string', @@ -137,6 +140,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedBankLocationId' => null, 'ownerName' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'transferInstrumentId' => null, 'type' => null, @@ -151,6 +155,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'holderName' => null, 'issuer' => null, 'blikCode' => null, + 'billingSequenceNumber' => null, 'brand' => null, 'cupsecureplusSmscode' => null, 'cvc' => null, @@ -158,6 +163,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -198,7 +204,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'deviceFingerprint' => null, 'iban' => null, 'samsungPayToken' => null, - 'billingSequenceNumber' => null, + 'dueDate' => null, 'appId' => null, 'visaCheckoutCallId' => null, 'openid' => null, @@ -220,6 +226,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedBankLocationId' => false, 'ownerName' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'transferInstrumentId' => false, 'type' => false, @@ -234,6 +241,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'holderName' => false, 'issuer' => false, 'blikCode' => false, + 'billingSequenceNumber' => false, 'brand' => false, 'cupsecureplusSmscode' => false, 'cvc' => false, @@ -241,6 +249,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -281,7 +290,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'deviceFingerprint' => false, 'iban' => false, 'samsungPayToken' => false, - 'billingSequenceNumber' => false, + 'dueDate' => false, 'appId' => false, 'visaCheckoutCallId' => false, 'openid' => false, @@ -383,6 +392,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedBankLocationId' => 'encryptedBankLocationId', 'ownerName' => 'ownerName', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'transferInstrumentId' => 'transferInstrumentId', 'type' => 'type', @@ -397,6 +407,7 @@ public function isNullableSetToNull(string $property): bool 'holderName' => 'holderName', 'issuer' => 'issuer', 'blikCode' => 'blikCode', + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'cvc' => 'cvc', @@ -404,6 +415,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -444,7 +456,7 @@ public function isNullableSetToNull(string $property): bool 'deviceFingerprint' => 'deviceFingerprint', 'iban' => 'iban', 'samsungPayToken' => 'samsungPayToken', - 'billingSequenceNumber' => 'billingSequenceNumber', + 'dueDate' => 'dueDate', 'appId' => 'appId', 'visaCheckoutCallId' => 'visaCheckoutCallId', 'openid' => 'openid', @@ -466,6 +478,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedBankLocationId' => 'setEncryptedBankLocationId', 'ownerName' => 'setOwnerName', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'transferInstrumentId' => 'setTransferInstrumentId', 'type' => 'setType', @@ -480,6 +493,7 @@ public function isNullableSetToNull(string $property): bool 'holderName' => 'setHolderName', 'issuer' => 'setIssuer', 'blikCode' => 'setBlikCode', + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'cvc' => 'setCvc', @@ -487,6 +501,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -527,7 +542,7 @@ public function isNullableSetToNull(string $property): bool 'deviceFingerprint' => 'setDeviceFingerprint', 'iban' => 'setIban', 'samsungPayToken' => 'setSamsungPayToken', - 'billingSequenceNumber' => 'setBillingSequenceNumber', + 'dueDate' => 'setDueDate', 'appId' => 'setAppId', 'visaCheckoutCallId' => 'setVisaCheckoutCallId', 'openid' => 'setOpenid', @@ -549,6 +564,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedBankLocationId' => 'getEncryptedBankLocationId', 'ownerName' => 'getOwnerName', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'transferInstrumentId' => 'getTransferInstrumentId', 'type' => 'getType', @@ -563,6 +579,7 @@ public function isNullableSetToNull(string $property): bool 'holderName' => 'getHolderName', 'issuer' => 'getIssuer', 'blikCode' => 'getBlikCode', + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'cvc' => 'getCvc', @@ -570,6 +587,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -610,7 +628,7 @@ public function isNullableSetToNull(string $property): bool 'deviceFingerprint' => 'getDeviceFingerprint', 'iban' => 'getIban', 'samsungPayToken' => 'getSamsungPayToken', - 'billingSequenceNumber' => 'getBillingSequenceNumber', + 'dueDate' => 'getDueDate', 'appId' => 'getAppId', 'visaCheckoutCallId' => 'getVisaCheckoutCallId', 'openid' => 'getOpenid', @@ -682,6 +700,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedBankLocationId', $data ?? [], null); $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('transferInstrumentId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -696,6 +715,7 @@ public function __construct(?array $data = null) $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('blikCode', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); @@ -703,6 +723,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -743,7 +764,7 @@ public function __construct(?array $data = null) $this->setIfExists('deviceFingerprint', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); - $this->setIfExists('billingSequenceNumber', $data ?? [], null); + $this->setIfExists('dueDate', $data ?? [], null); $this->setIfExists('appId', $data ?? [], null); $this->setIfExists('visaCheckoutCallId', $data ?? [], null); $this->setIfExists('openid', $data ?? [], null); @@ -782,6 +803,9 @@ public function listInvalidProperties() if ($this->container['ownerName'] === null) { $invalidProperties[] = "'ownerName' can't be null"; } + if ($this->container['storedPaymentMethodId'] === null) { + $invalidProperties[] = "'storedPaymentMethodId' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -796,6 +820,9 @@ public function listInvalidProperties() if ($this->container['fastlaneData'] === null) { $invalidProperties[] = "'fastlaneData' can't be null"; } + if ($this->container['subtype'] === null) { + $invalidProperties[] = "'subtype' can't be null"; + } if ($this->container['firstName'] === null) { $invalidProperties[] = "'firstName' can't be null"; } @@ -832,9 +859,6 @@ public function listInvalidProperties() if ($this->container['samsungPayToken'] === null) { $invalidProperties[] = "'samsungPayToken' can't be null"; } - if ($this->container['billingSequenceNumber'] === null) { - $invalidProperties[] = "'billingSequenceNumber' can't be null"; - } if ($this->container['visaCheckoutCallId'] === null) { $invalidProperties[] = "'visaCheckoutCallId' can't be null"; } @@ -1072,10 +1096,34 @@ public function setRecurringDetailReference($recurringDetailReference) } /** - * Gets storedPaymentMethodId + * Gets sdkData * * @return string|null */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string + */ public function getStoredPaymentMethodId() { return $this->container['storedPaymentMethodId']; @@ -1084,7 +1132,7 @@ public function getStoredPaymentMethodId() /** * Sets storedPaymentMethodId * - * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * @param string $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. * * @return self */ @@ -1407,6 +1455,30 @@ public function setBlikCode($blikCode) return $this; } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -1577,6 +1649,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * @@ -1988,7 +2084,7 @@ public function setRequestId($requestId) /** * Gets subtype * - * @return string|null + * @return string */ public function getSubtype() { @@ -1998,7 +2094,7 @@ public function getSubtype() /** * Sets subtype * - * @param string|null $subtype The type of flow to initiate. + * @param string $subtype The type of flow to initiate. * * @return self */ @@ -2070,7 +2166,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -2094,7 +2190,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ @@ -2538,25 +2634,25 @@ public function setSamsungPayToken($samsungPayToken) } /** - * Gets billingSequenceNumber + * Gets dueDate * - * @return string + * @return string|null */ - public function getBillingSequenceNumber() + public function getDueDate() { - return $this->container['billingSequenceNumber']; + return $this->container['dueDate']; } /** - * Sets billingSequenceNumber + * Sets dueDate * - * @param string $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * @param string|null $dueDate The date that the the shopper's bank account is charged. * * @return self */ - public function setBillingSequenceNumber($billingSequenceNumber) + public function setDueDate($dueDate) { - $this->container['billingSequenceNumber'] = $billingSequenceNumber; + $this->container['dueDate'] = $dueDate; return $this; } diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index d0d7adb67..ebd89a84b 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -85,7 +85,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', @@ -1954,7 +1954,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -1964,7 +1964,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 93194c0d9..769e5b6cf 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -87,7 +87,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', @@ -2029,7 +2029,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -2039,7 +2039,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/Destination.php b/src/Adyen/Model/Checkout/Destination.php new file mode 100644 index 000000000..7e8ac6470 --- /dev/null +++ b/src/Adyen/Model/Checkout/Destination.php @@ -0,0 +1,466 @@ + + */ +class Destination implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Destination'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'countryCode' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'countryCode' => null, + 'postalCode' => null, + 'stateOrProvince' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'countryCode' => false, + 'postalCode' => false, + 'stateOrProvince' => 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 = [ + 'countryCode' => 'countryCode', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'countryCode' => 'setCountryCode', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'countryCode' => 'getCountryCode', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince' + ]; + + /** + * 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('countryCode', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $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 countryCode + * + * @return string|null + */ + public function getCountryCode() + { + return $this->container['countryCode']; + } + + /** + * Sets countryCode + * + * @param string|null $countryCode The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters + * + * @return self + */ + public function setCountryCode($countryCode) + { + $this->container['countryCode'] = $countryCode; + + return $this; + } + + /** + * Gets postalCode + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string|null $postalCode The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. + * + * @return self + */ + public function setPostalCode($postalCode) + { + $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 state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + $this->container['stateOrProvince'] = $stateOrProvince; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/DokuDetails.php b/src/Adyen/Model/Checkout/DokuDetails.php index 05c476688..6ec0d831b 100644 --- a/src/Adyen/Model/Checkout/DokuDetails.php +++ b/src/Adyen/Model/Checkout/DokuDetails.php @@ -44,6 +44,7 @@ class DokuDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'firstName' => 'string', 'lastName' => 'string', + 'sdkData' => 'string', 'shopperEmail' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class DokuDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'firstName' => null, 'lastName' => null, + 'sdkData' => null, 'shopperEmail' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class DokuDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'firstName' => false, 'lastName' => false, + 'sdkData' => false, 'shopperEmail' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'firstName' => 'firstName', 'lastName' => 'lastName', + 'sdkData' => 'sdkData', 'shopperEmail' => 'shopperEmail', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', + 'sdkData' => 'setSdkData', 'shopperEmail' => 'setShopperEmail', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', + 'sdkData' => 'getSdkData', 'shopperEmail' => 'getShopperEmail', 'type' => 'getType' ]; @@ -287,6 +293,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -426,6 +433,30 @@ public function setLastName($lastName) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperEmail * diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index e90481a51..c17754365 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -21,7 +21,7 @@ /** * DonationPaymentMethod Class Doc Comment * - * The type and required details of a payment method to use. + * The type and required details of a payment method to use. When `donationToken` is provided, the payment method is derived from the token and this field becomes optional. If you are [PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide), and make donations using raw card details, you must explicitly provide the payment method details. * * @package Adyen * @implements ArrayAccess @@ -47,8 +47,10 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'checkoutAttemptId' => 'string', 'fundingSource' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string', + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'cupsecureplusSmscode' => 'string', 'cvc' => 'string', @@ -56,6 +58,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -86,8 +89,10 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'checkoutAttemptId' => null, 'fundingSource' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null, + 'billingSequenceNumber' => null, 'brand' => null, 'cupsecureplusSmscode' => null, 'cvc' => null, @@ -95,6 +100,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -123,8 +129,10 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'checkoutAttemptId' => false, 'fundingSource' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false, + 'billingSequenceNumber' => false, 'brand' => false, 'cupsecureplusSmscode' => false, 'cvc' => false, @@ -132,6 +140,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -240,8 +249,10 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'fundingSource' => 'fundingSource', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type', + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'cvc' => 'cvc', @@ -249,6 +260,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -277,8 +289,10 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fundingSource' => 'setFundingSource', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType', + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'cvc' => 'setCvc', @@ -286,6 +300,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -314,8 +329,10 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fundingSource' => 'getFundingSource', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType', + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'cvc' => 'getCvc', @@ -323,6 +340,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -401,8 +419,10 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); @@ -410,6 +430,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -576,6 +597,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * @@ -624,6 +669,30 @@ public function setType($type) return $this; } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -794,6 +863,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index ecc0c164f..d3f7cc374 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -77,7 +77,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'socialSecurityNumber' => 'string', 'telephoneNumber' => 'string', @@ -610,9 +610,6 @@ public function listInvalidProperties() if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } - if ($this->container['paymentMethod'] === null) { - $invalidProperties[] = "'paymentMethod' can't be null"; - } $allowedValues = $this->getRecurringProcessingModelAllowableValues(); if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -1267,7 +1264,7 @@ public function setOrigin($origin) /** * Gets paymentMethod * - * @return \Adyen\Model\Checkout\DonationPaymentMethod + * @return \Adyen\Model\Checkout\DonationPaymentMethod|null */ public function getPaymentMethod() { @@ -1277,7 +1274,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Adyen\Model\Checkout\DonationPaymentMethod $paymentMethod paymentMethod + * @param \Adyen\Model\Checkout\DonationPaymentMethod|null $paymentMethod paymentMethod * * @return self */ @@ -1551,7 +1548,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -1561,7 +1558,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/DragonpayDetails.php b/src/Adyen/Model/Checkout/DragonpayDetails.php index 964aea11e..48347ac0c 100644 --- a/src/Adyen/Model/Checkout/DragonpayDetails.php +++ b/src/Adyen/Model/Checkout/DragonpayDetails.php @@ -43,6 +43,7 @@ class DragonpayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'issuer' => 'string', + 'sdkData' => 'string', 'shopperEmail' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class DragonpayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'issuer' => null, + 'sdkData' => null, 'shopperEmail' => null, 'type' => null ]; @@ -69,6 +71,7 @@ class DragonpayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'issuer' => false, + 'sdkData' => false, 'shopperEmail' => false, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', + 'sdkData' => 'sdkData', 'shopperEmail' => 'shopperEmail', 'type' => 'type' ]; @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', + 'sdkData' => 'setSdkData', 'shopperEmail' => 'setShopperEmail', 'type' => 'setType' ]; @@ -185,6 +190,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', + 'sdkData' => 'getSdkData', 'shopperEmail' => 'getShopperEmail', 'type' => 'getType' ]; @@ -266,6 +272,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -375,6 +382,30 @@ public function setIssuer($issuer) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperEmail * diff --git a/src/Adyen/Model/Checkout/EBankingFinlandDetails.php b/src/Adyen/Model/Checkout/EBankingFinlandDetails.php index 063a1ee5b..3b5c6960d 100644 --- a/src/Adyen/Model/Checkout/EBankingFinlandDetails.php +++ b/src/Adyen/Model/Checkout/EBankingFinlandDetails.php @@ -43,6 +43,7 @@ class EBankingFinlandDetails implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'issuer' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class EBankingFinlandDetails implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'issuer' => null, + 'sdkData' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class EBankingFinlandDetails implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'issuer' => false, + 'sdkData' => false, 'type' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -254,6 +260,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -359,6 +366,30 @@ public function setIssuer($issuer) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php index 761f21be4..b226ff073 100644 --- a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php +++ b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php @@ -44,6 +44,7 @@ class EcontextVoucherDetails implements ModelInterface, ArrayAccess, \JsonSerial 'checkoutAttemptId' => 'string', 'firstName' => 'string', 'lastName' => 'string', + 'sdkData' => 'string', 'shopperEmail' => 'string', 'telephoneNumber' => 'string', 'type' => 'string' @@ -60,6 +61,7 @@ class EcontextVoucherDetails implements ModelInterface, ArrayAccess, \JsonSerial 'checkoutAttemptId' => null, 'firstName' => null, 'lastName' => null, + 'sdkData' => null, 'shopperEmail' => null, 'telephoneNumber' => null, 'type' => null @@ -74,6 +76,7 @@ class EcontextVoucherDetails implements ModelInterface, ArrayAccess, \JsonSerial 'checkoutAttemptId' => false, 'firstName' => false, 'lastName' => false, + 'sdkData' => false, 'shopperEmail' => false, 'telephoneNumber' => false, 'type' => false @@ -168,6 +171,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'firstName' => 'firstName', 'lastName' => 'lastName', + 'sdkData' => 'sdkData', 'shopperEmail' => 'shopperEmail', 'telephoneNumber' => 'telephoneNumber', 'type' => 'type' @@ -182,6 +186,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', + 'sdkData' => 'setSdkData', 'shopperEmail' => 'setShopperEmail', 'telephoneNumber' => 'setTelephoneNumber', 'type' => 'setType' @@ -196,6 +201,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', + 'sdkData' => 'getSdkData', 'shopperEmail' => 'getShopperEmail', 'telephoneNumber' => 'getTelephoneNumber', 'type' => 'getType' @@ -281,6 +287,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -424,6 +431,30 @@ public function setLastName($lastName) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperEmail * diff --git a/src/Adyen/Model/Checkout/EftDetails.php b/src/Adyen/Model/Checkout/EftDetails.php index 881bfae07..f2f535e3b 100644 --- a/src/Adyen/Model/Checkout/EftDetails.php +++ b/src/Adyen/Model/Checkout/EftDetails.php @@ -47,6 +47,7 @@ class EftDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'ownerName' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -65,6 +66,7 @@ class EftDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'ownerName' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -81,6 +83,7 @@ class EftDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'ownerName' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'ownerName' => 'ownerName', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -193,6 +197,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'ownerName' => 'setOwnerName', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'ownerName' => 'getOwnerName', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -288,6 +294,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -489,6 +496,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/EnhancedSchemeData.php b/src/Adyen/Model/Checkout/EnhancedSchemeData.php index 84d4d70e7..bd7f471d4 100644 --- a/src/Adyen/Model/Checkout/EnhancedSchemeData.php +++ b/src/Adyen/Model/Checkout/EnhancedSchemeData.php @@ -41,7 +41,8 @@ class EnhancedSchemeData implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'airline' => '\Adyen\Model\Checkout\Airline' + 'airline' => '\Adyen\Model\Checkout\Airline', + 'levelTwoThree' => '\Adyen\Model\Checkout\LevelTwoThree' ]; /** @@ -52,7 +53,8 @@ class EnhancedSchemeData implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'airline' => null + 'airline' => null, + 'levelTwoThree' => null ]; /** @@ -61,7 +63,8 @@ class EnhancedSchemeData implements ModelInterface, ArrayAccess, \JsonSerializab * @var boolean[] */ protected static $openAPINullables = [ - 'airline' => false + 'airline' => false, + 'levelTwoThree' => false ]; /** @@ -150,7 +153,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'airline' => 'airline' + 'airline' => 'airline', + 'levelTwoThree' => 'levelTwoThree' ]; /** @@ -159,7 +163,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'airline' => 'setAirline' + 'airline' => 'setAirline', + 'levelTwoThree' => 'setLevelTwoThree' ]; /** @@ -168,7 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'airline' => 'getAirline' + 'airline' => 'getAirline', + 'levelTwoThree' => 'getLevelTwoThree' ]; /** @@ -229,6 +235,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('airline', $data ?? [], null); + $this->setIfExists('levelTwoThree', $data ?? [], null); } /** @@ -296,6 +303,30 @@ public function setAirline($airline) return $this; } + + /** + * Gets levelTwoThree + * + * @return \Adyen\Model\Checkout\LevelTwoThree|null + */ + public function getLevelTwoThree() + { + return $this->container['levelTwoThree']; + } + + /** + * Sets levelTwoThree + * + * @param \Adyen\Model\Checkout\LevelTwoThree|null $levelTwoThree levelTwoThree + * + * @return self + */ + public function setLevelTwoThree($levelTwoThree) + { + $this->container['levelTwoThree'] = $levelTwoThree; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/ExternalTokenDetails.php b/src/Adyen/Model/Checkout/ExternalTokenDetails.php new file mode 100644 index 000000000..057954f10 --- /dev/null +++ b/src/Adyen/Model/Checkout/ExternalTokenDetails.php @@ -0,0 +1,692 @@ + + */ +class ExternalTokenDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ExternalTokenDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'holderName' => 'string', + 'number' => 'string', + 'storedPaymentMethodId' => 'string', + 'subtype' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'holderName' => null, + 'number' => null, + 'storedPaymentMethodId' => null, + 'subtype' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'holderName' => false, + 'number' => false, + 'storedPaymentMethodId' => false, + 'subtype' => false, + 'type' => 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 = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'holderName' => 'holderName', + 'number' => 'number', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'subtype' => 'subtype', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'holderName' => 'setHolderName', + 'number' => 'setNumber', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'subtype' => 'setSubtype', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'holderName' => 'getHolderName', + 'number' => 'getNumber', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'subtype' => 'getSubtype', + 'type' => 'getType' + ]; + + /** + * 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 SUBTYPE_HILTON = 'hilton'; + public const TYPE_EXTERNAL_TOKEN = 'externalToken'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSubtypeAllowableValues() + { + return [ + self::SUBTYPE_HILTON, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_EXTERNAL_TOKEN, + ]; + } + /** + * 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('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('expiryMonth', $data ?? [], null); + $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('subtype', $data ?? [], null); + $this->setIfExists('type', $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['storedPaymentMethodId'] === null) { + $invalidProperties[] = "'storedPaymentMethodId' can't be null"; + } + if ($this->container['subtype'] === null) { + $invalidProperties[] = "'subtype' can't be null"; + } + $allowedValues = $this->getSubtypeAllowableValues(); + if (!is_null($this->container['subtype']) && !in_array($this->container['subtype'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'subtype', must be one of '%s'", + $this->container['subtype'], + implode("', '", $allowedValues) + ); + } + + 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) + ); + } + + 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 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) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + 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) + { + $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) + { + $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) + { + $this->container['holderName'] = $holderName; + + 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) + { + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string $storedPaymentMethodId Identifier used to fetch the token from the external service + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets subtype + * + * @return string + */ + public function getSubtype() + { + return $this->container['subtype']; + } + + /** + * Sets subtype + * + * @param string $subtype The external service from which to fetch the token. Supported only for specific companies. Contact Adyen if you want to use this feature. + * + * @return self + */ + public function setSubtype($subtype) + { + $allowedValues = $this->getSubtypeAllowableValues(); + if (!in_array($subtype, $allowedValues, true)) { + error_log( + sprintf( + "subtype: unexpected enum value '%s' - Supported values are [%s]", + $subtype, + implode(', ', $allowedValues) + ) + ); + } + $this->container['subtype'] = $subtype; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of token. Allowed value: **externalToken**. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + error_log( + sprintf( + "type: unexpected enum value '%s' - Supported values are [%s]", + $type, + implode(', ', $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/FastlaneDetails.php b/src/Adyen/Model/Checkout/FastlaneDetails.php index d8e69849e..35ae24822 100644 --- a/src/Adyen/Model/Checkout/FastlaneDetails.php +++ b/src/Adyen/Model/Checkout/FastlaneDetails.php @@ -44,6 +44,7 @@ class FastlaneDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'fastlaneData' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class FastlaneDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'fastlaneData' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class FastlaneDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'fastlaneData' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'fastlaneData' => 'fastlaneData', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fastlaneData' => 'setFastlaneData', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fastlaneData' => 'getFastlaneData', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -267,6 +273,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -402,6 +409,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php index 14c0d0265..e4f53cbc6 100644 --- a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php @@ -44,6 +44,7 @@ class GenericIssuerPaymentMethodDetails implements ModelInterface, ArrayAccess, 'checkoutAttemptId' => 'string', 'issuer' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class GenericIssuerPaymentMethodDetails implements ModelInterface, ArrayAccess, 'checkoutAttemptId' => null, 'issuer' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class GenericIssuerPaymentMethodDetails implements ModelInterface, ArrayAccess, 'checkoutAttemptId' => false, 'issuer' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -240,6 +246,7 @@ public function getModelName() public const TYPE_EPS = 'eps'; public const TYPE_ONLINE_BANKING_SK = 'onlineBanking_SK'; public const TYPE_ONLINE_BANKING_CZ = 'onlineBanking_CZ'; + public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; /** * Gets allowable values of the enum @@ -253,6 +260,7 @@ public function getTypeAllowableValues() self::TYPE_EPS, self::TYPE_ONLINE_BANKING_SK, self::TYPE_ONLINE_BANKING_CZ, + self::TYPE_ONLINEBANKING_IN, ]; } /** @@ -273,6 +281,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -408,6 +417,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index b83ef14f3..b157d7e90 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -46,6 +46,7 @@ class GooglePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'googlePayCardNetwork' => 'string', 'googlePayToken' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'threeDS2SdkVersion' => 'string', 'type' => 'string' @@ -64,6 +65,7 @@ class GooglePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'googlePayCardNetwork' => null, 'googlePayToken' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'threeDS2SdkVersion' => null, 'type' => null @@ -80,6 +82,7 @@ class GooglePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'googlePayCardNetwork' => false, 'googlePayToken' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'threeDS2SdkVersion' => false, 'type' => false @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool 'googlePayCardNetwork' => 'googlePayCardNetwork', 'googlePayToken' => 'googlePayToken', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', 'type' => 'type' @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'googlePayCardNetwork' => 'setGooglePayCardNetwork', 'googlePayToken' => 'setGooglePayToken', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', 'type' => 'setType' @@ -208,6 +213,7 @@ public function isNullableSetToNull(string $property): bool 'googlePayCardNetwork' => 'getGooglePayCardNetwork', 'googlePayToken' => 'getGooglePayToken', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', 'type' => 'getType' @@ -256,6 +262,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_GOOGLEPAY = 'googlepay'; /** @@ -268,6 +275,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -301,6 +309,7 @@ public function __construct(?array $data = null) $this->setIfExists('googlePayCardNetwork', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -501,6 +510,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/GooglePayDonations.php b/src/Adyen/Model/Checkout/GooglePayDonations.php index d4f5a9378..7c60b06e4 100644 --- a/src/Adyen/Model/Checkout/GooglePayDonations.php +++ b/src/Adyen/Model/Checkout/GooglePayDonations.php @@ -46,6 +46,7 @@ class GooglePayDonations implements ModelInterface, ArrayAccess, \JsonSerializab 'googlePayCardNetwork' => 'string', 'googlePayToken' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'threeDS2SdkVersion' => 'string', 'type' => 'string' @@ -64,6 +65,7 @@ class GooglePayDonations implements ModelInterface, ArrayAccess, \JsonSerializab 'googlePayCardNetwork' => null, 'googlePayToken' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'threeDS2SdkVersion' => null, 'type' => null @@ -80,6 +82,7 @@ class GooglePayDonations implements ModelInterface, ArrayAccess, \JsonSerializab 'googlePayCardNetwork' => false, 'googlePayToken' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'threeDS2SdkVersion' => false, 'type' => false @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool 'googlePayCardNetwork' => 'googlePayCardNetwork', 'googlePayToken' => 'googlePayToken', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', 'type' => 'type' @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'googlePayCardNetwork' => 'setGooglePayCardNetwork', 'googlePayToken' => 'setGooglePayToken', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', 'type' => 'setType' @@ -208,6 +213,7 @@ public function isNullableSetToNull(string $property): bool 'googlePayCardNetwork' => 'getGooglePayCardNetwork', 'googlePayToken' => 'getGooglePayToken', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', 'type' => 'getType' @@ -256,6 +262,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_GOOGLEPAY = 'googlepay'; /** @@ -268,6 +275,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -301,6 +309,7 @@ public function __construct(?array $data = null) $this->setIfExists('googlePayCardNetwork', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -501,6 +510,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index f06bb7197..ddc9c0571 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -44,6 +44,7 @@ class IdealDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'issuer' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class IdealDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'issuer' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class IdealDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'issuer' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -267,6 +273,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -396,6 +403,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php index 18634e040..f6bdff965 100644 --- a/src/Adyen/Model/Checkout/IdealDonations.php +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -44,6 +44,7 @@ class IdealDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'issuer' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class IdealDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'issuer' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class IdealDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'issuer' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -267,6 +273,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -396,6 +403,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/ItemDetailLine.php b/src/Adyen/Model/Checkout/ItemDetailLine.php new file mode 100644 index 000000000..425430c7c --- /dev/null +++ b/src/Adyen/Model/Checkout/ItemDetailLine.php @@ -0,0 +1,621 @@ + + */ +class ItemDetailLine implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ItemDetailLine'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'commodityCode' => 'string', + 'description' => 'string', + 'discountAmount' => 'int', + 'productCode' => 'string', + 'quantity' => 'int', + 'totalAmount' => 'int', + 'unitOfMeasure' => 'string', + 'unitPrice' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'commodityCode' => null, + 'description' => null, + 'discountAmount' => 'int64', + 'productCode' => null, + 'quantity' => 'int64', + 'totalAmount' => 'int64', + 'unitOfMeasure' => null, + 'unitPrice' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'commodityCode' => false, + 'description' => false, + 'discountAmount' => false, + 'productCode' => false, + 'quantity' => false, + 'totalAmount' => false, + 'unitOfMeasure' => false, + 'unitPrice' => 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 = [ + 'commodityCode' => 'commodityCode', + 'description' => 'description', + 'discountAmount' => 'discountAmount', + 'productCode' => 'productCode', + 'quantity' => 'quantity', + 'totalAmount' => 'totalAmount', + 'unitOfMeasure' => 'unitOfMeasure', + 'unitPrice' => 'unitPrice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'commodityCode' => 'setCommodityCode', + 'description' => 'setDescription', + 'discountAmount' => 'setDiscountAmount', + 'productCode' => 'setProductCode', + 'quantity' => 'setQuantity', + 'totalAmount' => 'setTotalAmount', + 'unitOfMeasure' => 'setUnitOfMeasure', + 'unitPrice' => 'setUnitPrice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'commodityCode' => 'getCommodityCode', + 'description' => 'getDescription', + 'discountAmount' => 'getDiscountAmount', + 'productCode' => 'getProductCode', + 'quantity' => 'getQuantity', + 'totalAmount' => 'getTotalAmount', + 'unitOfMeasure' => 'getUnitOfMeasure', + 'unitPrice' => 'getUnitPrice' + ]; + + /** + * 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('commodityCode', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('discountAmount', $data ?? [], null); + $this->setIfExists('productCode', $data ?? [], null); + $this->setIfExists('quantity', $data ?? [], null); + $this->setIfExists('totalAmount', $data ?? [], null); + $this->setIfExists('unitOfMeasure', $data ?? [], null); + $this->setIfExists('unitPrice', $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 commodityCode + * + * @return string|null + */ + public function getCommodityCode() + { + return $this->container['commodityCode']; + } + + /** + * Sets commodityCode + * + * @param string|null $commodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * + * @return self + */ + public function setCommodityCode($commodityCode) + { + $this->container['commodityCode'] = $commodityCode; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros. + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets discountAmount + * + * @return int|null + */ + public function getDiscountAmount() + { + return $this->container['discountAmount']; + } + + /** + * Sets discountAmount + * + * @param int|null $discountAmount The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return self + */ + public function setDiscountAmount($discountAmount) + { + $this->container['discountAmount'] = $discountAmount; + + return $this; + } + + /** + * Gets productCode + * + * @return string|null + */ + public function getProductCode() + { + return $this->container['productCode']; + } + + /** + * Sets productCode + * + * @param string|null $productCode The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters + * + * @return self + */ + public function setProductCode($productCode) + { + $this->container['productCode'] = $productCode; + + return $this; + } + + /** + * Gets quantity + * + * @return int|null + */ + public function getQuantity() + { + return $this->container['quantity']; + } + + /** + * Sets quantity + * + * @param int|null $quantity The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999 + * + * @return self + */ + public function setQuantity($quantity) + { + $this->container['quantity'] = $quantity; + + return $this; + } + + /** + * Gets totalAmount + * + * @return int|null + */ + public function getTotalAmount() + { + return $this->container['totalAmount']; + } + + /** + * Sets totalAmount + * + * @param int|null $totalAmount The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total. + * + * @return self + */ + public function setTotalAmount($totalAmount) + { + $this->container['totalAmount'] = $totalAmount; + + return $this; + } + + /** + * Gets unitOfMeasure + * + * @return string|null + */ + public function getUnitOfMeasure() + { + return $this->container['unitOfMeasure']; + } + + /** + * Sets unitOfMeasure + * + * @param string|null $unitOfMeasure The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters + * + * @return self + */ + public function setUnitOfMeasure($unitOfMeasure) + { + $this->container['unitOfMeasure'] = $unitOfMeasure; + + return $this; + } + + /** + * Gets unitPrice + * + * @return int|null + */ + public function getUnitPrice() + { + return $this->container['unitPrice']; + } + + /** + * Sets unitPrice + * + * @param int|null $unitPrice The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return self + */ + public function setUnitPrice($unitPrice) + { + $this->container['unitPrice'] = $unitPrice; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 986b81360..0b76c47e4 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -46,6 +46,7 @@ class KlarnaDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => 'string', 'personalDetails' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', 'type' => 'string' @@ -64,6 +65,7 @@ class KlarnaDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => null, 'personalDetails' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'subtype' => null, 'type' => null @@ -80,6 +82,7 @@ class KlarnaDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => false, 'personalDetails' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'subtype' => false, 'type' => false @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'deliveryAddress', 'personalDetails' => 'personalDetails', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', 'type' => 'type' @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'setDeliveryAddress', 'personalDetails' => 'setPersonalDetails', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', 'type' => 'setType' @@ -208,6 +213,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'getDeliveryAddress', 'personalDetails' => 'getPersonalDetails', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', 'type' => 'getType' @@ -299,6 +305,7 @@ public function __construct(?array $data = null) $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -480,6 +487,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/LevelTwoThree.php b/src/Adyen/Model/Checkout/LevelTwoThree.php new file mode 100644 index 000000000..dfb34d781 --- /dev/null +++ b/src/Adyen/Model/Checkout/LevelTwoThree.php @@ -0,0 +1,621 @@ + + */ +class LevelTwoThree implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'LevelTwoThree'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'customerReferenceNumber' => 'string', + 'destination' => '\Adyen\Model\Checkout\Destination', + 'dutyAmount' => 'int', + 'freightAmount' => 'int', + 'itemDetailLines' => '\Adyen\Model\Checkout\ItemDetailLine[]', + 'orderDate' => '\DateTime', + 'shipFromPostalCode' => 'string', + 'totalTaxAmount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'customerReferenceNumber' => null, + 'destination' => null, + 'dutyAmount' => 'int64', + 'freightAmount' => 'int64', + 'itemDetailLines' => null, + 'orderDate' => 'date', + 'shipFromPostalCode' => null, + 'totalTaxAmount' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'customerReferenceNumber' => false, + 'destination' => false, + 'dutyAmount' => false, + 'freightAmount' => false, + 'itemDetailLines' => false, + 'orderDate' => false, + 'shipFromPostalCode' => false, + 'totalTaxAmount' => 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 = [ + 'customerReferenceNumber' => 'customerReferenceNumber', + 'destination' => 'destination', + 'dutyAmount' => 'dutyAmount', + 'freightAmount' => 'freightAmount', + 'itemDetailLines' => 'itemDetailLines', + 'orderDate' => 'orderDate', + 'shipFromPostalCode' => 'shipFromPostalCode', + 'totalTaxAmount' => 'totalTaxAmount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customerReferenceNumber' => 'setCustomerReferenceNumber', + 'destination' => 'setDestination', + 'dutyAmount' => 'setDutyAmount', + 'freightAmount' => 'setFreightAmount', + 'itemDetailLines' => 'setItemDetailLines', + 'orderDate' => 'setOrderDate', + 'shipFromPostalCode' => 'setShipFromPostalCode', + 'totalTaxAmount' => 'setTotalTaxAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customerReferenceNumber' => 'getCustomerReferenceNumber', + 'destination' => 'getDestination', + 'dutyAmount' => 'getDutyAmount', + 'freightAmount' => 'getFreightAmount', + 'itemDetailLines' => 'getItemDetailLines', + 'orderDate' => 'getOrderDate', + 'shipFromPostalCode' => 'getShipFromPostalCode', + 'totalTaxAmount' => 'getTotalTaxAmount' + ]; + + /** + * 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('customerReferenceNumber', $data ?? [], null); + $this->setIfExists('destination', $data ?? [], null); + $this->setIfExists('dutyAmount', $data ?? [], null); + $this->setIfExists('freightAmount', $data ?? [], null); + $this->setIfExists('itemDetailLines', $data ?? [], null); + $this->setIfExists('orderDate', $data ?? [], null); + $this->setIfExists('shipFromPostalCode', $data ?? [], null); + $this->setIfExists('totalTaxAmount', $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 customerReferenceNumber + * + * @return string|null + */ + public function getCustomerReferenceNumber() + { + return $this->container['customerReferenceNumber']; + } + + /** + * Sets customerReferenceNumber + * + * @param string|null $customerReferenceNumber The reference number to identify the customer and their order. * Format: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * + * @return self + */ + public function setCustomerReferenceNumber($customerReferenceNumber) + { + $this->container['customerReferenceNumber'] = $customerReferenceNumber; + + return $this; + } + + /** + * Gets destination + * + * @return \Adyen\Model\Checkout\Destination|null + */ + public function getDestination() + { + return $this->container['destination']; + } + + /** + * Sets destination + * + * @param \Adyen\Model\Checkout\Destination|null $destination destination + * + * @return self + */ + public function setDestination($destination) + { + $this->container['destination'] = $destination; + + return $this; + } + + /** + * Gets dutyAmount + * + * @return int|null + */ + public function getDutyAmount() + { + return $this->container['dutyAmount']; + } + + /** + * Sets dutyAmount + * + * @param int|null $dutyAmount The duty tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return self + */ + public function setDutyAmount($dutyAmount) + { + $this->container['dutyAmount'] = $dutyAmount; + + return $this; + } + + /** + * Gets freightAmount + * + * @return int|null + */ + public function getFreightAmount() + { + return $this->container['freightAmount']; + } + + /** + * Sets freightAmount + * + * @param int|null $freightAmount The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 + * + * @return self + */ + public function setFreightAmount($freightAmount) + { + $this->container['freightAmount'] = $freightAmount; + + return $this; + } + + /** + * Gets itemDetailLines + * + * @return \Adyen\Model\Checkout\ItemDetailLine[]|null + */ + public function getItemDetailLines() + { + return $this->container['itemDetailLines']; + } + + /** + * Sets itemDetailLines + * + * @param \Adyen\Model\Checkout\ItemDetailLine[]|null $itemDetailLines The list of item detail lines. + * + * @return self + */ + public function setItemDetailLines($itemDetailLines) + { + $this->container['itemDetailLines'] = $itemDetailLines; + + return $this; + } + + /** + * Gets orderDate + * + * @return \DateTime|null + */ + public function getOrderDate() + { + return $this->container['orderDate']; + } + + /** + * Sets orderDate + * + * @param \DateTime|null $orderDate The date of the order. * Min Length: 10 characters * Max Length: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd + * + * @return self + */ + public function setOrderDate($orderDate) + { + $this->container['orderDate'] = $orderDate; + + return $this; + } + + /** + * Gets shipFromPostalCode + * + * @return string|null + */ + public function getShipFromPostalCode() + { + return $this->container['shipFromPostalCode']; + } + + /** + * Sets shipFromPostalCode + * + * @param string|null $shipFromPostalCode The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. + * + * @return self + */ + public function setShipFromPostalCode($shipFromPostalCode) + { + $this->container['shipFromPostalCode'] = $shipFromPostalCode; + + return $this; + } + + /** + * Gets totalTaxAmount + * + * @return int|null + */ + public function getTotalTaxAmount() + { + return $this->container['totalTaxAmount']; + } + + /** + * Sets totalTaxAmount + * + * @param int|null $totalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 * For L2 data: must not be all zeroes. * For L3 data: can be zero. + * + * @return self + */ + public function setTotalTaxAmount($totalTaxAmount) + { + $this->container['totalTaxAmount'] = $totalTaxAmount; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/LineItem.php b/src/Adyen/Model/Checkout/LineItem.php index 505aa23b4..8b3baf182 100644 --- a/src/Adyen/Model/Checkout/LineItem.php +++ b/src/Adyen/Model/Checkout/LineItem.php @@ -405,7 +405,7 @@ public function getAmountExcludingTax() /** * Sets amountExcludingTax * - * @param int|null $amountExcludingTax Item amount excluding the tax, in minor units. + * @param int|null $amountExcludingTax Item amount excluding the tax, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units). * * @return self */ @@ -429,7 +429,7 @@ public function getAmountIncludingTax() /** * Sets amountIncludingTax * - * @param int|null $amountIncludingTax Item amount including the tax, in minor units. + * @param int|null $amountIncludingTax Item amount including the tax, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units). * * @return self */ @@ -765,7 +765,7 @@ public function getTaxAmount() /** * Sets taxAmount * - * @param int|null $taxAmount Tax amount, in minor units. + * @param int|null $taxAmount Tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units). * * @return self */ @@ -789,7 +789,7 @@ public function getTaxPercentage() /** * Sets taxPercentage * - * @param int|null $taxPercentage Tax percentage, in minor units. + * @param int|null $taxPercentage Tax percentage, represented as a [basis point](https://en.wikipedia.org/wiki/Basis_point) integer. For example: - **530** for 5.3% (five point three percent) - **2100** for 21% (twenty-one percent) * * @return self */ diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index 2c602899d..af216cf03 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -44,6 +44,7 @@ class MasterpassDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'checkoutAttemptId' => 'string', 'fundingSource' => 'string', 'masterpassTransactionId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -58,6 +59,7 @@ class MasterpassDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'checkoutAttemptId' => null, 'fundingSource' => null, 'masterpassTransactionId' => null, + 'sdkData' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class MasterpassDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'checkoutAttemptId' => false, 'fundingSource' => false, 'masterpassTransactionId' => false, + 'sdkData' => false, 'type' => false ]; @@ -162,6 +165,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'fundingSource' => 'fundingSource', 'masterpassTransactionId' => 'masterpassTransactionId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -174,6 +178,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fundingSource' => 'setFundingSource', 'masterpassTransactionId' => 'setMasterpassTransactionId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -186,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fundingSource' => 'getFundingSource', 'masterpassTransactionId' => 'getMasterpassTransactionId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -232,6 +238,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_MASTERPASS = 'masterpass'; /** @@ -244,6 +251,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -275,6 +283,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -423,6 +432,30 @@ public function setMasterpassTransactionId($masterpassTransactionId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index 00e16ba76..36162b567 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -42,6 +42,7 @@ class MbwayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'sdkData' => 'string', 'shopperEmail' => 'string', 'telephoneNumber' => 'string', 'type' => 'string' @@ -56,6 +57,7 @@ class MbwayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'sdkData' => null, 'shopperEmail' => null, 'telephoneNumber' => null, 'type' => null @@ -68,6 +70,7 @@ class MbwayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'sdkData' => false, 'shopperEmail' => false, 'telephoneNumber' => false, 'type' => false @@ -160,6 +163,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'sdkData' => 'sdkData', 'shopperEmail' => 'shopperEmail', 'telephoneNumber' => 'telephoneNumber', 'type' => 'type' @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'sdkData' => 'setSdkData', 'shopperEmail' => 'setShopperEmail', 'telephoneNumber' => 'setTelephoneNumber', 'type' => 'setType' @@ -184,6 +189,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'sdkData' => 'getSdkData', 'shopperEmail' => 'getShopperEmail', 'telephoneNumber' => 'getTelephoneNumber', 'type' => 'getType' @@ -259,6 +265,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -345,6 +352,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperEmail * @@ -358,7 +389,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -382,7 +413,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MobilePayDetails.php b/src/Adyen/Model/Checkout/MobilePayDetails.php index 8908c5e7d..d709a1eea 100644 --- a/src/Adyen/Model/Checkout/MobilePayDetails.php +++ b/src/Adyen/Model/Checkout/MobilePayDetails.php @@ -42,6 +42,7 @@ class MobilePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -54,6 +55,7 @@ class MobilePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'sdkData' => null, 'type' => null ]; @@ -64,6 +66,7 @@ class MobilePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'sdkData' => false, 'type' => false ]; @@ -154,6 +157,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -164,6 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -174,6 +179,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -247,6 +253,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -325,6 +332,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/MolPayDetails.php b/src/Adyen/Model/Checkout/MolPayDetails.php index 93810c25c..ac10d34e4 100644 --- a/src/Adyen/Model/Checkout/MolPayDetails.php +++ b/src/Adyen/Model/Checkout/MolPayDetails.php @@ -43,6 +43,7 @@ class MolPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'issuer' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class MolPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'issuer' => null, + 'sdkData' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class MolPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'issuer' => false, + 'sdkData' => false, 'type' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -256,6 +262,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -364,6 +371,30 @@ public function setIssuer($issuer) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index c9a8102b9..1e8e6df61 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index 67af2af2e..31c77d165 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -46,6 +46,7 @@ class OpenInvoiceDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'deliveryAddress' => 'string', 'personalDetails' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -63,6 +64,7 @@ class OpenInvoiceDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'deliveryAddress' => null, 'personalDetails' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -78,6 +80,7 @@ class OpenInvoiceDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'deliveryAddress' => false, 'personalDetails' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'deliveryAddress', 'personalDetails' => 'personalDetails', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -188,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'setDeliveryAddress', 'personalDetails' => 'setPersonalDetails', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -203,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'getDeliveryAddress', 'personalDetails' => 'getPersonalDetails', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -285,6 +291,7 @@ public function __construct(?array $data = null) $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -462,6 +469,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php b/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php index e633e8c13..de9aef08c 100644 --- a/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php @@ -43,6 +43,7 @@ class PayByBankAISDirectDebitDetails implements ModelInterface, ArrayAccess, \Js protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class PayByBankAISDirectDebitDetails implements ModelInterface, ArrayAccess, \Js protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -69,6 +71,7 @@ class PayByBankAISDirectDebitDetails implements ModelInterface, ArrayAccess, \Js protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -185,6 +190,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -260,6 +266,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -368,6 +375,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PayByBankDetails.php b/src/Adyen/Model/Checkout/PayByBankDetails.php index c3d4e1fcc..c462c8ed8 100644 --- a/src/Adyen/Model/Checkout/PayByBankDetails.php +++ b/src/Adyen/Model/Checkout/PayByBankDetails.php @@ -43,6 +43,7 @@ class PayByBankDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'issuer' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class PayByBankDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'issuer' => null, + 'sdkData' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class PayByBankDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'issuer' => false, + 'sdkData' => false, 'type' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'issuer' => 'issuer', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'issuer' => 'setIssuer', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'issuer' => 'getIssuer', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -254,6 +260,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -359,6 +366,30 @@ public function setIssuer($issuer) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index ac61c8a12..c04206c6a 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -47,6 +47,7 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'payerID' => 'string', 'payerSelected' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', 'type' => 'string' @@ -66,6 +67,7 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'payerID' => null, 'payerSelected' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'subtype' => null, 'type' => null @@ -83,6 +85,7 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'payerID' => false, 'payerSelected' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'subtype' => false, 'type' => false @@ -180,6 +183,7 @@ public function isNullableSetToNull(string $property): bool 'payerID' => 'payerID', 'payerSelected' => 'payerSelected', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', 'type' => 'type' @@ -197,6 +201,7 @@ public function isNullableSetToNull(string $property): bool 'payerID' => 'setPayerID', 'payerSelected' => 'setPayerSelected', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', 'type' => 'setType' @@ -214,6 +219,7 @@ public function isNullableSetToNull(string $property): bool 'payerID' => 'getPayerID', 'payerSelected' => 'getPayerSelected', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', 'type' => 'getType' @@ -310,6 +316,7 @@ public function __construct(?array $data = null) $this->setIfExists('payerID', $data ?? [], null); $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -524,6 +531,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PayPayDetails.php b/src/Adyen/Model/Checkout/PayPayDetails.php index dba9f3979..acb15c6d1 100644 --- a/src/Adyen/Model/Checkout/PayPayDetails.php +++ b/src/Adyen/Model/Checkout/PayPayDetails.php @@ -43,6 +43,7 @@ class PayPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class PayPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -69,6 +71,7 @@ class PayPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -185,6 +190,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -260,6 +266,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -365,6 +372,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PayToDetails.php b/src/Adyen/Model/Checkout/PayToDetails.php index 4f53c21ba..16d926a93 100644 --- a/src/Adyen/Model/Checkout/PayToDetails.php +++ b/src/Adyen/Model/Checkout/PayToDetails.php @@ -43,6 +43,7 @@ class PayToDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'shopperAccountIdentifier' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' @@ -58,6 +59,7 @@ class PayToDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'shopperAccountIdentifier' => null, 'storedPaymentMethodId' => null, 'type' => null @@ -71,6 +73,7 @@ class PayToDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'shopperAccountIdentifier' => false, 'storedPaymentMethodId' => false, 'type' => false @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'shopperAccountIdentifier' => 'shopperAccountIdentifier', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'shopperAccountIdentifier' => 'setShopperAccountIdentifier', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' @@ -190,6 +195,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'shopperAccountIdentifier' => 'getShopperAccountIdentifier', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' @@ -266,6 +272,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperAccountIdentifier', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -372,6 +379,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperAccountIdentifier * diff --git a/src/Adyen/Model/Checkout/PayToPaymentMethod.php b/src/Adyen/Model/Checkout/PayToPaymentMethod.php index efd654a37..b2ff170fa 100644 --- a/src/Adyen/Model/Checkout/PayToPaymentMethod.php +++ b/src/Adyen/Model/Checkout/PayToPaymentMethod.php @@ -14,7 +14,6 @@ namespace Adyen\Model\Checkout; - use Adyen\Model\Checkout\ObjectSerializer; /** diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index 3a4fda04d..a35396780 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -43,6 +43,7 @@ class PayUUpiDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'shopperNotificationReference' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string', @@ -59,6 +60,7 @@ class PayUUpiDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'shopperNotificationReference' => null, 'storedPaymentMethodId' => null, 'type' => null, @@ -73,6 +75,7 @@ class PayUUpiDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'shopperNotificationReference' => false, 'storedPaymentMethodId' => false, 'type' => false, @@ -167,6 +170,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'shopperNotificationReference' => 'shopperNotificationReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type', @@ -181,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'shopperNotificationReference' => 'setShopperNotificationReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType', @@ -195,6 +200,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'shopperNotificationReference' => 'getShopperNotificationReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType', @@ -272,6 +278,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -382,6 +389,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperNotificationReference * diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index 802cdd773..3b2aebed9 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -45,6 +45,7 @@ class PayWithGoogleDetails implements ModelInterface, ArrayAccess, \JsonSerializ 'fundingSource' => 'string', 'googlePayToken' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'threeDS2SdkVersion' => 'string', 'type' => 'string' @@ -62,6 +63,7 @@ class PayWithGoogleDetails implements ModelInterface, ArrayAccess, \JsonSerializ 'fundingSource' => null, 'googlePayToken' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'threeDS2SdkVersion' => null, 'type' => null @@ -77,6 +79,7 @@ class PayWithGoogleDetails implements ModelInterface, ArrayAccess, \JsonSerializ 'fundingSource' => false, 'googlePayToken' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'threeDS2SdkVersion' => false, 'type' => false @@ -172,6 +175,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'fundingSource', 'googlePayToken' => 'googlePayToken', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', 'type' => 'type' @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'setFundingSource', 'googlePayToken' => 'setGooglePayToken', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', 'type' => 'setType' @@ -202,6 +207,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'getFundingSource', 'googlePayToken' => 'getGooglePayToken', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', 'type' => 'getType' @@ -250,6 +256,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_PAYWITHGOOGLE = 'paywithgoogle'; /** @@ -262,6 +269,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -294,6 +302,7 @@ public function __construct(?array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -470,6 +479,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php index 2003d1b40..80d161099 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php @@ -45,6 +45,7 @@ class PayWithGoogleDonations implements ModelInterface, ArrayAccess, \JsonSerial 'fundingSource' => 'string', 'googlePayToken' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'threeDS2SdkVersion' => 'string', 'type' => 'string' @@ -62,6 +63,7 @@ class PayWithGoogleDonations implements ModelInterface, ArrayAccess, \JsonSerial 'fundingSource' => null, 'googlePayToken' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'threeDS2SdkVersion' => null, 'type' => null @@ -77,6 +79,7 @@ class PayWithGoogleDonations implements ModelInterface, ArrayAccess, \JsonSerial 'fundingSource' => false, 'googlePayToken' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'threeDS2SdkVersion' => false, 'type' => false @@ -172,6 +175,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'fundingSource', 'googlePayToken' => 'googlePayToken', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', 'type' => 'type' @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'setFundingSource', 'googlePayToken' => 'setGooglePayToken', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', 'type' => 'setType' @@ -202,6 +207,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'getFundingSource', 'googlePayToken' => 'getGooglePayToken', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', 'type' => 'getType' @@ -250,6 +256,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_PAYWITHGOOGLE = 'paywithgoogle'; /** @@ -262,6 +269,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -294,6 +302,7 @@ public function __construct(?array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -470,6 +479,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 86cec7623..f4cb56f5f 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -42,6 +42,7 @@ class PaymentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -54,6 +55,7 @@ class PaymentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'sdkData' => null, 'type' => null ]; @@ -64,6 +66,7 @@ class PaymentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'sdkData' => false, 'type' => false ]; @@ -154,6 +157,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -164,6 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -174,6 +179,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -220,10 +226,12 @@ public function getModelName() public const TYPE_ALIPAY = 'alipay'; public const TYPE_MULTIBANCO = 'multibanco'; + public const TYPE_BANK_TRANSFER = 'bankTransfer'; public const TYPE_BANK_TRANSFER_IBAN = 'bankTransfer_IBAN'; public const TYPE_PAYBRIGHT = 'paybright'; public const TYPE_PAYNOW = 'paynow'; public const TYPE_AFFIRM_POS = 'affirm_pos'; + public const TYPE_IRIS = 'iris'; public const TYPE_TRUSTLY = 'trustly'; public const TYPE_TRUSTLYVECTOR = 'trustlyvector'; public const TYPE_ONEY = 'oney'; @@ -244,7 +252,6 @@ public function getModelName() public const TYPE_WALLET_IN = 'wallet_IN'; public const TYPE_PAYU_IN_CASHCARD = 'payu_IN_cashcard'; public const TYPE_PAYU_IN_NB = 'payu_IN_nb'; - public const TYPE_UPI_QR = 'upi_qr'; public const TYPE_PAYTM = 'paytm'; public const TYPE_MOLPAY_EBANKING_VN = 'molpay_ebanking_VN'; public const TYPE_MOLPAY_EBANKING_MY = 'molpay_ebanking_MY'; @@ -264,7 +271,6 @@ public function getModelName() public const TYPE_KONBINI = 'konbini'; public const TYPE_DIRECT_EBANKING = 'directEbanking'; public const TYPE_BOLETOBANCARIO = 'boletobancario'; - public const TYPE_NETELLER = 'neteller'; public const TYPE_CASHTICKET = 'cashticket'; public const TYPE_IKANO = 'ikano'; public const TYPE_KARENMILLEN = 'karenmillen'; @@ -277,10 +283,8 @@ public function getModelName() public const TYPE_OMANNET = 'omannet'; public const TYPE_GOPAY_WALLET = 'gopay_wallet'; public const TYPE_KCP_NAVERPAY = 'kcp_naverpay'; - public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; public const TYPE_FAWRY = 'fawry'; public const TYPE_ATOME = 'atome'; - public const TYPE_MONEYBOOKERS = 'moneybookers'; public const TYPE_NAPS = 'naps'; public const TYPE_NORDEA = 'nordea'; public const TYPE_BOLETOBANCARIO_BRADESCO = 'boletobancario_bradesco'; @@ -318,10 +322,12 @@ public function getTypeAllowableValues() return [ self::TYPE_ALIPAY, self::TYPE_MULTIBANCO, + self::TYPE_BANK_TRANSFER, self::TYPE_BANK_TRANSFER_IBAN, self::TYPE_PAYBRIGHT, self::TYPE_PAYNOW, self::TYPE_AFFIRM_POS, + self::TYPE_IRIS, self::TYPE_TRUSTLY, self::TYPE_TRUSTLYVECTOR, self::TYPE_ONEY, @@ -342,7 +348,6 @@ public function getTypeAllowableValues() self::TYPE_WALLET_IN, self::TYPE_PAYU_IN_CASHCARD, self::TYPE_PAYU_IN_NB, - self::TYPE_UPI_QR, self::TYPE_PAYTM, self::TYPE_MOLPAY_EBANKING_VN, self::TYPE_MOLPAY_EBANKING_MY, @@ -362,7 +367,6 @@ public function getTypeAllowableValues() self::TYPE_KONBINI, self::TYPE_DIRECT_EBANKING, self::TYPE_BOLETOBANCARIO, - self::TYPE_NETELLER, self::TYPE_CASHTICKET, self::TYPE_IKANO, self::TYPE_KARENMILLEN, @@ -375,10 +379,8 @@ public function getTypeAllowableValues() self::TYPE_OMANNET, self::TYPE_GOPAY_WALLET, self::TYPE_KCP_NAVERPAY, - self::TYPE_ONLINEBANKING_IN, self::TYPE_FAWRY, self::TYPE_ATOME, - self::TYPE_MONEYBOOKERS, self::TYPE_NAPS, self::TYPE_NORDEA, self::TYPE_BOLETOBANCARIO_BRADESCO, @@ -423,6 +425,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -501,6 +504,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php index 3b8a8d1d5..e01ec29b6 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php @@ -49,6 +49,7 @@ class PaymentDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'merchantReference' => 'string', 'order' => '\Adyen\Model\Checkout\CheckoutOrderResponse', 'paymentMethod' => '\Adyen\Model\Checkout\ResponsePaymentMethod', + 'paymentValidations' => '\Adyen\Model\Checkout\PaymentValidationsResponse', 'pspReference' => 'string', 'refusalReason' => 'string', 'refusalReasonCode' => 'string', @@ -75,6 +76,7 @@ class PaymentDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'merchantReference' => null, 'order' => null, 'paymentMethod' => null, + 'paymentValidations' => null, 'pspReference' => null, 'refusalReason' => null, 'refusalReasonCode' => null, @@ -99,6 +101,7 @@ class PaymentDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'merchantReference' => false, 'order' => false, 'paymentMethod' => false, + 'paymentValidations' => false, 'pspReference' => false, 'refusalReason' => false, 'refusalReasonCode' => false, @@ -203,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'merchantReference', 'order' => 'order', 'paymentMethod' => 'paymentMethod', + 'paymentValidations' => 'paymentValidations', 'pspReference' => 'pspReference', 'refusalReason' => 'refusalReason', 'refusalReasonCode' => 'refusalReasonCode', @@ -227,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'setMerchantReference', 'order' => 'setOrder', 'paymentMethod' => 'setPaymentMethod', + 'paymentValidations' => 'setPaymentValidations', 'pspReference' => 'setPspReference', 'refusalReason' => 'setRefusalReason', 'refusalReasonCode' => 'setRefusalReasonCode', @@ -251,6 +256,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'getMerchantReference', 'order' => 'getOrder', 'paymentMethod' => 'getPaymentMethod', + 'paymentValidations' => 'getPaymentValidations', 'pspReference' => 'getPspReference', 'refusalReason' => 'getRefusalReason', 'refusalReasonCode' => 'getRefusalReasonCode', @@ -364,6 +370,7 @@ public function __construct(?array $data = null) $this->setIfExists('merchantReference', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('paymentValidations', $data ?? [], null); $this->setIfExists('pspReference', $data ?? [], null); $this->setIfExists('refusalReason', $data ?? [], null); $this->setIfExists('refusalReasonCode', $data ?? [], null); @@ -617,6 +624,30 @@ public function setPaymentMethod($paymentMethod) return $this; } + /** + * Gets paymentValidations + * + * @return \Adyen\Model\Checkout\PaymentValidationsResponse|null + */ + public function getPaymentValidations() + { + return $this->container['paymentValidations']; + } + + /** + * Sets paymentValidations + * + * @param \Adyen\Model\Checkout\PaymentValidationsResponse|null $paymentValidations paymentValidations + * + * @return self + */ + public function setPaymentValidations($paymentValidations) + { + $this->container['paymentValidations'] = $paymentValidations; + + return $this; + } + /** * Gets pspReference * diff --git a/src/Adyen/Model/Checkout/PaymentMethod.php b/src/Adyen/Model/Checkout/PaymentMethod.php index 6bab63ae3..0f9834044 100644 --- a/src/Adyen/Model/Checkout/PaymentMethod.php +++ b/src/Adyen/Model/Checkout/PaymentMethod.php @@ -274,6 +274,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; /** * Gets allowable values of the enum @@ -285,6 +286,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index 0b706c498..570ed0c8c 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -852,7 +852,7 @@ public function getStoreFiltrationMode() /** * Sets storeFiltrationMode * - * @param string|null $storeFiltrationMode Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. + * @param string|null $storeFiltrationMode Specifies how payment methods should be filtered based on the `store` parameter: - **exclusive**: Only payment methods belonging to the specified `store` are returned. - **inclusive**: Payment methods from the `store` and those not associated with any other store are returned. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 605242e19..3c9daf6e6 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -85,6 +85,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'orderReference' => 'string', 'origin' => 'string', 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutPaymentMethod', + 'paymentValidations' => '\Adyen\Model\Checkout\PaymentValidations', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -100,7 +101,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', @@ -167,6 +168,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'orderReference' => null, 'origin' => null, 'paymentMethod' => null, + 'paymentValidations' => null, 'platformChargebackLogic' => null, 'recurringExpiry' => null, 'recurringFrequency' => null, @@ -247,6 +249,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'orderReference' => false, 'origin' => false, 'paymentMethod' => false, + 'paymentValidations' => false, 'platformChargebackLogic' => false, 'recurringExpiry' => false, 'recurringFrequency' => false, @@ -407,6 +410,7 @@ public function isNullableSetToNull(string $property): bool 'orderReference' => 'orderReference', 'origin' => 'origin', 'paymentMethod' => 'paymentMethod', + 'paymentValidations' => 'paymentValidations', 'platformChargebackLogic' => 'platformChargebackLogic', 'recurringExpiry' => 'recurringExpiry', 'recurringFrequency' => 'recurringFrequency', @@ -487,6 +491,7 @@ public function isNullableSetToNull(string $property): bool 'orderReference' => 'setOrderReference', 'origin' => 'setOrigin', 'paymentMethod' => 'setPaymentMethod', + 'paymentValidations' => 'setPaymentValidations', 'platformChargebackLogic' => 'setPlatformChargebackLogic', 'recurringExpiry' => 'setRecurringExpiry', 'recurringFrequency' => 'setRecurringFrequency', @@ -567,6 +572,7 @@ public function isNullableSetToNull(string $property): bool 'orderReference' => 'getOrderReference', 'origin' => 'getOrigin', 'paymentMethod' => 'getPaymentMethod', + 'paymentValidations' => 'getPaymentValidations', 'platformChargebackLogic' => 'getPlatformChargebackLogic', 'recurringExpiry' => 'getRecurringExpiry', 'recurringFrequency' => 'getRecurringFrequency', @@ -778,6 +784,7 @@ public function __construct(?array $data = null) $this->setIfExists('orderReference', $data ?? [], null); $this->setIfExists('origin', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('paymentValidations', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); $this->setIfExists('recurringFrequency', $data ?? [], null); @@ -1725,7 +1732,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @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 array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If this parameter is left empty, not provided, or not applicable (in case of cross-border transactions), then **shopperStatement** is used. Currently, `localizedShopperStatement` is only supported for payments with Visa, Mastercard, JCB, Diners, and Discover. **Supported characters**: Hiragana, Katakana, Kanji, and alphanumeric. * * @return self */ @@ -2000,6 +2007,30 @@ public function setPaymentMethod($paymentMethod) return $this; } + /** + * Gets paymentValidations + * + * @return \Adyen\Model\Checkout\PaymentValidations|null + */ + public function getPaymentValidations() + { + return $this->container['paymentValidations']; + } + + /** + * Sets paymentValidations + * + * @param \Adyen\Model\Checkout\PaymentValidations|null $paymentValidations paymentValidations + * + * @return self + */ + public function setPaymentValidations($paymentValidations) + { + $this->container['paymentValidations'] = $paymentValidations; + + return $this; + } + /** * Gets platformChargebackLogic * @@ -2383,7 +2414,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -2393,7 +2424,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentResponse.php b/src/Adyen/Model/Checkout/PaymentResponse.php index a7655e357..9832d1d97 100644 --- a/src/Adyen/Model/Checkout/PaymentResponse.php +++ b/src/Adyen/Model/Checkout/PaymentResponse.php @@ -49,6 +49,7 @@ class PaymentResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'merchantReference' => 'string', 'order' => '\Adyen\Model\Checkout\CheckoutOrderResponse', 'paymentMethod' => '\Adyen\Model\Checkout\ResponsePaymentMethod', + 'paymentValidations' => '\Adyen\Model\Checkout\PaymentValidationsResponse', 'pspReference' => 'string', 'refusalReason' => 'string', 'refusalReasonCode' => 'string', @@ -74,6 +75,7 @@ class PaymentResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'merchantReference' => null, 'order' => null, 'paymentMethod' => null, + 'paymentValidations' => null, 'pspReference' => null, 'refusalReason' => null, 'refusalReasonCode' => null, @@ -97,6 +99,7 @@ class PaymentResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'merchantReference' => false, 'order' => false, 'paymentMethod' => false, + 'paymentValidations' => false, 'pspReference' => false, 'refusalReason' => false, 'refusalReasonCode' => false, @@ -200,6 +203,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'merchantReference', 'order' => 'order', 'paymentMethod' => 'paymentMethod', + 'paymentValidations' => 'paymentValidations', 'pspReference' => 'pspReference', 'refusalReason' => 'refusalReason', 'refusalReasonCode' => 'refusalReasonCode', @@ -223,6 +227,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'setMerchantReference', 'order' => 'setOrder', 'paymentMethod' => 'setPaymentMethod', + 'paymentValidations' => 'setPaymentValidations', 'pspReference' => 'setPspReference', 'refusalReason' => 'setRefusalReason', 'refusalReasonCode' => 'setRefusalReasonCode', @@ -246,6 +251,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'getMerchantReference', 'order' => 'getOrder', 'paymentMethod' => 'getPaymentMethod', + 'paymentValidations' => 'getPaymentValidations', 'pspReference' => 'getPspReference', 'refusalReason' => 'getRefusalReason', 'refusalReasonCode' => 'getRefusalReasonCode', @@ -358,6 +364,7 @@ public function __construct(?array $data = null) $this->setIfExists('merchantReference', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('paymentValidations', $data ?? [], null); $this->setIfExists('pspReference', $data ?? [], null); $this->setIfExists('refusalReason', $data ?? [], null); $this->setIfExists('refusalReasonCode', $data ?? [], null); @@ -610,6 +617,30 @@ public function setPaymentMethod($paymentMethod) return $this; } + /** + * Gets paymentValidations + * + * @return \Adyen\Model\Checkout\PaymentValidationsResponse|null + */ + public function getPaymentValidations() + { + return $this->container['paymentValidations']; + } + + /** + * Sets paymentValidations + * + * @param \Adyen\Model\Checkout\PaymentValidationsResponse|null $paymentValidations paymentValidations + * + * @return self + */ + public function setPaymentValidations($paymentValidations) + { + $this->container['paymentValidations'] = $paymentValidations; + + return $this; + } + /** * Gets pspReference * diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index 5e3ace006..10a7a036a 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -48,8 +48,10 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'type' => 'string', 'url' => 'string', 'accountNumber' => 'string', + 'bankCode' => 'string', 'beneficiary' => 'string', 'bic' => 'string', + 'branchCode' => 'string', 'downloadUrl' => 'string', 'iban' => 'string', 'reference' => 'string', @@ -93,8 +95,10 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'type' => null, 'url' => null, 'accountNumber' => null, + 'bankCode' => null, 'beneficiary' => null, 'bic' => null, + 'branchCode' => null, 'downloadUrl' => null, 'iban' => null, 'reference' => null, @@ -136,8 +140,10 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'type' => false, 'url' => false, 'accountNumber' => false, + 'bankCode' => false, 'beneficiary' => false, 'bic' => false, + 'branchCode' => false, 'downloadUrl' => false, 'iban' => false, 'reference' => false, @@ -259,8 +265,10 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'url' => 'url', 'accountNumber' => 'accountNumber', + 'bankCode' => 'bankCode', 'beneficiary' => 'beneficiary', 'bic' => 'bic', + 'branchCode' => 'branchCode', 'downloadUrl' => 'downloadUrl', 'iban' => 'iban', 'reference' => 'reference', @@ -302,8 +310,10 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'url' => 'setUrl', 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', 'beneficiary' => 'setBeneficiary', 'bic' => 'setBic', + 'branchCode' => 'setBranchCode', 'downloadUrl' => 'setDownloadUrl', 'iban' => 'setIban', 'reference' => 'setReference', @@ -345,8 +355,10 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'url' => 'getUrl', 'accountNumber' => 'getAccountNumber', + 'bankCode' => 'getBankCode', 'beneficiary' => 'getBeneficiary', 'bic' => 'getBic', + 'branchCode' => 'getBranchCode', 'downloadUrl' => 'getDownloadUrl', 'iban' => 'getIban', 'reference' => 'getReference', @@ -438,8 +450,10 @@ public function __construct(?array $data = null) $this->setIfExists('type', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('beneficiary', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('branchCode', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); @@ -636,6 +650,30 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets bankCode + * + * @return string|null + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string|null $bankCode The bank code of the bank transfer. + * + * @return self + */ + public function setBankCode($bankCode) + { + $this->container['bankCode'] = $bankCode; + + return $this; + } + /** * Gets beneficiary * @@ -684,6 +722,30 @@ public function setBic($bic) return $this; } + /** + * Gets branchCode + * + * @return string|null + */ + public function getBranchCode() + { + return $this->container['branchCode']; + } + + /** + * Sets branchCode + * + * @param string|null $branchCode The branch code of the bank transfer. + * + * @return self + */ + public function setBranchCode($branchCode) + { + $this->container['branchCode'] = $branchCode; + + return $this; + } + /** * Gets downloadUrl * diff --git a/src/Adyen/Model/Checkout/PaymentValidations.php b/src/Adyen/Model/Checkout/PaymentValidations.php new file mode 100644 index 000000000..f3a565b26 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidations.php @@ -0,0 +1,404 @@ + + */ +class PaymentValidations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => '\Adyen\Model\Checkout\PaymentValidationsNameRequest' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'name' => 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 = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * 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('name', $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 name + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameRequest|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameRequest|null $name name + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsNameRequest.php b/src/Adyen/Model/Checkout/PaymentValidationsNameRequest.php new file mode 100644 index 000000000..6f1d7446d --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameRequest.php @@ -0,0 +1,407 @@ + + */ +class PaymentValidationsNameRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'status' => 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 = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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('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 = []; + + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' 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 status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Set to **requested** to request a [name validation](https://docs.adyen.com/payment-methods/cards/name-validation) to verify if the cardholder name provided by the shopper matches the cardholder name on file at the issuing bank. + * + * @return self + */ + public function setStatus($status) + { + $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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsNameResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsNameResponse.php new file mode 100644 index 000000000..d525ed53b --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameResponse.php @@ -0,0 +1,501 @@ + + */ +class PaymentValidationsNameResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rawResponse' => '\Adyen\Model\Checkout\PaymentValidationsNameResultRawResponse', + 'result' => '\Adyen\Model\Checkout\PaymentValidationsNameResultResponse', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rawResponse' => null, + 'result' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'rawResponse' => false, + 'result' => false, + 'status' => 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 = [ + 'rawResponse' => 'rawResponse', + 'result' => 'result', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rawResponse' => 'setRawResponse', + 'result' => 'setResult', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rawResponse' => 'getRawResponse', + 'result' => 'getResult', + '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; + } + + public const STATUS_NOT_PERFORMED = 'notPerformed'; + public const STATUS_NOT_SUPPORTED = 'notSupported'; + public const STATUS_PERFORMED = 'performed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_NOT_PERFORMED, + self::STATUS_NOT_SUPPORTED, + self::STATUS_PERFORMED, + ]; + } + /** + * 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('rawResponse', $data ?? [], null); + $this->setIfExists('result', $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 = []; + + $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) + ); + } + + 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 rawResponse + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameResultRawResponse|null + */ + public function getRawResponse() + { + return $this->container['rawResponse']; + } + + /** + * Sets rawResponse + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameResultRawResponse|null $rawResponse rawResponse + * + * @return self + */ + public function setRawResponse($rawResponse) + { + $this->container['rawResponse'] = $rawResponse; + + return $this; + } + + /** + * Gets result + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameResultResponse|null + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameResultResponse|null $result result + * + * @return self + */ + public function setResult($result) + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Informs you if the name validation was performed. Possible values: **performed**, **notPerformed**, **notSupported** + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + error_log( + sprintf( + "status: unexpected enum value '%s' - Supported values are [%s]", + $status, + implode(', ', $allowedValues) + ) + ); + } + $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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsNameResultRawResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsNameResultRawResponse.php new file mode 100644 index 000000000..d7a8b5867 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameResultRawResponse.php @@ -0,0 +1,528 @@ + + */ +class PaymentValidationsNameResultRawResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameResultRawResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'fullName' => 'string', + 'lastName' => 'string', + 'middleName' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'fullName' => null, + 'lastName' => null, + 'middleName' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'fullName' => false, + 'lastName' => false, + 'middleName' => false, + 'status' => 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 = [ + 'firstName' => 'firstName', + 'fullName' => 'fullName', + 'lastName' => 'lastName', + 'middleName' => 'middleName', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'fullName' => 'setFullName', + 'lastName' => 'setLastName', + 'middleName' => 'setMiddleName', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'fullName' => 'getFullName', + 'lastName' => 'getLastName', + 'middleName' => 'getMiddleName', + '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('firstName', $data ?? [], null); + $this->setIfExists('fullName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('middleName', $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 firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName The raw first name validation result that Adyen received from the scheme. First name validation result is only returned for Visa. + * + * @return self + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets fullName + * + * @return string|null + */ + public function getFullName() + { + return $this->container['fullName']; + } + + /** + * Sets fullName + * + * @param string|null $fullName The raw full name validation result that Adyen received from the scheme. Full name is the only field that is validated for Mastercard + * + * @return self + */ + public function setFullName($fullName) + { + $this->container['fullName'] = $fullName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName The raw last name validation result that Adyen received from the scheme. Last name validation result is only returned for Visa. + * + * @return self + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets middleName + * + * @return string|null + */ + public function getMiddleName() + { + return $this->container['middleName']; + } + + /** + * Sets middleName + * + * @param string|null $middleName The raw middle name validation result that Adyen received from the scheme. Middle name validation result is only returned for Visa. + * + * @return self + */ + public function setMiddleName($middleName) + { + $this->container['middleName'] = $middleName; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The raw name validation status value that Adyen received from the scheme. Only returned for Visa. + * + * @return self + */ + public function setStatus($status) + { + $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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsNameResultResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsNameResultResponse.php new file mode 100644 index 000000000..c23f5d806 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameResultResponse.php @@ -0,0 +1,497 @@ + + */ +class PaymentValidationsNameResultResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameResultResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'fullName' => 'string', + 'lastName' => 'string', + 'middleName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'fullName' => null, + 'lastName' => null, + 'middleName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'fullName' => false, + 'lastName' => false, + 'middleName' => 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 = [ + 'firstName' => 'firstName', + 'fullName' => 'fullName', + 'lastName' => 'lastName', + 'middleName' => 'middleName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'fullName' => 'setFullName', + 'lastName' => 'setLastName', + 'middleName' => 'setMiddleName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'fullName' => 'getFullName', + 'lastName' => 'getLastName', + 'middleName' => 'getMiddleName' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('fullName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('middleName', $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 firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName Informs you if the first name your shopper provided matches the cardholder first name on file at the issuing bank. The first name is only validated for Visa. Possible values: **match**, **partialMatch**, **noMatch** + * + * @return self + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets fullName + * + * @return string|null + */ + public function getFullName() + { + return $this->container['fullName']; + } + + /** + * Sets fullName + * + * @param string|null $fullName Informs you if the full name your shopper provided matches the cardholder name on file at the issuing bank. The full name is the only field that is validated for Mastercard. Possible values: **match**, **partialMatch**, **noMatch** + * + * @return self + */ + public function setFullName($fullName) + { + $this->container['fullName'] = $fullName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName Informs you if the last name your shopper provided matches the cardholder last name on file at the issuing bank. The last name is only validated for Visa. Possible values: **match**, **partialMatch**, **noMatch** + * + * @return self + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets middleName + * + * @return string|null + */ + public function getMiddleName() + { + return $this->container['middleName']; + } + + /** + * Sets middleName + * + * @param string|null $middleName Informs you if the middle name your shopper provided matches the cardholder middle name on file at the issuing bank. The middle name is only validated for Visa. Possible values: **match**, **partialMatch**, **noMatch** + * + * @return self + */ + public function setMiddleName($middleName) + { + $this->container['middleName'] = $middleName; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsResponse.php new file mode 100644 index 000000000..cf4246d95 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsResponse.php @@ -0,0 +1,404 @@ + + */ +class PaymentValidationsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => '\Adyen\Model\Checkout\PaymentValidationsNameResponse' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'name' => 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 = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * 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('name', $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 name + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameResponse|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameResponse|null $name name + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PixDetails.php b/src/Adyen/Model/Checkout/PixDetails.php index 7dd96957c..2790e7503 100644 --- a/src/Adyen/Model/Checkout/PixDetails.php +++ b/src/Adyen/Model/Checkout/PixDetails.php @@ -44,6 +44,7 @@ class PixDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'pixRecurring' => '\Adyen\Model\Checkout\PixRecurring', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class PixDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'pixRecurring' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class PixDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'pixRecurring' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'pixRecurring' => 'pixRecurring', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'pixRecurring' => 'setPixRecurring', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'pixRecurring' => 'getPixRecurring', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -267,6 +273,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('pixRecurring', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -396,6 +403,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/PseDetails.php b/src/Adyen/Model/Checkout/PseDetails.php index 3102ae699..eb99542df 100644 --- a/src/Adyen/Model/Checkout/PseDetails.php +++ b/src/Adyen/Model/Checkout/PseDetails.php @@ -46,6 +46,7 @@ class PseDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'clientType' => 'string', 'identification' => 'string', 'identificationType' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -62,6 +63,7 @@ class PseDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'clientType' => null, 'identification' => null, 'identificationType' => null, + 'sdkData' => null, 'type' => null ]; @@ -76,6 +78,7 @@ class PseDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'clientType' => false, 'identification' => false, 'identificationType' => false, + 'sdkData' => false, 'type' => false ]; @@ -170,6 +173,7 @@ public function isNullableSetToNull(string $property): bool 'clientType' => 'clientType', 'identification' => 'identification', 'identificationType' => 'identificationType', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -184,6 +188,7 @@ public function isNullableSetToNull(string $property): bool 'clientType' => 'setClientType', 'identification' => 'setIdentification', 'identificationType' => 'setIdentificationType', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -198,6 +203,7 @@ public function isNullableSetToNull(string $property): bool 'clientType' => 'getClientType', 'identification' => 'getIdentification', 'identificationType' => 'getIdentificationType', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -275,6 +281,7 @@ public function __construct(?array $data = null) $this->setIfExists('clientType', $data ?? [], null); $this->setIfExists('identification', $data ?? [], null); $this->setIfExists('identificationType', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -461,6 +468,30 @@ public function setIdentificationType($identificationType) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/RakutenPayDetails.php b/src/Adyen/Model/Checkout/RakutenPayDetails.php index 81cefe185..d3301f22f 100644 --- a/src/Adyen/Model/Checkout/RakutenPayDetails.php +++ b/src/Adyen/Model/Checkout/RakutenPayDetails.php @@ -43,6 +43,7 @@ class RakutenPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class RakutenPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -69,6 +71,7 @@ class RakutenPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -185,6 +190,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -260,6 +266,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -365,6 +372,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index 3a047bb4e..13a5c2f04 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -46,6 +46,7 @@ class RatepayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => 'string', 'personalDetails' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -63,6 +64,7 @@ class RatepayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => null, 'personalDetails' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -78,6 +80,7 @@ class RatepayDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'deliveryAddress' => false, 'personalDetails' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'deliveryAddress', 'personalDetails' => 'personalDetails', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -188,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'setDeliveryAddress', 'personalDetails' => 'setPersonalDetails', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -203,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'deliveryAddress' => 'getDeliveryAddress', 'personalDetails' => 'getPersonalDetails', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -283,6 +289,7 @@ public function __construct(?array $data = null) $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -463,6 +470,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/Recurring.php b/src/Adyen/Model/Checkout/Recurring.php index 0c1cd0553..831f2fc28 100644 --- a/src/Adyen/Model/Checkout/Recurring.php +++ b/src/Adyen/Model/Checkout/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index bb29f31aa..7d3f3b8fb 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -584,8 +584,9 @@ public function getModelName() return self::$openAPIModelName; } + public const FRAUD_RESULT_TYPE_AMBER = 'AMBER'; public const FRAUD_RESULT_TYPE_GREEN = 'GREEN'; - public const FRAUD_RESULT_TYPE_FRAUD = 'FRAUD'; + public const FRAUD_RESULT_TYPE_RED = 'RED'; public const FRAUD_RISK_LEVEL_VERY_LOW = 'veryLow'; public const FRAUD_RISK_LEVEL_LOW = 'low'; public const FRAUD_RISK_LEVEL_MEDIUM = 'medium'; @@ -606,8 +607,9 @@ public function getModelName() public function getFraudResultTypeAllowableValues() { return [ + self::FRAUD_RESULT_TYPE_AMBER, self::FRAUD_RESULT_TYPE_GREEN, - self::FRAUD_RESULT_TYPE_FRAUD, + self::FRAUD_RESULT_TYPE_RED, ]; } /** @@ -1350,7 +1352,7 @@ public function getFraudResultType() /** * Sets fraudResultType * - * @param string|null $fraudResultType The fraud result properties of the payment. + * @param string|null $fraudResultType The fraud result properties of the payment. Possible values: * AMBER * GREEN * RED * * @return self */ @@ -1384,7 +1386,7 @@ public function getFraudRiskLevel() /** * Sets fraudRiskLevel * - * @param string|null $fraudRiskLevel The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh + * @param string|null $fraudRiskLevel The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. Possible values: * veryLow * low * medium * high * veryHigh * * @return self */ diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php index 70454e23c..c38080b75 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php @@ -43,6 +43,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPITypes = [ 'sepadirectdebitDateOfSignature' => 'string', 'sepadirectdebitMandateId' => 'string', + 'sepadirectdebitSepadirectdebitDueDate' => 'string', 'sepadirectdebitSequenceType' => 'string' ]; @@ -56,6 +57,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPIFormats = [ 'sepadirectdebitDateOfSignature' => null, 'sepadirectdebitMandateId' => null, + 'sepadirectdebitSepadirectdebitDueDate' => null, 'sepadirectdebitSequenceType' => null ]; @@ -67,6 +69,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPINullables = [ 'sepadirectdebitDateOfSignature' => false, 'sepadirectdebitMandateId' => false, + 'sepadirectdebitSepadirectdebitDueDate' => false, 'sepadirectdebitSequenceType' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'sepadirectdebitDateOfSignature' => 'sepadirectdebit.dateOfSignature', 'sepadirectdebitMandateId' => 'sepadirectdebit.mandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'sepadirectdebit.sepadirectdebit.dueDate', 'sepadirectdebitSequenceType' => 'sepadirectdebit.sequenceType' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'sepadirectdebitDateOfSignature' => 'setSepadirectdebitDateOfSignature', 'sepadirectdebitMandateId' => 'setSepadirectdebitMandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'setSepadirectdebitSepadirectdebitDueDate', 'sepadirectdebitSequenceType' => 'setSepadirectdebitSequenceType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'sepadirectdebitDateOfSignature' => 'getSepadirectdebitDateOfSignature', 'sepadirectdebitMandateId' => 'getSepadirectdebitMandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'getSepadirectdebitSepadirectdebitDueDate', 'sepadirectdebitSequenceType' => 'getSepadirectdebitSequenceType' ]; @@ -242,6 +248,7 @@ public function __construct(?array $data = null) { $this->setIfExists('sepadirectdebitDateOfSignature', $data ?? [], null); $this->setIfExists('sepadirectdebitMandateId', $data ?? [], null); + $this->setIfExists('sepadirectdebitSepadirectdebitDueDate', $data ?? [], null); $this->setIfExists('sepadirectdebitSequenceType', $data ?? [], null); } @@ -335,6 +342,30 @@ public function setSepadirectdebitMandateId($sepadirectdebitMandateId) return $this; } + /** + * Gets sepadirectdebitSepadirectdebitDueDate + * + * @return string|null + */ + public function getSepadirectdebitSepadirectdebitDueDate() + { + return $this->container['sepadirectdebitSepadirectdebitDueDate']; + } + + /** + * Sets sepadirectdebitSepadirectdebitDueDate + * + * @param string|null $sepadirectdebitSepadirectdebitDueDate The date that the the shopper's bank account is charged. + * + * @return self + */ + public function setSepadirectdebitSepadirectdebitDueDate($sepadirectdebitSepadirectdebitDueDate) + { + $this->container['sepadirectdebitSepadirectdebitDueDate'] = $sepadirectdebitSepadirectdebitDueDate; + + return $this; + } + /** * Gets sepadirectdebitSequenceType * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php new file mode 100644 index 000000000..bd559d77e --- /dev/null +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php @@ -0,0 +1,404 @@ + + */ +class ResponseAdditionalDataSwish implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSwish'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'swishPayerAlias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'swishPayerAlias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'swishPayerAlias' => 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 = [ + 'swishPayerAlias' => 'swish.payerAlias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'swishPayerAlias' => 'setSwishPayerAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'swishPayerAlias' => 'getSwishPayerAlias' + ]; + + /** + * 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('swishPayerAlias', $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 swishPayerAlias + * + * @return string|null + */ + public function getSwishPayerAlias() + { + return $this->container['swishPayerAlias']; + } + + /** + * Sets swishPayerAlias + * + * @param string|null $swishPayerAlias A Swish shopper's telephone number. + * + * @return self + */ + public function setSwishPayerAlias($swishPayerAlias) + { + $this->container['swishPayerAlias'] = $swishPayerAlias; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Result.php b/src/Adyen/Model/Checkout/Result.php index f409e9302..6dd17f86e 100644 --- a/src/Adyen/Model/Checkout/Result.php +++ b/src/Adyen/Model/Checkout/Result.php @@ -14,7 +14,6 @@ namespace Adyen\Model\Checkout; - use Adyen\Model\Checkout\ObjectSerializer; /** @@ -46,3 +45,4 @@ public static function getAllowableEnumValues() ]; } } + diff --git a/src/Adyen/Model/Checkout/RivertyDetails.php b/src/Adyen/Model/Checkout/RivertyDetails.php index 5b86c7dfa..c38b72f06 100644 --- a/src/Adyen/Model/Checkout/RivertyDetails.php +++ b/src/Adyen/Model/Checkout/RivertyDetails.php @@ -48,6 +48,7 @@ class RivertyDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'iban' => 'string', 'personalDetails' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', 'type' => 'string' @@ -68,6 +69,7 @@ class RivertyDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'iban' => null, 'personalDetails' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'subtype' => null, 'type' => null @@ -86,6 +88,7 @@ class RivertyDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'iban' => false, 'personalDetails' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'subtype' => false, 'type' => false @@ -184,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'iban' => 'iban', 'personalDetails' => 'personalDetails', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', 'type' => 'type' @@ -202,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'iban' => 'setIban', 'personalDetails' => 'setPersonalDetails', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', 'type' => 'setType' @@ -220,6 +225,7 @@ public function isNullableSetToNull(string $property): bool 'iban' => 'getIban', 'personalDetails' => 'getPersonalDetails', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', 'type' => 'getType' @@ -307,6 +313,7 @@ public function __construct(?array $data = null) $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -536,6 +543,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index e4836002e..5e38cbf1a 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -45,6 +45,7 @@ class SamsungPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'fundingSource' => 'string', 'recurringDetailReference' => 'string', 'samsungPayToken' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -61,6 +62,7 @@ class SamsungPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'fundingSource' => null, 'recurringDetailReference' => null, 'samsungPayToken' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -75,6 +77,7 @@ class SamsungPayDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'fundingSource' => false, 'recurringDetailReference' => false, 'samsungPayToken' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'fundingSource', 'recurringDetailReference' => 'recurringDetailReference', 'samsungPayToken' => 'samsungPayToken', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -183,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'setFundingSource', 'recurringDetailReference' => 'setRecurringDetailReference', 'samsungPayToken' => 'setSamsungPayToken', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -197,6 +202,7 @@ public function isNullableSetToNull(string $property): bool 'fundingSource' => 'getFundingSource', 'recurringDetailReference' => 'getRecurringDetailReference', 'samsungPayToken' => 'getSamsungPayToken', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -244,6 +250,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_SAMSUNGPAY = 'samsungpay'; /** @@ -256,6 +263,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -288,6 +296,7 @@ public function __construct(?array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -463,6 +472,30 @@ public function setSamsungPayToken($samsungPayToken) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index 05705eb82..d7879230d 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -42,9 +42,11 @@ class SepaDirectDebitDetails implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'dueDate' => 'string', 'iban' => 'string', 'ownerName' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'transferInstrumentId' => 'string', 'type' => 'string' @@ -59,9 +61,11 @@ class SepaDirectDebitDetails implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'dueDate' => null, 'iban' => null, 'ownerName' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'transferInstrumentId' => null, 'type' => null @@ -74,9 +78,11 @@ class SepaDirectDebitDetails implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'dueDate' => false, 'iban' => false, 'ownerName' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'transferInstrumentId' => false, 'type' => false @@ -169,9 +175,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'dueDate' => 'dueDate', 'iban' => 'iban', 'ownerName' => 'ownerName', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'transferInstrumentId' => 'transferInstrumentId', 'type' => 'type' @@ -184,9 +192,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'dueDate' => 'setDueDate', 'iban' => 'setIban', 'ownerName' => 'setOwnerName', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'transferInstrumentId' => 'setTransferInstrumentId', 'type' => 'setType' @@ -199,9 +209,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'dueDate' => 'getDueDate', 'iban' => 'getIban', 'ownerName' => 'getOwnerName', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'transferInstrumentId' => 'getTransferInstrumentId', 'type' => 'getType' @@ -279,9 +291,11 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('dueDate', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('transferInstrumentId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -368,6 +382,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets dueDate + * + * @return string|null + */ + public function getDueDate() + { + return $this->container['dueDate']; + } + + /** + * Sets dueDate + * + * @param string|null $dueDate The date that the the shopper's bank account is charged. + * + * @return self + */ + public function setDueDate($dueDate) + { + $this->container['dueDate'] = $dueDate; + + return $this; + } + /** * Gets iban * @@ -442,6 +480,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/ShopperName.php b/src/Adyen/Model/Checkout/ShopperName.php new file mode 100644 index 000000000..030316823 --- /dev/null +++ b/src/Adyen/Model/Checkout/ShopperName.php @@ -0,0 +1,441 @@ + + */ +class ShopperName implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ShopperName'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'lastName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'lastName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'lastName' => 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 = [ + 'firstName' => 'firstName', + 'lastName' => 'lastName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('lastName', $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['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' 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 firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName The first name. + * + * @return self + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName The last name. + * + * @return self + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Split.php b/src/Adyen/Model/Checkout/Split.php index 1954b93fb..1e1d7d42a 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -464,7 +464,7 @@ public function getType() /** * Sets type * - * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. + * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: Books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: The aggregated amount of the interchange and scheme fees. * **PaymentFee**: The aggregated amount of all transaction fees. * **AdyenFees**: The aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: The transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: The transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: The fees paid to the issuer for each payment made with the card network. * **SchemeFee**: The fees paid to the card scheme for using their network. * **Commission**: Your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: The amount left over after a currency conversion, booked to the specified `account`. * **Surcharge**: The payment acceptance fee imposed by the card scheme or debit network provider, paid by your user's customer. * **TopUp**: Allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: The value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: In very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. * * @return self */ diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index 506c5f9ef..eb72c2b3e 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -43,6 +43,7 @@ class StoredPaymentMethodDetails implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class StoredPaymentMethodDetails implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -69,6 +71,7 @@ class StoredPaymentMethodDetails implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -185,6 +190,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -230,6 +236,18 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_ALIPAY_PLUS = 'alipay_plus'; + public const TYPE_ALIPAY_PLUS_ALIPAY_CN = 'alipay_plus_alipay_cn'; + public const TYPE_ALIPAY_PLUS_ALIPAY_HK = 'alipay_plus_alipay_hk'; + public const TYPE_ALIPAY_PLUS_DANA = 'alipay_plus_dana'; + public const TYPE_ALIPAY_PLUS_GCASH = 'alipay_plus_gcash'; + public const TYPE_ALIPAY_PLUS_KAKAOPAY = 'alipay_plus_kakaopay'; + public const TYPE_ALIPAY_PLUS_KPLUS = 'alipay_plus_kplus'; + public const TYPE_ALIPAY_PLUS_NAVERPAY = 'alipay_plus_naverpay'; + public const TYPE_ALIPAY_PLUS_RABBITLINEPAY = 'alipay_plus_rabbitlinepay'; + public const TYPE_ALIPAY_PLUS_TOSSPAY = 'alipay_plus_tosspay'; + public const TYPE_ALIPAY_PLUS_TOUCHNGO = 'alipay_plus_touchngo'; + public const TYPE_ALIPAY_PLUS_TRUEMONEY = 'alipay_plus_truemoney'; public const TYPE_BCMC_MOBILE = 'bcmc_mobile'; public const TYPE_BCMC_MOBILE_QR = 'bcmc_mobile_QR'; public const TYPE_BCMC_MOBILE_APP = 'bcmc_mobile_app'; @@ -257,6 +275,18 @@ public function getModelName() public function getTypeAllowableValues() { return [ + self::TYPE_ALIPAY_PLUS, + self::TYPE_ALIPAY_PLUS_ALIPAY_CN, + self::TYPE_ALIPAY_PLUS_ALIPAY_HK, + self::TYPE_ALIPAY_PLUS_DANA, + self::TYPE_ALIPAY_PLUS_GCASH, + self::TYPE_ALIPAY_PLUS_KAKAOPAY, + self::TYPE_ALIPAY_PLUS_KPLUS, + self::TYPE_ALIPAY_PLUS_NAVERPAY, + self::TYPE_ALIPAY_PLUS_RABBITLINEPAY, + self::TYPE_ALIPAY_PLUS_TOSSPAY, + self::TYPE_ALIPAY_PLUS_TOUCHNGO, + self::TYPE_ALIPAY_PLUS_TRUEMONEY, self::TYPE_BCMC_MOBILE, self::TYPE_BCMC_MOBILE_QR, self::TYPE_BCMC_MOBILE_APP, @@ -294,6 +324,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -399,6 +430,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php index 2d38da32c..e7eef1023 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php @@ -42,6 +42,7 @@ class StoredPaymentMethodResource implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPITypes = [ 'brand' => 'string', + 'cardBin' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', 'externalResponseCode' => 'string', @@ -51,6 +52,7 @@ class StoredPaymentMethodResource implements ModelInterface, ArrayAccess, \JsonS 'id' => 'string', 'issuerName' => 'string', 'lastFour' => 'string', + 'mandate' => '\Adyen\Model\Checkout\TokenMandate', 'name' => 'string', 'networkTxReference' => 'string', 'ownerName' => 'string', @@ -69,6 +71,7 @@ class StoredPaymentMethodResource implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPIFormats = [ 'brand' => null, + 'cardBin' => null, 'expiryMonth' => null, 'expiryYear' => null, 'externalResponseCode' => null, @@ -78,6 +81,7 @@ class StoredPaymentMethodResource implements ModelInterface, ArrayAccess, \JsonS 'id' => null, 'issuerName' => null, 'lastFour' => null, + 'mandate' => null, 'name' => null, 'networkTxReference' => null, 'ownerName' => null, @@ -94,6 +98,7 @@ class StoredPaymentMethodResource implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPINullables = [ 'brand' => false, + 'cardBin' => false, 'expiryMonth' => false, 'expiryYear' => false, 'externalResponseCode' => false, @@ -103,6 +108,7 @@ class StoredPaymentMethodResource implements ModelInterface, ArrayAccess, \JsonS 'id' => false, 'issuerName' => false, 'lastFour' => false, + 'mandate' => false, 'name' => false, 'networkTxReference' => false, 'ownerName' => false, @@ -199,6 +205,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'brand' => 'brand', + 'cardBin' => 'cardBin', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', 'externalResponseCode' => 'externalResponseCode', @@ -208,6 +215,7 @@ public function isNullableSetToNull(string $property): bool 'id' => 'id', 'issuerName' => 'issuerName', 'lastFour' => 'lastFour', + 'mandate' => 'mandate', 'name' => 'name', 'networkTxReference' => 'networkTxReference', 'ownerName' => 'ownerName', @@ -224,6 +232,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'brand' => 'setBrand', + 'cardBin' => 'setCardBin', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', 'externalResponseCode' => 'setExternalResponseCode', @@ -233,6 +242,7 @@ public function isNullableSetToNull(string $property): bool 'id' => 'setId', 'issuerName' => 'setIssuerName', 'lastFour' => 'setLastFour', + 'mandate' => 'setMandate', 'name' => 'setName', 'networkTxReference' => 'setNetworkTxReference', 'ownerName' => 'setOwnerName', @@ -249,6 +259,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'brand' => 'getBrand', + 'cardBin' => 'getCardBin', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', 'externalResponseCode' => 'getExternalResponseCode', @@ -258,6 +269,7 @@ public function isNullableSetToNull(string $property): bool 'id' => 'getId', 'issuerName' => 'getIssuerName', 'lastFour' => 'getLastFour', + 'mandate' => 'getMandate', 'name' => 'getName', 'networkTxReference' => 'getNetworkTxReference', 'ownerName' => 'getOwnerName', @@ -325,6 +337,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('cardBin', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); $this->setIfExists('externalResponseCode', $data ?? [], null); @@ -334,6 +347,7 @@ public function __construct(?array $data = null) $this->setIfExists('id', $data ?? [], null); $this->setIfExists('issuerName', $data ?? [], null); $this->setIfExists('lastFour', $data ?? [], null); + $this->setIfExists('mandate', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('networkTxReference', $data ?? [], null); $this->setIfExists('ownerName', $data ?? [], null); @@ -409,6 +423,30 @@ public function setBrand($brand) return $this; } + /** + * Gets cardBin + * + * @return string|null + */ + public function getCardBin() + { + return $this->container['cardBin']; + } + + /** + * Sets cardBin + * + * @param string|null $cardBin The bank identification number (BIN) of the card. + * + * @return self + */ + public function setCardBin($cardBin) + { + $this->container['cardBin'] = $cardBin; + + return $this; + } + /** * Gets expiryMonth * @@ -625,6 +663,30 @@ public function setLastFour($lastFour) return $this; } + /** + * Gets mandate + * + * @return \Adyen\Model\Checkout\TokenMandate|null + */ + public function getMandate() + { + return $this->container['mandate']; + } + + /** + * Sets mandate + * + * @param \Adyen\Model\Checkout\TokenMandate|null $mandate mandate + * + * @return self + */ + public function setMandate($mandate) + { + $this->container['mandate'] = $mandate; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/Checkout/TokenMandate.php b/src/Adyen/Model/Checkout/TokenMandate.php new file mode 100644 index 000000000..542534940 --- /dev/null +++ b/src/Adyen/Model/Checkout/TokenMandate.php @@ -0,0 +1,1006 @@ + + */ +class TokenMandate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TokenMandate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountIdType' => 'string', + 'amount' => 'string', + 'amountRule' => 'string', + 'billingAttemptsRule' => 'string', + 'billingDay' => 'string', + 'count' => 'string', + 'currency' => 'string', + 'endsAt' => 'string', + 'frequency' => 'string', + 'mandateId' => 'string', + 'maskedAccountId' => 'string', + 'providerId' => 'string', + 'remarks' => 'string', + 'startsAt' => 'string', + 'status' => 'string', + 'txVariant' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountIdType' => null, + 'amount' => null, + 'amountRule' => null, + 'billingAttemptsRule' => null, + 'billingDay' => null, + 'count' => null, + 'currency' => null, + 'endsAt' => null, + 'frequency' => null, + 'mandateId' => null, + 'maskedAccountId' => null, + 'providerId' => null, + 'remarks' => null, + 'startsAt' => null, + 'status' => null, + 'txVariant' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountIdType' => false, + 'amount' => false, + 'amountRule' => false, + 'billingAttemptsRule' => false, + 'billingDay' => false, + 'count' => false, + 'currency' => false, + 'endsAt' => false, + 'frequency' => false, + 'mandateId' => false, + 'maskedAccountId' => false, + 'providerId' => false, + 'remarks' => false, + 'startsAt' => false, + 'status' => false, + 'txVariant' => 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 = [ + 'accountIdType' => 'accountIdType', + 'amount' => 'amount', + 'amountRule' => 'amountRule', + 'billingAttemptsRule' => 'billingAttemptsRule', + 'billingDay' => 'billingDay', + 'count' => 'count', + 'currency' => 'currency', + 'endsAt' => 'endsAt', + 'frequency' => 'frequency', + 'mandateId' => 'mandateId', + 'maskedAccountId' => 'maskedAccountId', + 'providerId' => 'providerId', + 'remarks' => 'remarks', + 'startsAt' => 'startsAt', + 'status' => 'status', + 'txVariant' => 'txVariant' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountIdType' => 'setAccountIdType', + 'amount' => 'setAmount', + 'amountRule' => 'setAmountRule', + 'billingAttemptsRule' => 'setBillingAttemptsRule', + 'billingDay' => 'setBillingDay', + 'count' => 'setCount', + 'currency' => 'setCurrency', + 'endsAt' => 'setEndsAt', + 'frequency' => 'setFrequency', + 'mandateId' => 'setMandateId', + 'maskedAccountId' => 'setMaskedAccountId', + 'providerId' => 'setProviderId', + 'remarks' => 'setRemarks', + 'startsAt' => 'setStartsAt', + 'status' => 'setStatus', + 'txVariant' => 'setTxVariant' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountIdType' => 'getAccountIdType', + 'amount' => 'getAmount', + 'amountRule' => 'getAmountRule', + 'billingAttemptsRule' => 'getBillingAttemptsRule', + 'billingDay' => 'getBillingDay', + 'count' => 'getCount', + 'currency' => 'getCurrency', + 'endsAt' => 'getEndsAt', + 'frequency' => 'getFrequency', + 'mandateId' => 'getMandateId', + 'maskedAccountId' => 'getMaskedAccountId', + 'providerId' => 'getProviderId', + 'remarks' => 'getRemarks', + 'startsAt' => 'getStartsAt', + 'status' => 'getStatus', + 'txVariant' => 'getTxVariant' + ]; + + /** + * 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 AMOUNT_RULE_MAX = 'max'; + public const AMOUNT_RULE_EXACT = 'exact'; + public const BILLING_ATTEMPTS_RULE_ON = 'on'; + public const BILLING_ATTEMPTS_RULE_BEFORE = 'before'; + public const BILLING_ATTEMPTS_RULE_AFTER = 'after'; + public const FREQUENCY_ADHOC = 'adhoc'; + public const FREQUENCY_DAILY = 'daily'; + public const FREQUENCY_WEEKLY = 'weekly'; + public const FREQUENCY_BI_WEEKLY = 'biWeekly'; + public const FREQUENCY_MONTHLY = 'monthly'; + public const FREQUENCY_QUARTERLY = 'quarterly'; + public const FREQUENCY_HALF_YEARLY = 'halfYearly'; + public const FREQUENCY_YEARLY = 'yearly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAmountRuleAllowableValues() + { + return [ + self::AMOUNT_RULE_MAX, + self::AMOUNT_RULE_EXACT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBillingAttemptsRuleAllowableValues() + { + return [ + self::BILLING_ATTEMPTS_RULE_ON, + self::BILLING_ATTEMPTS_RULE_BEFORE, + self::BILLING_ATTEMPTS_RULE_AFTER, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFrequencyAllowableValues() + { + return [ + self::FREQUENCY_ADHOC, + self::FREQUENCY_DAILY, + self::FREQUENCY_WEEKLY, + self::FREQUENCY_BI_WEEKLY, + self::FREQUENCY_MONTHLY, + self::FREQUENCY_QUARTERLY, + self::FREQUENCY_HALF_YEARLY, + self::FREQUENCY_YEARLY, + ]; + } + /** + * 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('accountIdType', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('amountRule', $data ?? [], null); + $this->setIfExists('billingAttemptsRule', $data ?? [], null); + $this->setIfExists('billingDay', $data ?? [], null); + $this->setIfExists('count', $data ?? [], null); + $this->setIfExists('currency', $data ?? [], null); + $this->setIfExists('endsAt', $data ?? [], null); + $this->setIfExists('frequency', $data ?? [], null); + $this->setIfExists('mandateId', $data ?? [], null); + $this->setIfExists('maskedAccountId', $data ?? [], null); + $this->setIfExists('providerId', $data ?? [], null); + $this->setIfExists('remarks', $data ?? [], null); + $this->setIfExists('startsAt', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('txVariant', $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['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + $allowedValues = $this->getAmountRuleAllowableValues(); + if (!is_null($this->container['amountRule']) && !in_array($this->container['amountRule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'amountRule', must be one of '%s'", + $this->container['amountRule'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getBillingAttemptsRuleAllowableValues(); + if (!is_null($this->container['billingAttemptsRule']) && !in_array($this->container['billingAttemptsRule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'billingAttemptsRule', must be one of '%s'", + $this->container['billingAttemptsRule'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['endsAt'] === null) { + $invalidProperties[] = "'endsAt' can't be null"; + } + if ($this->container['frequency'] === null) { + $invalidProperties[] = "'frequency' can't be null"; + } + $allowedValues = $this->getFrequencyAllowableValues(); + if (!is_null($this->container['frequency']) && !in_array($this->container['frequency'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'frequency', must be one of '%s'", + $this->container['frequency'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['mandateId'] === null) { + $invalidProperties[] = "'mandateId' can't be null"; + } + if ($this->container['providerId'] === null) { + $invalidProperties[] = "'providerId' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['txVariant'] === null) { + $invalidProperties[] = "'txVariant' 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 accountIdType + * + * @return string|null + */ + public function getAccountIdType() + { + return $this->container['accountIdType']; + } + + /** + * Sets accountIdType + * + * @param string|null $accountIdType The type of account identifier for the masked account number. + * + * @return self + */ + public function setAccountIdType($accountIdType) + { + $this->container['accountIdType'] = $accountIdType; + + return $this; + } + + /** + * Gets amount + * + * @return string + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string $amount The billing amount (in minor units) of the recurring transactions. + * + * @return self + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets amountRule + * + * @return string|null + */ + public function getAmountRule() + { + return $this->container['amountRule']; + } + + /** + * Sets amountRule + * + * @param string|null $amountRule The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. + * + * @return self + */ + public function setAmountRule($amountRule) + { + $allowedValues = $this->getAmountRuleAllowableValues(); + if (!in_array($amountRule, $allowedValues, true)) { + error_log( + sprintf( + "amountRule: unexpected enum value '%s' - Supported values are [%s]", + $amountRule, + implode(', ', $allowedValues) + ) + ); + } + $this->container['amountRule'] = $amountRule; + + return $this; + } + + /** + * Gets billingAttemptsRule + * + * @return string|null + */ + public function getBillingAttemptsRule() + { + return $this->container['billingAttemptsRule']; + } + + /** + * Sets billingAttemptsRule + * + * @param string|null $billingAttemptsRule The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. + * + * @return self + */ + public function setBillingAttemptsRule($billingAttemptsRule) + { + $allowedValues = $this->getBillingAttemptsRuleAllowableValues(); + if (!in_array($billingAttemptsRule, $allowedValues, true)) { + error_log( + sprintf( + "billingAttemptsRule: unexpected enum value '%s' - Supported values are [%s]", + $billingAttemptsRule, + implode(', ', $allowedValues) + ) + ); + } + $this->container['billingAttemptsRule'] = $billingAttemptsRule; + + return $this; + } + + /** + * Gets billingDay + * + * @return string|null + */ + public function getBillingDay() + { + return $this->container['billingDay']; + } + + /** + * Sets billingDay + * + * @param string|null $billingDay The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. + * + * @return self + */ + public function setBillingDay($billingDay) + { + $this->container['billingDay'] = $billingDay; + + return $this; + } + + /** + * Gets count + * + * @return string|null + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param string|null $count The number of transactions that can be performed within the given frequency. + * + * @return self + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * 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) + { + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets endsAt + * + * @return string + */ + public function getEndsAt() + { + return $this->container['endsAt']; + } + + /** + * Sets endsAt + * + * @param string $endsAt End date of the billing plan, in YYYY-MM-DD format. + * + * @return self + */ + public function setEndsAt($endsAt) + { + $this->container['endsAt'] = $endsAt; + + return $this; + } + + /** + * Gets frequency + * + * @return string + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string $frequency The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * + * @return self + */ + public function setFrequency($frequency) + { + $allowedValues = $this->getFrequencyAllowableValues(); + if (!in_array($frequency, $allowedValues, true)) { + error_log( + sprintf( + "frequency: unexpected enum value '%s' - Supported values are [%s]", + $frequency, + implode(', ', $allowedValues) + ) + ); + } + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets mandateId + * + * @return string + */ + public function getMandateId() + { + return $this->container['mandateId']; + } + + /** + * Sets mandateId + * + * @param string $mandateId The unique identifier of the mandate. + * + * @return self + */ + public function setMandateId($mandateId) + { + $this->container['mandateId'] = $mandateId; + + return $this; + } + + /** + * Gets maskedAccountId + * + * @return string|null + */ + public function getMaskedAccountId() + { + return $this->container['maskedAccountId']; + } + + /** + * Sets maskedAccountId + * + * @param string|null $maskedAccountId The masked account number associated with the mandate. + * + * @return self + */ + public function setMaskedAccountId($maskedAccountId) + { + $this->container['maskedAccountId'] = $maskedAccountId; + + return $this; + } + + /** + * Gets providerId + * + * @return string + */ + public function getProviderId() + { + return $this->container['providerId']; + } + + /** + * Sets providerId + * + * @param string $providerId The provider-specific identifier for this mandate. + * + * @return self + */ + public function setProviderId($providerId) + { + $this->container['providerId'] = $providerId; + + return $this; + } + + /** + * Gets remarks + * + * @return string|null + */ + public function getRemarks() + { + return $this->container['remarks']; + } + + /** + * Sets remarks + * + * @param string|null $remarks Additional remarks or notes about the mandate. + * + * @return self + */ + public function setRemarks($remarks) + { + $this->container['remarks'] = $remarks; + + return $this; + } + + /** + * Gets startsAt + * + * @return string|null + */ + public function getStartsAt() + { + return $this->container['startsAt']; + } + + /** + * Sets startsAt + * + * @param string|null $startsAt Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. + * + * @return self + */ + public function setStartsAt($startsAt) + { + $this->container['startsAt'] = $startsAt; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the mandate. Examples : active, revoked, completed, expired + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets txVariant + * + * @return string + */ + public function getTxVariant() + { + return $this->container['txVariant']; + } + + /** + * Sets txVariant + * + * @param string $txVariant The transaction variant used for this mandate. + * + * @return self + */ + public function setTxVariant($txVariant) + { + $this->container['txVariant'] = $txVariant; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/TwintDetails.php b/src/Adyen/Model/Checkout/TwintDetails.php index df34a3f8b..8ba90088b 100644 --- a/src/Adyen/Model/Checkout/TwintDetails.php +++ b/src/Adyen/Model/Checkout/TwintDetails.php @@ -43,6 +43,7 @@ class TwintDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', 'type' => 'string' @@ -58,6 +59,7 @@ class TwintDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'subtype' => null, 'type' => null @@ -71,6 +73,7 @@ class TwintDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'subtype' => false, 'type' => false @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', 'type' => 'type' @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', 'type' => 'setType' @@ -190,6 +195,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', 'type' => 'getType' @@ -266,6 +272,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -372,6 +379,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Checkout/UPIPaymentMethod.php b/src/Adyen/Model/Checkout/UPIPaymentMethod.php index 785ca65d6..7ce446609 100644 --- a/src/Adyen/Model/Checkout/UPIPaymentMethod.php +++ b/src/Adyen/Model/Checkout/UPIPaymentMethod.php @@ -14,7 +14,6 @@ namespace Adyen\Model\Checkout; - use Adyen\Model\Checkout\ObjectSerializer; /** diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index c6f896863..1b2066d95 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -44,6 +44,7 @@ class UpiCollectDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'billingSequenceNumber' => 'string', 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'shopperNotificationReference' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string', @@ -61,6 +62,7 @@ class UpiCollectDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'billingSequenceNumber' => null, 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'shopperNotificationReference' => null, 'storedPaymentMethodId' => null, 'type' => null, @@ -76,6 +78,7 @@ class UpiCollectDetails implements ModelInterface, ArrayAccess, \JsonSerializabl 'billingSequenceNumber' => false, 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'shopperNotificationReference' => false, 'storedPaymentMethodId' => false, 'type' => false, @@ -171,6 +174,7 @@ public function isNullableSetToNull(string $property): bool 'billingSequenceNumber' => 'billingSequenceNumber', 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'shopperNotificationReference' => 'shopperNotificationReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type', @@ -186,6 +190,7 @@ public function isNullableSetToNull(string $property): bool 'billingSequenceNumber' => 'setBillingSequenceNumber', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'shopperNotificationReference' => 'setShopperNotificationReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType', @@ -201,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'billingSequenceNumber' => 'getBillingSequenceNumber', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'shopperNotificationReference' => 'getShopperNotificationReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType', @@ -279,6 +285,7 @@ public function __construct(?array $data = null) $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -312,9 +319,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['billingSequenceNumber'] === null) { - $invalidProperties[] = "'billingSequenceNumber' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -345,7 +349,7 @@ public function valid() /** * Gets billingSequenceNumber * - * @return string + * @return string|null */ public function getBillingSequenceNumber() { @@ -355,7 +359,7 @@ public function getBillingSequenceNumber() /** * Sets billingSequenceNumber * - * @param string $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. * * @return self */ @@ -416,6 +420,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperNotificationReference * diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index d1eff89b4..4d7c87aad 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -42,8 +42,10 @@ class UpiIntentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'appId' => 'string', + 'billingSequenceNumber' => 'string', 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'shopperNotificationReference' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' @@ -58,8 +60,10 @@ class UpiIntentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'appId' => null, + 'billingSequenceNumber' => null, 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'shopperNotificationReference' => null, 'storedPaymentMethodId' => null, 'type' => null @@ -72,8 +76,10 @@ class UpiIntentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'appId' => false, + 'billingSequenceNumber' => false, 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'shopperNotificationReference' => false, 'storedPaymentMethodId' => false, 'type' => false @@ -166,8 +172,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'appId' => 'appId', + 'billingSequenceNumber' => 'billingSequenceNumber', 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'shopperNotificationReference' => 'shopperNotificationReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' @@ -180,8 +188,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'appId' => 'setAppId', + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'shopperNotificationReference' => 'setShopperNotificationReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' @@ -194,8 +204,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'appId' => 'getAppId', + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'shopperNotificationReference' => 'getShopperNotificationReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' @@ -271,8 +283,10 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('appId', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -356,6 +370,30 @@ public function setAppId($appId) return $this; } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets checkoutAttemptId * @@ -406,6 +444,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets shopperNotificationReference * diff --git a/src/Adyen/Model/Checkout/UpiQrDetails.php b/src/Adyen/Model/Checkout/UpiQrDetails.php new file mode 100644 index 000000000..6cd5ea258 --- /dev/null +++ b/src/Adyen/Model/Checkout/UpiQrDetails.php @@ -0,0 +1,626 @@ + + */ +class UpiQrDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UpiQrDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'billingSequenceNumber' => 'string', + 'checkoutAttemptId' => 'string', + 'recurringDetailReference' => 'string', + 'sdkData' => 'string', + 'shopperNotificationReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'billingSequenceNumber' => null, + 'checkoutAttemptId' => null, + 'recurringDetailReference' => null, + 'sdkData' => null, + 'shopperNotificationReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'billingSequenceNumber' => false, + 'checkoutAttemptId' => false, + 'recurringDetailReference' => false, + 'sdkData' => false, + 'shopperNotificationReference' => false, + 'storedPaymentMethodId' => false, + 'type' => 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 = [ + 'billingSequenceNumber' => 'billingSequenceNumber', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'billingSequenceNumber' => 'setBillingSequenceNumber', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'billingSequenceNumber' => 'getBillingSequenceNumber', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * 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_UPI_QR = 'upi_qr'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_UPI_QR, + ]; + } + /** + * 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('billingSequenceNumber', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $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['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) + ); + } + + 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 billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + 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) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + 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 since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + 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 for recurring payment only. + * + * @return self + */ + public function setShopperNotificationReference($shopperNotificationReference) + { + $this->container['shopperNotificationReference'] = $shopperNotificationReference; + + 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) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **upi_qr** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + error_log( + sprintf( + "type: unexpected enum value '%s' - Supported values are [%s]", + $type, + implode(', ', $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/ValidateShopperIdResponse.php b/src/Adyen/Model/Checkout/ValidateShopperIdResponse.php index 1815a1fad..be310d2b5 100644 --- a/src/Adyen/Model/Checkout/ValidateShopperIdResponse.php +++ b/src/Adyen/Model/Checkout/ValidateShopperIdResponse.php @@ -293,7 +293,7 @@ public function getReason() /** * Sets reason * - * @param string|null $reason reason + * @param string|null $reason Reason for the result. * * @return self */ diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index eb3f52b9d..0782e9ef0 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -43,6 +43,7 @@ class VippsDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'telephoneNumber' => 'string', 'type' => 'string' @@ -58,6 +59,7 @@ class VippsDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'telephoneNumber' => null, 'type' => null @@ -71,6 +73,7 @@ class VippsDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'telephoneNumber' => false, 'type' => false @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'telephoneNumber' => 'telephoneNumber', 'type' => 'type' @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'telephoneNumber' => 'setTelephoneNumber', 'type' => 'setType' @@ -190,6 +195,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'telephoneNumber' => 'getTelephoneNumber', 'type' => 'getType' @@ -266,6 +272,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -375,6 +382,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * @@ -412,7 +443,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index 47fbe4adb..01aa8509b 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -43,6 +43,7 @@ class VisaCheckoutDetails implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'fundingSource' => 'string', + 'sdkData' => 'string', 'type' => 'string', 'visaCheckoutCallId' => 'string' ]; @@ -57,6 +58,7 @@ class VisaCheckoutDetails implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'fundingSource' => null, + 'sdkData' => null, 'type' => null, 'visaCheckoutCallId' => null ]; @@ -69,6 +71,7 @@ class VisaCheckoutDetails implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'fundingSource' => false, + 'sdkData' => false, 'type' => false, 'visaCheckoutCallId' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'fundingSource' => 'fundingSource', + 'sdkData' => 'sdkData', 'type' => 'type', 'visaCheckoutCallId' => 'visaCheckoutCallId' ]; @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fundingSource' => 'setFundingSource', + 'sdkData' => 'setSdkData', 'type' => 'setType', 'visaCheckoutCallId' => 'setVisaCheckoutCallId' ]; @@ -185,6 +190,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fundingSource' => 'getFundingSource', + 'sdkData' => 'getSdkData', 'type' => 'getType', 'visaCheckoutCallId' => 'getVisaCheckoutCallId' ]; @@ -232,6 +238,7 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; public const TYPE_VISACHECKOUT = 'visacheckout'; /** @@ -244,6 +251,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -274,6 +282,7 @@ public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('visaCheckoutCallId', $data ?? [], null); } @@ -399,6 +408,30 @@ public function setFundingSource($fundingSource) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/WeChatPayDetails.php b/src/Adyen/Model/Checkout/WeChatPayDetails.php index 4c3f58636..a801572fa 100644 --- a/src/Adyen/Model/Checkout/WeChatPayDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayDetails.php @@ -42,6 +42,7 @@ class WeChatPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', + 'sdkData' => 'string', 'type' => 'string' ]; @@ -54,6 +55,7 @@ class WeChatPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'checkoutAttemptId' => null, + 'sdkData' => null, 'type' => null ]; @@ -64,6 +66,7 @@ class WeChatPayDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'checkoutAttemptId' => false, + 'sdkData' => false, 'type' => false ]; @@ -154,6 +157,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', + 'sdkData' => 'sdkData', 'type' => 'type' ]; @@ -164,6 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'sdkData' => 'setSdkData', 'type' => 'setType' ]; @@ -174,6 +179,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'sdkData' => 'getSdkData', 'type' => 'getType' ]; @@ -249,6 +255,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -327,6 +334,30 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index 6743b7319..121cb2d45 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -44,6 +44,9 @@ class WeChatPayMiniProgramDetails implements ModelInterface, ArrayAccess, \JsonS 'appId' => 'string', 'checkoutAttemptId' => 'string', 'openid' => 'string', + 'recurringDetailReference' => 'string', + 'sdkData' => 'string', + 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -58,6 +61,9 @@ class WeChatPayMiniProgramDetails implements ModelInterface, ArrayAccess, \JsonS 'appId' => null, 'checkoutAttemptId' => null, 'openid' => null, + 'recurringDetailReference' => null, + 'sdkData' => null, + 'storedPaymentMethodId' => null, 'type' => null ]; @@ -70,6 +76,9 @@ class WeChatPayMiniProgramDetails implements ModelInterface, ArrayAccess, \JsonS 'appId' => false, 'checkoutAttemptId' => false, 'openid' => false, + 'recurringDetailReference' => false, + 'sdkData' => false, + 'storedPaymentMethodId' => false, 'type' => false ]; @@ -162,6 +171,9 @@ public function isNullableSetToNull(string $property): bool 'appId' => 'appId', 'checkoutAttemptId' => 'checkoutAttemptId', 'openid' => 'openid', + 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', + 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -174,6 +186,9 @@ public function isNullableSetToNull(string $property): bool 'appId' => 'setAppId', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'openid' => 'setOpenid', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -186,6 +201,9 @@ public function isNullableSetToNull(string $property): bool 'appId' => 'getAppId', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'openid' => 'getOpenid', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -261,6 +279,9 @@ public function __construct(?array $data = null) $this->setIfExists('appId', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('openid', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -387,6 +408,80 @@ public function setOpenid($openid) return $this; } + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + 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 since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + 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) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index 6775fe063..9b9ca86ee 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -44,6 +44,7 @@ class ZipDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => 'string', 'clickAndCollect' => 'string', 'recurringDetailReference' => 'string', + 'sdkData' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class ZipDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => null, 'clickAndCollect' => null, 'recurringDetailReference' => null, + 'sdkData' => null, 'storedPaymentMethodId' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class ZipDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'checkoutAttemptId' => false, 'clickAndCollect' => false, 'recurringDetailReference' => false, + 'sdkData' => false, 'storedPaymentMethodId' => false, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'checkoutAttemptId', 'clickAndCollect' => 'clickAndCollect', 'recurringDetailReference' => 'recurringDetailReference', + 'sdkData' => 'sdkData', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -178,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'setCheckoutAttemptId', 'clickAndCollect' => 'setClickAndCollect', 'recurringDetailReference' => 'setRecurringDetailReference', + 'sdkData' => 'setSdkData', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -191,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'checkoutAttemptId' => 'getCheckoutAttemptId', 'clickAndCollect' => 'getClickAndCollect', 'recurringDetailReference' => 'getRecurringDetailReference', + 'sdkData' => 'getSdkData', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -269,6 +275,7 @@ public function __construct(?array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('clickAndCollect', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -398,6 +405,30 @@ public function setRecurringDetailReference($recurringDetailReference) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets storedPaymentMethodId * diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index d77f1730a..ec6232593 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Payments/AdditionalDataLevel23.php b/src/Adyen/Model/Payments/AdditionalDataLevel23.php index 524e9541a..683825811 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Payments/AdditionalDataLevel23.php @@ -542,7 +542,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. * * @return self */ @@ -782,7 +782,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. + * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * For L2 data: must not be all zeroes. * For L3 data: can be zero. * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php index 19f267341..e9f8e5872 100644 --- a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php @@ -531,7 +531,7 @@ public function getSubMerchantSubSellerSubSellerNrPhoneNumber() /** * Sets subMerchantSubSellerSubSellerNrPhoneNumber * - * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant. * Format: Alphanumeric and special characters * Maximum length: 20 characters * * @return self */ diff --git a/src/Adyen/Model/Payments/Amount.php b/src/Adyen/Model/Payments/Amount.php index 312dbf0af..ef51cbda2 100644 --- a/src/Adyen/Model/Payments/Amount.php +++ b/src/Adyen/Model/Payments/Amount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount. * * @return self */ @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + * @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @return self */ diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 7938941f0..13446888e 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index 667c6b33c..7f6bcb938 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -534,6 +534,7 @@ public function getModelName() public const ENTITY_TYPE_COMPANY_NAME = 'CompanyName'; public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; 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'; @@ -564,6 +565,7 @@ public function getFundingSourceAllowableValues() return [ self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, ]; } /** @@ -1288,7 +1290,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @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 and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters. + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If this parameter is left empty, not provided, or not applicable (in case of cross-border transactions), then **shopperStatement** is used. Currently, `localizedShopperStatement` is only supported for payments with Visa, Mastercard, JCB, Diners, and Discover. **Supported characters**: Hiragana, Katakana, Kanji, and alphanumeric. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index 1964f2077..80376953a 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -1015,7 +1015,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @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 and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters. + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If this parameter is left empty, not provided, or not applicable (in case of cross-border transactions), then **shopperStatement** is used. Currently, `localizedShopperStatement` is only supported for payments with Visa, Mastercard, JCB, Diners, and Discover. **Supported characters**: Hiragana, Katakana, Kanji, and alphanumeric. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index 4d22ade22..9f2a27994 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -1015,7 +1015,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @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 and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters. + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If this parameter is left empty, not provided, or not applicable (in case of cross-border transactions), then **shopperStatement** is used. Currently, `localizedShopperStatement` is only supported for payments with Visa, Mastercard, JCB, Diners, and Discover. **Supported characters**: Hiragana, Katakana, Kanji, and alphanumeric. * * @return self */ diff --git a/src/Adyen/Model/Payments/Recurring.php b/src/Adyen/Model/Payments/Recurring.php index 330a96d4d..9ccd30a0f 100644 --- a/src/Adyen/Model/Payments/Recurring.php +++ b/src/Adyen/Model/Payments/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php index 7fa24f347..409537796 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php @@ -43,6 +43,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPITypes = [ 'sepadirectdebitDateOfSignature' => 'string', 'sepadirectdebitMandateId' => 'string', + 'sepadirectdebitSepadirectdebitDueDate' => 'string', 'sepadirectdebitSequenceType' => 'string' ]; @@ -56,6 +57,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPIFormats = [ 'sepadirectdebitDateOfSignature' => null, 'sepadirectdebitMandateId' => null, + 'sepadirectdebitSepadirectdebitDueDate' => null, 'sepadirectdebitSequenceType' => null ]; @@ -67,6 +69,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPINullables = [ 'sepadirectdebitDateOfSignature' => false, 'sepadirectdebitMandateId' => false, + 'sepadirectdebitSepadirectdebitDueDate' => false, 'sepadirectdebitSequenceType' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'sepadirectdebitDateOfSignature' => 'sepadirectdebit.dateOfSignature', 'sepadirectdebitMandateId' => 'sepadirectdebit.mandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'sepadirectdebit.sepadirectdebit.dueDate', 'sepadirectdebitSequenceType' => 'sepadirectdebit.sequenceType' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'sepadirectdebitDateOfSignature' => 'setSepadirectdebitDateOfSignature', 'sepadirectdebitMandateId' => 'setSepadirectdebitMandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'setSepadirectdebitSepadirectdebitDueDate', 'sepadirectdebitSequenceType' => 'setSepadirectdebitSequenceType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'sepadirectdebitDateOfSignature' => 'getSepadirectdebitDateOfSignature', 'sepadirectdebitMandateId' => 'getSepadirectdebitMandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'getSepadirectdebitSepadirectdebitDueDate', 'sepadirectdebitSequenceType' => 'getSepadirectdebitSequenceType' ]; @@ -242,6 +248,7 @@ public function __construct(?array $data = null) { $this->setIfExists('sepadirectdebitDateOfSignature', $data ?? [], null); $this->setIfExists('sepadirectdebitMandateId', $data ?? [], null); + $this->setIfExists('sepadirectdebitSepadirectdebitDueDate', $data ?? [], null); $this->setIfExists('sepadirectdebitSequenceType', $data ?? [], null); } @@ -335,6 +342,30 @@ public function setSepadirectdebitMandateId($sepadirectdebitMandateId) return $this; } + /** + * Gets sepadirectdebitSepadirectdebitDueDate + * + * @return string|null + */ + public function getSepadirectdebitSepadirectdebitDueDate() + { + return $this->container['sepadirectdebitSepadirectdebitDueDate']; + } + + /** + * Sets sepadirectdebitSepadirectdebitDueDate + * + * @param string|null $sepadirectdebitSepadirectdebitDueDate The date that the the shopper's bank account is charged. + * + * @return self + */ + public function setSepadirectdebitSepadirectdebitDueDate($sepadirectdebitSepadirectdebitDueDate) + { + $this->container['sepadirectdebitSepadirectdebitDueDate'] = $sepadirectdebitSepadirectdebitDueDate; + + return $this; + } + /** * Gets sepadirectdebitSequenceType * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php b/src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php new file mode 100644 index 000000000..31e787738 --- /dev/null +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php @@ -0,0 +1,404 @@ + + */ +class ResponseAdditionalDataSwish implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSwish'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'swishPayerAlias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'swishPayerAlias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'swishPayerAlias' => 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 = [ + 'swishPayerAlias' => 'swish.payerAlias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'swishPayerAlias' => 'setSwishPayerAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'swishPayerAlias' => 'getSwishPayerAlias' + ]; + + /** + * 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('swishPayerAlias', $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 swishPayerAlias + * + * @return string|null + */ + public function getSwishPayerAlias() + { + return $this->container['swishPayerAlias']; + } + + /** + * Sets swishPayerAlias + * + * @param string|null $swishPayerAlias A Swish shopper's telephone number. + * + * @return self + */ + public function setSwishPayerAlias($swishPayerAlias) + { + $this->container['swishPayerAlias'] = $swishPayerAlias; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index 1cccd3c73..6edebbf62 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -464,7 +464,7 @@ public function getType() /** * Sets type * - * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. + * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: Books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: The aggregated amount of the interchange and scheme fees. * **PaymentFee**: The aggregated amount of all transaction fees. * **AdyenFees**: The aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: The transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: The transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: The fees paid to the issuer for each payment made with the card network. * **SchemeFee**: The fees paid to the card scheme for using their network. * **Commission**: Your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: The amount left over after a currency conversion, booked to the specified `account`. * **Surcharge**: The payment acceptance fee imposed by the card scheme or debit network provider, paid by your user's customer. * **TopUp**: Allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: The value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: In very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. * * @return self */ diff --git a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index a9aae963f..9f9959282 100644 --- a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php +++ b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Payout/Amount.php b/src/Adyen/Model/Payout/Amount.php index edee8aa1f..250c18227 100644 --- a/src/Adyen/Model/Payout/Amount.php +++ b/src/Adyen/Model/Payout/Amount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount. * * @return self */ @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + * @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @return self */ diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index 1f3961622..96e192c0c 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index 27af5f886..aa7be240e 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php index c687f4e66..6d26d4801 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php @@ -43,6 +43,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPITypes = [ 'sepadirectdebitDateOfSignature' => 'string', 'sepadirectdebitMandateId' => 'string', + 'sepadirectdebitSepadirectdebitDueDate' => 'string', 'sepadirectdebitSequenceType' => 'string' ]; @@ -56,6 +57,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPIFormats = [ 'sepadirectdebitDateOfSignature' => null, 'sepadirectdebitMandateId' => null, + 'sepadirectdebitSepadirectdebitDueDate' => null, 'sepadirectdebitSequenceType' => null ]; @@ -67,6 +69,7 @@ class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPINullables = [ 'sepadirectdebitDateOfSignature' => false, 'sepadirectdebitMandateId' => false, + 'sepadirectdebitSepadirectdebitDueDate' => false, 'sepadirectdebitSequenceType' => false ]; @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'sepadirectdebitDateOfSignature' => 'sepadirectdebit.dateOfSignature', 'sepadirectdebitMandateId' => 'sepadirectdebit.mandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'sepadirectdebit.sepadirectdebit.dueDate', 'sepadirectdebitSequenceType' => 'sepadirectdebit.sequenceType' ]; @@ -169,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'sepadirectdebitDateOfSignature' => 'setSepadirectdebitDateOfSignature', 'sepadirectdebitMandateId' => 'setSepadirectdebitMandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'setSepadirectdebitSepadirectdebitDueDate', 'sepadirectdebitSequenceType' => 'setSepadirectdebitSequenceType' ]; @@ -180,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'sepadirectdebitDateOfSignature' => 'getSepadirectdebitDateOfSignature', 'sepadirectdebitMandateId' => 'getSepadirectdebitMandateId', + 'sepadirectdebitSepadirectdebitDueDate' => 'getSepadirectdebitSepadirectdebitDueDate', 'sepadirectdebitSequenceType' => 'getSepadirectdebitSequenceType' ]; @@ -242,6 +248,7 @@ public function __construct(?array $data = null) { $this->setIfExists('sepadirectdebitDateOfSignature', $data ?? [], null); $this->setIfExists('sepadirectdebitMandateId', $data ?? [], null); + $this->setIfExists('sepadirectdebitSepadirectdebitDueDate', $data ?? [], null); $this->setIfExists('sepadirectdebitSequenceType', $data ?? [], null); } @@ -335,6 +342,30 @@ public function setSepadirectdebitMandateId($sepadirectdebitMandateId) return $this; } + /** + * Gets sepadirectdebitSepadirectdebitDueDate + * + * @return string|null + */ + public function getSepadirectdebitSepadirectdebitDueDate() + { + return $this->container['sepadirectdebitSepadirectdebitDueDate']; + } + + /** + * Sets sepadirectdebitSepadirectdebitDueDate + * + * @param string|null $sepadirectdebitSepadirectdebitDueDate The date that the the shopper's bank account is charged. + * + * @return self + */ + public function setSepadirectdebitSepadirectdebitDueDate($sepadirectdebitSepadirectdebitDueDate) + { + $this->container['sepadirectdebitSepadirectdebitDueDate'] = $sepadirectdebitSepadirectdebitDueDate; + + return $this; + } + /** * Gets sepadirectdebitSequenceType * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php b/src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php new file mode 100644 index 000000000..157908bc8 --- /dev/null +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php @@ -0,0 +1,404 @@ + + */ +class ResponseAdditionalDataSwish implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSwish'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'swishPayerAlias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'swishPayerAlias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'swishPayerAlias' => 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 = [ + 'swishPayerAlias' => 'swish.payerAlias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'swishPayerAlias' => 'setSwishPayerAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'swishPayerAlias' => 'getSwishPayerAlias' + ]; + + /** + * 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('swishPayerAlias', $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 swishPayerAlias + * + * @return string|null + */ + public function getSwishPayerAlias() + { + return $this->container['swishPayerAlias']; + } + + /** + * Sets swishPayerAlias + * + * @param string|null $swishPayerAlias A Swish shopper's telephone number. + * + * @return self + */ + public function setSwishPayerAlias($swishPayerAlias) + { + $this->container['swishPayerAlias'] = $swishPayerAlias; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index cf8a85eb6..6ed79921b 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Recurring/Amount.php b/src/Adyen/Model/Recurring/Amount.php index e998e31ec..cb131ca89 100644 --- a/src/Adyen/Model/Recurring/Amount.php +++ b/src/Adyen/Model/Recurring/Amount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount. * * @return self */ @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + * @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @return self */ diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 50f6dc097..ad9f78192 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index 47aa00f8b..9f4a272ec 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/StoredValue/Amount.php b/src/Adyen/Model/StoredValue/Amount.php index 893e6aadf..2bde1a1d3 100644 --- a/src/Adyen/Model/StoredValue/Amount.php +++ b/src/Adyen/Model/StoredValue/Amount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount. * * @return self */ @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @return self */ diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index 1bf61977b..ffd02efdc 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Service/Checkout/DonationsApi.php b/src/Adyen/Service/Checkout/DonationsApi.php index 0cadbe4c7..63caab460 100644 --- a/src/Adyen/Service/Checkout/DonationsApi.php +++ b/src/Adyen/Service/Checkout/DonationsApi.php @@ -55,7 +55,7 @@ public function donationCampaigns(\Adyen\Model\Checkout\DonationCampaignsRequest } /** - * Start a transaction for donations + * Make a donation * * @param \Adyen\Model\Checkout\DonationPaymentRequest $donationPaymentRequest * @param array|null $requestOptions diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 70f099ede..a26791bc2 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,13 +44,29 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + + } + + /** + * Forward stored payment details + * + * @param \Adyen\Model\Checkout\CheckoutForwardRequest $checkoutForwardRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Checkout\CheckoutForwardResponse + * @throws AdyenException + */ + public function forward(\Adyen\Model\Checkout\CheckoutForwardRequest $checkoutForwardRequest, ?array $requestOptions = null): \Adyen\Model\Checkout\CheckoutForwardResponse + { + $endpoint = $this->baseURL . "/forward"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $checkoutForwardRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\CheckoutForwardResponse::class); } /** diff --git a/src/Adyen/Service/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index 6bbb00557..4559f214a 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -57,7 +57,7 @@ public function getApplePaySession(\Adyen\Model\Checkout\ApplePaySessionRequest /** * Create originKey values for domains * - * @deprecated since Adyen Checkout API v67. + * @deprecated since Adyen Checkout API v67. * @param \Adyen\Model\Checkout\UtilityRequest $utilityRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\UtilityResponse diff --git a/src/Adyen/Service/RecurringApi.php b/src/Adyen/Service/RecurringApi.php index 3a815a3f0..40cb5353b 100644 --- a/src/Adyen/Service/RecurringApi.php +++ b/src/Adyen/Service/RecurringApi.php @@ -36,13 +36,13 @@ 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://pal-test.adyen.com/pal/servlet/Recurring/v68"); + $this->baseURL = $this->createBaseUrl("https://paltokenization-test.adyen.com/pal/servlet/Recurring/v68"); } /** * Create new permits linked to a recurring contract. * - * @deprecated since Adyen Recurring API v68. + * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\CreatePermitRequest $createPermitRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\CreatePermitResult @@ -58,7 +58,6 @@ public function createPermit(\Adyen\Model\Recurring\CreatePermitRequest $createP /** * Disable stored payment details * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\DisableRequest $disableRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\DisableResult @@ -74,7 +73,7 @@ public function disable(\Adyen\Model\Recurring\DisableRequest $disableRequest, ? /** * Disable an existing permit. * - * @deprecated since Adyen Recurring API v68. + * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\DisablePermitRequest $disablePermitRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\DisablePermitResult @@ -90,7 +89,6 @@ public function disablePermit(\Adyen\Model\Recurring\DisablePermitRequest $disab /** * Get stored payment details * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\RecurringDetailsRequest $recurringDetailsRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\RecurringDetailsResult @@ -106,7 +104,6 @@ public function listRecurringDetails(\Adyen\Model\Recurring\RecurringDetailsRequ /** * Ask issuer to notify the shopper * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\NotifyShopperRequest $notifyShopperRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\NotifyShopperResult @@ -122,7 +119,6 @@ public function notifyShopper(\Adyen\Model\Recurring\NotifyShopperRequest $notif /** * Schedule running the Account Updater * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\ScheduleAccountUpdaterRequest $scheduleAccountUpdaterRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\ScheduleAccountUpdaterResult From 8049c340d18b668d487b23701d4a3b7eb262d9bd Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot Date: Thu, 8 Jan 2026 14:38:13 +0000 Subject: [PATCH 2/2] style(fmt): code formatted --- src/Adyen/Model/BinLookup/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/Checkout/CheckoutPaymentMethod.php | 4 ++-- src/Adyen/Model/Checkout/MbwayDetails.php | 4 ++-- src/Adyen/Model/Checkout/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/Checkout/PayToPaymentMethod.php | 1 + src/Adyen/Model/Checkout/Result.php | 2 +- src/Adyen/Model/Checkout/UPIPaymentMethod.php | 1 + src/Adyen/Model/Checkout/VippsDetails.php | 2 +- src/Adyen/Model/Disputes/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/Payments/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/PaymentsApp/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/Payout/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/PosMobile/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/Recurring/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/StoredValue/ObjectSerializer.php | 6 ++++-- src/Adyen/Service/Checkout/RecurringApi.php | 3 +-- src/Adyen/Service/Checkout/UtilityApi.php | 2 +- src/Adyen/Service/RecurringApi.php | 4 ++-- 18 files changed, 48 insertions(+), 29 deletions(-) diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index d9c9dec53..67b57c23b 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index c8001bcdb..dcaa04edf 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -2166,7 +2166,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -2190,7 +2190,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index 36162b567..0bab34d56 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -389,7 +389,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -413,7 +413,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 1e8e6df61..c9a8102b9 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Checkout/PayToPaymentMethod.php b/src/Adyen/Model/Checkout/PayToPaymentMethod.php index b2ff170fa..efd654a37 100644 --- a/src/Adyen/Model/Checkout/PayToPaymentMethod.php +++ b/src/Adyen/Model/Checkout/PayToPaymentMethod.php @@ -14,6 +14,7 @@ namespace Adyen\Model\Checkout; + use Adyen\Model\Checkout\ObjectSerializer; /** diff --git a/src/Adyen/Model/Checkout/Result.php b/src/Adyen/Model/Checkout/Result.php index 6dd17f86e..f409e9302 100644 --- a/src/Adyen/Model/Checkout/Result.php +++ b/src/Adyen/Model/Checkout/Result.php @@ -14,6 +14,7 @@ namespace Adyen\Model\Checkout; + use Adyen\Model\Checkout\ObjectSerializer; /** @@ -45,4 +46,3 @@ public static function getAllowableEnumValues() ]; } } - diff --git a/src/Adyen/Model/Checkout/UPIPaymentMethod.php b/src/Adyen/Model/Checkout/UPIPaymentMethod.php index 7ce446609..785ca65d6 100644 --- a/src/Adyen/Model/Checkout/UPIPaymentMethod.php +++ b/src/Adyen/Model/Checkout/UPIPaymentMethod.php @@ -14,6 +14,7 @@ namespace Adyen\Model\Checkout; + use Adyen\Model\Checkout\ObjectSerializer; /** diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 0782e9ef0..f6f982c8c 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -443,7 +443,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index ec6232593..d77f1730a 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 13446888e..7938941f0 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index 9f9959282..a9aae963f 100644 --- a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php +++ b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index 96e192c0c..1f3961622 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index 6ed79921b..cf8a85eb6 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index ad9f78192..50f6dc097 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index ffd02efdc..1bf61977b 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index a26791bc2..283168c91 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]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index 4559f214a..6bbb00557 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -57,7 +57,7 @@ public function getApplePaySession(\Adyen\Model\Checkout\ApplePaySessionRequest /** * Create originKey values for domains * - * @deprecated since Adyen Checkout API v67. + * @deprecated since Adyen Checkout API v67. * @param \Adyen\Model\Checkout\UtilityRequest $utilityRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\UtilityResponse diff --git a/src/Adyen/Service/RecurringApi.php b/src/Adyen/Service/RecurringApi.php index 40cb5353b..2153c288f 100644 --- a/src/Adyen/Service/RecurringApi.php +++ b/src/Adyen/Service/RecurringApi.php @@ -42,7 +42,7 @@ public function __construct(Client $client) /** * Create new permits linked to a recurring contract. * - * @deprecated since Adyen Recurring API v68. + * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\CreatePermitRequest $createPermitRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\CreatePermitResult @@ -73,7 +73,7 @@ public function disable(\Adyen\Model\Recurring\DisableRequest $disableRequest, ? /** * Disable an existing permit. * - * @deprecated since Adyen Recurring API v68. + * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\DisablePermitRequest $disablePermitRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\DisablePermitResult