diff --git a/src/Adyen/Model/BinLookup/CostEstimateRequest.php b/src/Adyen/Model/BinLookup/CostEstimateRequest.php index b3b0d40d..b303f025 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateRequest.php +++ b/src/Adyen/Model/BinLookup/CostEstimateRequest.php @@ -611,7 +611,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index de25cee5..7940bd11 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -487,7 +487,7 @@ public function getThreeDSVersion() /** * Sets threeDSVersion * - * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. + * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. * * @return self */ diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index a8e61d28..533b4a85 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -1487,7 +1487,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 970aae68..83ed0d27 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -106,6 +106,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'payerSelected' => 'string', 'shopperAccountIdentifier' => 'string', 'virtualPaymentAddress' => 'string', + 'pixRecurring' => '\Adyen\Model\Checkout\PixRecurring', 'bank' => 'string', 'clientType' => 'string', 'identification' => 'string', @@ -189,6 +190,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'payerSelected' => null, 'shopperAccountIdentifier' => null, 'virtualPaymentAddress' => null, + 'pixRecurring' => null, 'bank' => null, 'clientType' => null, 'identification' => null, @@ -270,6 +272,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'payerSelected' => false, 'shopperAccountIdentifier' => false, 'virtualPaymentAddress' => false, + 'pixRecurring' => false, 'bank' => false, 'clientType' => false, 'identification' => false, @@ -431,6 +434,7 @@ public function isNullableSetToNull(string $property): bool 'payerSelected' => 'payerSelected', 'shopperAccountIdentifier' => 'shopperAccountIdentifier', 'virtualPaymentAddress' => 'virtualPaymentAddress', + 'pixRecurring' => 'pixRecurring', 'bank' => 'bank', 'clientType' => 'clientType', 'identification' => 'identification', @@ -512,6 +516,7 @@ public function isNullableSetToNull(string $property): bool 'payerSelected' => 'setPayerSelected', 'shopperAccountIdentifier' => 'setShopperAccountIdentifier', 'virtualPaymentAddress' => 'setVirtualPaymentAddress', + 'pixRecurring' => 'setPixRecurring', 'bank' => 'setBank', 'clientType' => 'setClientType', 'identification' => 'setIdentification', @@ -593,6 +598,7 @@ public function isNullableSetToNull(string $property): bool 'payerSelected' => 'getPayerSelected', 'shopperAccountIdentifier' => 'getShopperAccountIdentifier', 'virtualPaymentAddress' => 'getVirtualPaymentAddress', + 'pixRecurring' => 'getPixRecurring', 'bank' => 'getBank', 'clientType' => 'getClientType', 'identification' => 'getIdentification', @@ -724,6 +730,7 @@ public function __construct(array $data = null) $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('shopperAccountIdentifier', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); + $this->setIfExists('pixRecurring', $data ?? [], null); $this->setIfExists('bank', $data ?? [], null); $this->setIfExists('clientType', $data ?? [], null); $this->setIfExists('identification', $data ?? [], null); @@ -2308,6 +2315,30 @@ public function setVirtualPaymentAddress($virtualPaymentAddress) return $this; } + /** + * Gets pixRecurring + * + * @return \Adyen\Model\Checkout\PixRecurring|null + */ + public function getPixRecurring() + { + return $this->container['pixRecurring']; + } + + /** + * Sets pixRecurring + * + * @param \Adyen\Model\Checkout\PixRecurring|null $pixRecurring pixRecurring + * + * @return self + */ + public function setPixRecurring($pixRecurring) + { + $this->container['pixRecurring'] = $pixRecurring; + + return $this; + } + /** * Gets bank * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index 6df95225..ee2540b4 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -1991,7 +1991,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $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 */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index b30cae2d..f657c412 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -2066,7 +2066,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $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 */ diff --git a/src/Adyen/Model/Checkout/FundRecipient.php b/src/Adyen/Model/Checkout/FundRecipient.php index 5a9ca982..981e65ae 100644 --- a/src/Adyen/Model/Checkout/FundRecipient.php +++ b/src/Adyen/Model/Checkout/FundRecipient.php @@ -515,7 +515,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index e8a9b81c..d0eb9e18 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -253,7 +253,6 @@ public function getModelName() public const TYPE_MOLPAY_EBANKING_MY = 'molpay_ebanking_MY'; public const TYPE_MOLPAY_EBANKING_DIRECT_MY = 'molpay_ebanking_direct_MY'; public const TYPE_SWISH = 'swish'; - public const TYPE_PIX = 'pix'; public const TYPE_BIZUM = 'bizum'; public const TYPE_WALLEY = 'walley'; public const TYPE_WALLEY_B2B = 'walley_b2b'; @@ -351,7 +350,6 @@ public function getTypeAllowableValues() self::TYPE_MOLPAY_EBANKING_MY, self::TYPE_MOLPAY_EBANKING_DIRECT_MY, self::TYPE_SWISH, - self::TYPE_PIX, self::TYPE_BIZUM, self::TYPE_WALLEY, self::TYPE_WALLEY_B2B, diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index 97567b6b..4c1a688e 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -1418,7 +1418,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $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 */ diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index 9b45c173..0f7fcf1d 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -1508,7 +1508,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $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 */ diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index 0089c1ad..bdd76152 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -683,7 +683,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Checkout/PaymentRefundResponse.php b/src/Adyen/Model/Checkout/PaymentRefundResponse.php index 55ce4a54..fb1b3d50 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundResponse.php +++ b/src/Adyen/Model/Checkout/PaymentRefundResponse.php @@ -45,6 +45,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', + 'capturePspReference' => 'string', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', @@ -65,6 +66,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'amount' => null, + 'capturePspReference' => null, 'lineItems' => null, 'merchantAccount' => null, 'merchantRefundReason' => null, @@ -83,6 +85,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPINullables = [ 'amount' => false, + 'capturePspReference' => false, 'lineItems' => false, 'merchantAccount' => false, 'merchantRefundReason' => true, @@ -181,6 +184,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'amount' => 'amount', + 'capturePspReference' => 'capturePspReference', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', @@ -199,6 +203,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'amount' => 'setAmount', + 'capturePspReference' => 'setCapturePspReference', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', @@ -217,6 +222,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'amount' => 'getAmount', + 'capturePspReference' => 'getCapturePspReference', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', @@ -318,6 +324,7 @@ public function getStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('capturePspReference', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantRefundReason', $data ?? [], null); @@ -428,6 +435,30 @@ public function setAmount($amount) return $this; } + /** + * Gets capturePspReference + * + * @return string|null + */ + public function getCapturePspReference() + { + return $this->container['capturePspReference']; + } + + /** + * Sets capturePspReference + * + * @param string|null $capturePspReference This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. + * + * @return self + */ + public function setCapturePspReference($capturePspReference) + { + $this->container['capturePspReference'] = $capturePspReference; + + return $this; + } + /** * Gets lineItems * diff --git a/src/Adyen/Model/Checkout/PixDetails.php b/src/Adyen/Model/Checkout/PixDetails.php new file mode 100644 index 00000000..752d1a84 --- /dev/null +++ b/src/Adyen/Model/Checkout/PixDetails.php @@ -0,0 +1,564 @@ + + */ +class PixDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PixDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'pixRecurring' => '\Adyen\Model\Checkout\PixRecurring', + 'recurringDetailReference' => '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 = [ + 'checkoutAttemptId' => null, + 'pixRecurring' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'pixRecurring' => false, + 'recurringDetailReference' => 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 = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'pixRecurring' => 'pixRecurring', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'pixRecurring' => 'setPixRecurring', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'pixRecurring' => 'getPixRecurring', + 'recurringDetailReference' => 'getRecurringDetailReference', + '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_PIX = 'pix'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PIX, + ]; + } + /** + * 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('pixRecurring', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $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 = []; + + $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 pixRecurring + * + * @return \Adyen\Model\Checkout\PixRecurring|null + */ + public function getPixRecurring() + { + return $this->container['pixRecurring']; + } + + /** + * Sets pixRecurring + * + * @param \Adyen\Model\Checkout\PixRecurring|null $pixRecurring pixRecurring + * + * @return self + */ + public function setPixRecurring($pixRecurring) + { + $this->container['pixRecurring'] = $pixRecurring; + + 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 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|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The payment method type. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * 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/PixRecurring.php b/src/Adyen/Model/Checkout/PixRecurring.php new file mode 100644 index 00000000..1e2044a7 --- /dev/null +++ b/src/Adyen/Model/Checkout/PixRecurring.php @@ -0,0 +1,694 @@ + + */ +class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PixRecurring'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'billingDate' => 'string', + 'endsAt' => 'string', + 'frequency' => 'string', + 'minAmount' => '\Adyen\Model\Checkout\Amount', + 'originalPspReference' => 'string', + 'recurringAmount' => '\Adyen\Model\Checkout\Amount', + 'recurringStatement' => 'string', + 'retryPolicy' => 'bool', + 'startsAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'billingDate' => null, + 'endsAt' => null, + 'frequency' => null, + 'minAmount' => null, + 'originalPspReference' => null, + 'recurringAmount' => null, + 'recurringStatement' => null, + 'retryPolicy' => null, + 'startsAt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'billingDate' => false, + 'endsAt' => false, + 'frequency' => false, + 'minAmount' => false, + 'originalPspReference' => false, + 'recurringAmount' => false, + 'recurringStatement' => false, + 'retryPolicy' => false, + 'startsAt' => 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 = [ + 'billingDate' => 'billingDate', + 'endsAt' => 'endsAt', + 'frequency' => 'frequency', + 'minAmount' => 'minAmount', + 'originalPspReference' => 'originalPspReference', + 'recurringAmount' => 'recurringAmount', + 'recurringStatement' => 'recurringStatement', + 'retryPolicy' => 'retryPolicy', + 'startsAt' => 'startsAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'billingDate' => 'setBillingDate', + 'endsAt' => 'setEndsAt', + 'frequency' => 'setFrequency', + 'minAmount' => 'setMinAmount', + 'originalPspReference' => 'setOriginalPspReference', + 'recurringAmount' => 'setRecurringAmount', + 'recurringStatement' => 'setRecurringStatement', + 'retryPolicy' => 'setRetryPolicy', + 'startsAt' => 'setStartsAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'billingDate' => 'getBillingDate', + 'endsAt' => 'getEndsAt', + 'frequency' => 'getFrequency', + 'minAmount' => 'getMinAmount', + 'originalPspReference' => 'getOriginalPspReference', + 'recurringAmount' => 'getRecurringAmount', + 'recurringStatement' => 'getRecurringStatement', + 'retryPolicy' => 'getRetryPolicy', + 'startsAt' => 'getStartsAt' + ]; + + /** + * 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 FREQUENCY_WEEKLY = 'weekly'; + public const FREQUENCY_MONTHLY = 'monthly'; + public const FREQUENCY_QUARTERLY = 'quarterly'; + public const FREQUENCY_HALF_YEARLY = 'half-yearly'; + public const FREQUENCY_YEARLY = 'yearly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFrequencyAllowableValues() + { + return [ + self::FREQUENCY_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('billingDate', $data ?? [], null); + $this->setIfExists('endsAt', $data ?? [], null); + $this->setIfExists('frequency', $data ?? [], null); + $this->setIfExists('minAmount', $data ?? [], null); + $this->setIfExists('originalPspReference', $data ?? [], null); + $this->setIfExists('recurringAmount', $data ?? [], null); + $this->setIfExists('recurringStatement', $data ?? [], null); + $this->setIfExists('retryPolicy', $data ?? [], null); + $this->setIfExists('startsAt', $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->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) + ); + } + + 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 billingDate + * + * @return string|null + */ + public function getBillingDate() + { + return $this->container['billingDate']; + } + + /** + * Sets billingDate + * + * @param string|null $billingDate The date on which the shopper's payment method will be charged, in YYYY-MM-DD format. + * + * @return self + */ + public function setBillingDate($billingDate) + { + $this->container['billingDate'] = $billingDate; + + return $this; + } + + /** + * Gets endsAt + * + * @return string|null + */ + public function getEndsAt() + { + return $this->container['endsAt']; + } + + /** + * Sets endsAt + * + * @param string|null $endsAt End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper. + * + * @return self + */ + public function setEndsAt($endsAt) + { + $this->container['endsAt'] = $endsAt; + + return $this; + } + + /** + * Gets frequency + * + * @return string|null + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string|null $frequency The frequency at which the shopper will be charged. + * + * @return self + */ + public function setFrequency($frequency) + { + $allowedValues = $this->getFrequencyAllowableValues(); + if (!in_array($frequency, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'frequency', must be one of '%s'", + $frequency, + implode("', '", $allowedValues) + ) + ); + } + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets minAmount + * + * @return \Adyen\Model\Checkout\Amount|null + */ + public function getMinAmount() + { + return $this->container['minAmount']; + } + + /** + * Sets minAmount + * + * @param \Adyen\Model\Checkout\Amount|null $minAmount minAmount + * + * @return self + */ + public function setMinAmount($minAmount) + { + $this->container['minAmount'] = $minAmount; + + return $this; + } + + /** + * Gets originalPspReference + * + * @return string|null + */ + public function getOriginalPspReference() + { + return $this->container['originalPspReference']; + } + + /** + * Sets originalPspReference + * + * @param string|null $originalPspReference The pspReference for the failed recurring payment. Find this in AUTHORISATION webhook you received after the billing date. + * + * @return self + */ + public function setOriginalPspReference($originalPspReference) + { + $this->container['originalPspReference'] = $originalPspReference; + + return $this; + } + + /** + * Gets recurringAmount + * + * @return \Adyen\Model\Checkout\Amount|null + */ + public function getRecurringAmount() + { + return $this->container['recurringAmount']; + } + + /** + * Sets recurringAmount + * + * @param \Adyen\Model\Checkout\Amount|null $recurringAmount recurringAmount + * + * @return self + */ + public function setRecurringAmount($recurringAmount) + { + $this->container['recurringAmount'] = $recurringAmount; + + return $this; + } + + /** + * Gets recurringStatement + * + * @return string|null + */ + public function getRecurringStatement() + { + return $this->container['recurringStatement']; + } + + /** + * Sets recurringStatement + * + * @param string|null $recurringStatement The text that that will be shown on the shopper's bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. Maximum length: 35 characters. + * + * @return self + */ + public function setRecurringStatement($recurringStatement) + { + $this->container['recurringStatement'] = $recurringStatement; + + return $this; + } + + /** + * Gets retryPolicy + * + * @return bool|null + */ + public function getRetryPolicy() + { + return $this->container['retryPolicy']; + } + + /** + * Sets retryPolicy + * + * @param bool|null $retryPolicy When set to true, you can retry for failed recurring payments. The default value is true. + * + * @return self + */ + public function setRetryPolicy($retryPolicy) + { + $this->container['retryPolicy'] = $retryPolicy; + + 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. The default value is the transaction date. + * + * @return self + */ + public function setStartsAt($startsAt) + { + $this->container['startsAt'] = $startsAt; + + 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/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index 92cd71d4..c0cd9de8 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -101,6 +101,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => 'string', 'threeDOfferedResponse' => 'string', 'threeDSVersion' => 'string', + 'tokenizationShopperReference' => 'string', + 'tokenizationStoreOperationType' => 'string', + 'tokenizationStoredPaymentMethodId' => 'string', 'visaTransactionId' => 'string', 'xid' => 'string' ]; @@ -170,6 +173,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => null, 'threeDOfferedResponse' => null, 'threeDSVersion' => null, + 'tokenizationShopperReference' => null, + 'tokenizationStoreOperationType' => null, + 'tokenizationStoredPaymentMethodId' => null, 'visaTransactionId' => null, 'xid' => null ]; @@ -237,6 +243,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => false, 'threeDOfferedResponse' => false, 'threeDSVersion' => false, + 'tokenizationShopperReference' => false, + 'tokenizationStoreOperationType' => false, + 'tokenizationStoredPaymentMethodId' => false, 'visaTransactionId' => false, 'xid' => false ]; @@ -384,6 +393,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'threeDOffered', 'threeDOfferedResponse' => 'threeDOfferedResponse', 'threeDSVersion' => 'threeDSVersion', + 'tokenizationShopperReference' => 'tokenization.shopperReference', + 'tokenizationStoreOperationType' => 'tokenization.store.operationType', + 'tokenizationStoredPaymentMethodId' => 'tokenization.storedPaymentMethodId', 'visaTransactionId' => 'visaTransactionId', 'xid' => 'xid' ]; @@ -451,6 +463,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'setThreeDOffered', 'threeDOfferedResponse' => 'setThreeDOfferedResponse', 'threeDSVersion' => 'setThreeDSVersion', + 'tokenizationShopperReference' => 'setTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'setTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'setTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'setVisaTransactionId', 'xid' => 'setXid' ]; @@ -518,6 +533,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'getThreeDOffered', 'threeDOfferedResponse' => 'getThreeDOfferedResponse', 'threeDSVersion' => 'getThreeDSVersion', + 'tokenizationShopperReference' => 'getTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'getTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'getTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'getVisaTransactionId', 'xid' => 'getXid' ]; @@ -568,6 +586,9 @@ public function getModelName() 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'; + public const TOKENIZATION_STORE_OPERATION_TYPE_CREATED = 'created'; + public const TOKENIZATION_STORE_OPERATION_TYPE_UPDATED = 'updated'; + public const TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING = 'alreadyExisting'; /** * Gets allowable values of the enum @@ -594,6 +615,19 @@ public function getRecurringProcessingModelAllowableValues() self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenizationStoreOperationTypeAllowableValues() + { + return [ + self::TOKENIZATION_STORE_OPERATION_TYPE_CREATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_UPDATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING, + ]; + } /** * Associative array for storing property values * @@ -666,6 +700,9 @@ public function __construct(array $data = null) $this->setIfExists('threeDOffered', $data ?? [], null); $this->setIfExists('threeDOfferedResponse', $data ?? [], null); $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenizationShopperReference', $data ?? [], null); + $this->setIfExists('tokenizationStoreOperationType', $data ?? [], null); + $this->setIfExists('tokenizationStoredPaymentMethodId', $data ?? [], null); $this->setIfExists('visaTransactionId', $data ?? [], null); $this->setIfExists('xid', $data ?? [], null); } @@ -715,6 +752,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!is_null($this->container['tokenizationStoreOperationType']) && !in_array($this->container['tokenizationStoreOperationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $this->container['tokenizationStoreOperationType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1752,6 +1798,7 @@ public function setRecurringFirstPspReference($recurringFirstPspReference) * Gets recurringRecurringDetailReference * * @return string|null + * @deprecated since Adyen Checkout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function getRecurringRecurringDetailReference() { @@ -1764,6 +1811,7 @@ public function getRecurringRecurringDetailReference() * @param string|null $recurringRecurringDetailReference The reference that uniquely identifies the recurring transaction. * * @return self + * @deprecated since Adyen Checkout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) { @@ -1776,6 +1824,7 @@ public function setRecurringRecurringDetailReference($recurringRecurringDetailRe * Gets recurringShopperReference * * @return string|null + * @deprecated since Adyen Checkout API v68. "Use tokenization.shopperReference instead." */ public function getRecurringShopperReference() { @@ -1788,6 +1837,7 @@ public function getRecurringShopperReference() * @param string|null $recurringShopperReference The provided reference of the shopper for a recurring transaction. * * @return self + * @deprecated since Adyen Checkout API v68. "Use tokenization.shopperReference instead." */ public function setRecurringShopperReference($recurringShopperReference) { @@ -2118,6 +2168,88 @@ public function setThreeDSVersion($threeDSVersion) return $this; } + /** + * Gets tokenizationShopperReference + * + * @return string|null + */ + public function getTokenizationShopperReference() + { + return $this->container['tokenizationShopperReference']; + } + + /** + * Sets tokenizationShopperReference + * + * @param string|null $tokenizationShopperReference The reference for the shopper that you sent when tokenizing the payment details. + * + * @return self + */ + public function setTokenizationShopperReference($tokenizationShopperReference) + { + $this->container['tokenizationShopperReference'] = $tokenizationShopperReference; + + return $this; + } + + /** + * Gets tokenizationStoreOperationType + * + * @return string|null + */ + public function getTokenizationStoreOperationType() + { + return $this->container['tokenizationStoreOperationType']; + } + + /** + * Sets tokenizationStoreOperationType + * + * @param string|null $tokenizationStoreOperationType The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. + * + * @return self + */ + public function setTokenizationStoreOperationType($tokenizationStoreOperationType) + { + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!in_array($tokenizationStoreOperationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $tokenizationStoreOperationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenizationStoreOperationType'] = $tokenizationStoreOperationType; + + return $this; + } + + /** + * Gets tokenizationStoredPaymentMethodId + * + * @return string|null + */ + public function getTokenizationStoredPaymentMethodId() + { + return $this->container['tokenizationStoredPaymentMethodId']; + } + + /** + * Sets tokenizationStoredPaymentMethodId + * + * @param string|null $tokenizationStoredPaymentMethodId The reference that uniquely identifies tokenized payment details. + * + * @return self + */ + public function setTokenizationStoredPaymentMethodId($tokenizationStoredPaymentMethodId) + { + $this->container['tokenizationStoredPaymentMethodId'] = $tokenizationStoredPaymentMethodId; + + return $this; + } + /** * Gets visaTransactionId * @@ -2155,7 +2287,7 @@ public function getXid() /** * Sets xid * - * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= * * @return self */ diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php index 73425d16..54d0fb23 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php @@ -737,7 +737,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $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 */ diff --git a/src/Adyen/Model/Checkout/ThreeDSecureData.php b/src/Adyen/Model/Checkout/ThreeDSecureData.php index 949d0c20..9dc5f6b5 100644 --- a/src/Adyen/Model/Checkout/ThreeDSecureData.php +++ b/src/Adyen/Model/Checkout/ThreeDSecureData.php @@ -461,7 +461,7 @@ public function getAuthenticationResponse() /** * Sets authenticationResponse * - * @param string|null $authenticationResponse In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. + * @param string|null $authenticationResponse In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. * * @return self */ @@ -577,7 +577,7 @@ public function getDirectoryResponse() /** * Sets directoryResponse * - * @param string|null $directoryResponse In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. + * @param string|null $directoryResponse In 3D Secure 2, this is the `transStatus` from the `ARes`. * * @return self */ diff --git a/src/Adyen/Model/Management/AffirmInfo.php b/src/Adyen/Model/Management/AffirmInfo.php new file mode 100644 index 00000000..d0b06991 --- /dev/null +++ b/src/Adyen/Model/Management/AffirmInfo.php @@ -0,0 +1,410 @@ + + */ +class AffirmInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AffirmInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'supportEmail' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'supportEmail' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'supportEmail' => 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 = [ + 'supportEmail' => 'supportEmail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'supportEmail' => 'setSupportEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'supportEmail' => 'getSupportEmail' + ]; + + /** + * 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('supportEmail', $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['supportEmail'] === null) { + $invalidProperties[] = "'supportEmail' 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 supportEmail + * + * @return string + */ + public function getSupportEmail() + { + return $this->container['supportEmail']; + } + + /** + * Sets supportEmail + * + * @param string $supportEmail Merchant support email + * + * @return self + */ + public function setSupportEmail($supportEmail) + { + $this->container['supportEmail'] = $supportEmail; + + 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/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index 838aec4b..ce05433b 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -263,7 +263,27 @@ public function getModelName() return self::$openAPIModelName; } + public const STATUS_ARCHIVED = 'archived'; + public const STATUS_ERROR = 'error'; + public const STATUS_INVALID = 'invalid'; + public const STATUS_PROCESSING = 'processing'; + public const STATUS_READY = 'ready'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ARCHIVED, + self::STATUS_ERROR, + self::STATUS_INVALID, + self::STATUS_PROCESSING, + self::STATUS_READY, + ]; + } /** * Associative array for storing property values * @@ -323,6 +343,15 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -503,6 +532,16 @@ public function getStatus() */ public function setStatus($status) { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Management/MeApiCredential.php b/src/Adyen/Model/Management/MeApiCredential.php index 430d8894..e1cfe219 100644 --- a/src/Adyen/Model/Management/MeApiCredential.php +++ b/src/Adyen/Model/Management/MeApiCredential.php @@ -48,7 +48,6 @@ class MeApiCredential implements ModelInterface, ArrayAccess, \JsonSerializable 'active' => 'bool', 'allowedIpAddresses' => 'string[]', 'allowedOrigins' => '\Adyen\Model\Management\AllowedOrigin[]', - 'associatedMerchantAccounts' => 'string[]', 'clientKey' => 'string', 'companyName' => 'string', 'description' => 'string', @@ -69,7 +68,6 @@ class MeApiCredential implements ModelInterface, ArrayAccess, \JsonSerializable 'active' => null, 'allowedIpAddresses' => null, 'allowedOrigins' => null, - 'associatedMerchantAccounts' => null, 'clientKey' => null, 'companyName' => null, 'description' => null, @@ -88,7 +86,6 @@ class MeApiCredential implements ModelInterface, ArrayAccess, \JsonSerializable 'active' => false, 'allowedIpAddresses' => false, 'allowedOrigins' => false, - 'associatedMerchantAccounts' => false, 'clientKey' => false, 'companyName' => false, 'description' => false, @@ -187,7 +184,6 @@ public function isNullableSetToNull(string $property): bool 'active' => 'active', 'allowedIpAddresses' => 'allowedIpAddresses', 'allowedOrigins' => 'allowedOrigins', - 'associatedMerchantAccounts' => 'associatedMerchantAccounts', 'clientKey' => 'clientKey', 'companyName' => 'companyName', 'description' => 'description', @@ -206,7 +202,6 @@ public function isNullableSetToNull(string $property): bool 'active' => 'setActive', 'allowedIpAddresses' => 'setAllowedIpAddresses', 'allowedOrigins' => 'setAllowedOrigins', - 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', 'clientKey' => 'setClientKey', 'companyName' => 'setCompanyName', 'description' => 'setDescription', @@ -225,7 +220,6 @@ public function isNullableSetToNull(string $property): bool 'active' => 'getActive', 'allowedIpAddresses' => 'getAllowedIpAddresses', 'allowedOrigins' => 'getAllowedOrigins', - 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', 'clientKey' => 'getClientKey', 'companyName' => 'getCompanyName', 'description' => 'getDescription', @@ -295,7 +289,6 @@ public function __construct(array $data = null) $this->setIfExists('active', $data ?? [], null); $this->setIfExists('allowedIpAddresses', $data ?? [], null); $this->setIfExists('allowedOrigins', $data ?? [], null); - $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); $this->setIfExists('clientKey', $data ?? [], null); $this->setIfExists('companyName', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); @@ -460,30 +453,6 @@ public function setAllowedOrigins($allowedOrigins) return $this; } - /** - * Gets associatedMerchantAccounts - * - * @return string[]|null - */ - public function getAssociatedMerchantAccounts() - { - return $this->container['associatedMerchantAccounts']; - } - - /** - * Sets associatedMerchantAccounts - * - * @param string[]|null $associatedMerchantAccounts List of merchant accounts that the API credential has explicit access to. If the credential has access to a company, this implies access to all merchant accounts and no merchants for that company will be included. - * - * @return self - */ - public function setAssociatedMerchantAccounts($associatedMerchantAccounts) - { - $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; - - return $this; - } - /** * Gets clientKey * diff --git a/src/Adyen/Model/Management/PayToInfo.php b/src/Adyen/Model/Management/PayToInfo.php new file mode 100644 index 00000000..4629696f --- /dev/null +++ b/src/Adyen/Model/Management/PayToInfo.php @@ -0,0 +1,444 @@ + + */ +class PayToInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PayToInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantName' => 'string', + 'payToPurpose' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantName' => null, + 'payToPurpose' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantName' => false, + 'payToPurpose' => 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 = [ + 'merchantName' => 'merchantName', + 'payToPurpose' => 'payToPurpose' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantName' => 'setMerchantName', + 'payToPurpose' => 'setPayToPurpose' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantName' => 'getMerchantName', + 'payToPurpose' => 'getPayToPurpose' + ]; + + /** + * 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('merchantName', $data ?? [], null); + $this->setIfExists('payToPurpose', $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['merchantName'] === null) { + $invalidProperties[] = "'merchantName' can't be null"; + } + if ($this->container['payToPurpose'] === null) { + $invalidProperties[] = "'payToPurpose' 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 merchantName + * + * @return string + */ + public function getMerchantName() + { + return $this->container['merchantName']; + } + + /** + * Sets merchantName + * + * @param string $merchantName Merchant name displayed to the shopper in the Agreements + * + * @return self + */ + public function setMerchantName($merchantName) + { + $this->container['merchantName'] = $merchantName; + + return $this; + } + + /** + * Gets payToPurpose + * + * @return string + */ + public function getPayToPurpose() + { + return $this->container['payToPurpose']; + } + + /** + * Sets payToPurpose + * + * @param string $payToPurpose Represents the purpose of the Agreements created, it relates to the business type **Allowed values**: mortgage, utility, loan, gambling, retail, salary, personal, government, pension, tax, other + * + * @return self + */ + public function setPayToPurpose($payToPurpose) + { + $this->container['payToPurpose'] = $payToPurpose; + + 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/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 4779da28..4252077a 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -45,6 +45,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'accel' => '\Adyen\Model\Management\AccelInfo', + 'affirm' => '\Adyen\Model\Management\AffirmInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'allowed' => 'bool', 'amex' => '\Adyen\Model\Management\AmexInfo', @@ -59,6 +60,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'customRoutingFlags' => 'string[]', 'diners' => '\Adyen\Model\Management\DinersInfo', 'discover' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'enabled' => 'bool', 'giroPay' => '\Adyen\Model\Management\GiroPayInfo', @@ -75,6 +77,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'nyce' => '\Adyen\Model\Management\NyceInfo', 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'payto' => '\Adyen\Model\Management\PayToInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', @@ -102,6 +105,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'accel' => null, + 'affirm' => null, 'afterpayTouch' => null, 'allowed' => null, 'amex' => null, @@ -116,6 +120,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'customRoutingFlags' => null, 'diners' => null, 'discover' => null, + 'eftDirectdebitCA' => null, 'eftposAustralia' => null, 'enabled' => null, 'giroPay' => null, @@ -132,6 +137,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'nyce' => null, 'payme' => null, 'paypal' => null, + 'payto' => null, 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, @@ -157,6 +163,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'accel' => false, + 'affirm' => false, 'afterpayTouch' => false, 'allowed' => false, 'amex' => false, @@ -171,6 +178,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'customRoutingFlags' => false, 'diners' => false, 'discover' => false, + 'eftDirectdebitCA' => false, 'eftposAustralia' => false, 'enabled' => false, 'giroPay' => false, @@ -187,6 +195,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'nyce' => false, 'payme' => false, 'paypal' => false, + 'payto' => false, 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, @@ -292,6 +301,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accel' => 'accel', + 'affirm' => 'affirm', 'afterpayTouch' => 'afterpayTouch', 'allowed' => 'allowed', 'amex' => 'amex', @@ -306,6 +316,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'customRoutingFlags', 'diners' => 'diners', 'discover' => 'discover', + 'eftDirectdebitCA' => 'eft_directdebit_CA', 'eftposAustralia' => 'eftpos_australia', 'enabled' => 'enabled', 'giroPay' => 'giroPay', @@ -322,6 +333,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'nyce', 'payme' => 'payme', 'paypal' => 'paypal', + 'payto' => 'payto', 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', @@ -347,6 +359,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accel' => 'setAccel', + 'affirm' => 'setAffirm', 'afterpayTouch' => 'setAfterpayTouch', 'allowed' => 'setAllowed', 'amex' => 'setAmex', @@ -361,6 +374,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'setCustomRoutingFlags', 'diners' => 'setDiners', 'discover' => 'setDiscover', + 'eftDirectdebitCA' => 'setEftDirectdebitCA', 'eftposAustralia' => 'setEftposAustralia', 'enabled' => 'setEnabled', 'giroPay' => 'setGiroPay', @@ -377,6 +391,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'setNyce', 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'payto' => 'setPayto', 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', @@ -402,6 +417,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accel' => 'getAccel', + 'affirm' => 'getAffirm', 'afterpayTouch' => 'getAfterpayTouch', 'allowed' => 'getAllowed', 'amex' => 'getAmex', @@ -416,6 +432,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'getCustomRoutingFlags', 'diners' => 'getDiners', 'discover' => 'getDiscover', + 'eftDirectdebitCA' => 'getEftDirectdebitCA', 'eftposAustralia' => 'getEftposAustralia', 'enabled' => 'getEnabled', 'giroPay' => 'getGiroPay', @@ -432,6 +449,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'getNyce', 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'payto' => 'getPayto', 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', @@ -526,6 +544,7 @@ public function getVerificationStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accel', $data ?? [], null); + $this->setIfExists('affirm', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('allowed', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); @@ -540,6 +559,7 @@ public function __construct(array $data = null) $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('diners', $data ?? [], null); $this->setIfExists('discover', $data ?? [], null); + $this->setIfExists('eftDirectdebitCA', $data ?? [], null); $this->setIfExists('eftposAustralia', $data ?? [], null); $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('giroPay', $data ?? [], null); @@ -556,6 +576,7 @@ public function __construct(array $data = null) $this->setIfExists('nyce', $data ?? [], null); $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('payto', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); @@ -652,6 +673,30 @@ public function setAccel($accel) return $this; } + /** + * Gets affirm + * + * @return \Adyen\Model\Management\AffirmInfo|null + */ + public function getAffirm() + { + return $this->container['affirm']; + } + + /** + * Sets affirm + * + * @param \Adyen\Model\Management\AffirmInfo|null $affirm affirm + * + * @return self + */ + public function setAffirm($affirm) + { + $this->container['affirm'] = $affirm; + + return $this; + } + /** * Gets afterpayTouch * @@ -988,6 +1033,30 @@ public function setDiscover($discover) return $this; } + /** + * Gets eftDirectdebitCA + * + * @return \Adyen\Model\Management\GenericPmWithTdiInfo|null + */ + public function getEftDirectdebitCA() + { + return $this->container['eftDirectdebitCA']; + } + + /** + * Sets eftDirectdebitCA + * + * @param \Adyen\Model\Management\GenericPmWithTdiInfo|null $eftDirectdebitCA eftDirectdebitCA + * + * @return self + */ + public function setEftDirectdebitCA($eftDirectdebitCA) + { + $this->container['eftDirectdebitCA'] = $eftDirectdebitCA; + + return $this; + } + /** * Gets eftposAustralia * @@ -1372,6 +1441,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets payto + * + * @return \Adyen\Model\Management\PayToInfo|null + */ + public function getPayto() + { + return $this->container['payto']; + } + + /** + * Sets payto + * + * @param \Adyen\Model\Management\PayToInfo|null $payto payto + * + * @return self + */ + public function setPayto($payto) + { + $this->container['payto'] = $payto; + + return $this; + } + /** * Gets pulse * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index bd4b5a82..6bcc0acc 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -240,11 +240,13 @@ public function getModelName() } public const TYPES_WITH_ERRORS_ACCEL = 'accel'; + public const TYPES_WITH_ERRORS_ACH = 'ach'; public const TYPES_WITH_ERRORS_AFFIRM = 'affirm'; public const TYPES_WITH_ERRORS_AFTERPAYTOUCH = 'afterpaytouch'; public const TYPES_WITH_ERRORS_ALELO = 'alelo'; public const TYPES_WITH_ERRORS_ALIPAY = 'alipay'; public const TYPES_WITH_ERRORS_ALIPAY_HK = 'alipay_hk'; + public const TYPES_WITH_ERRORS_ALIPAY_WAP = 'alipay_wap'; public const TYPES_WITH_ERRORS_AMEX = 'amex'; public const TYPES_WITH_ERRORS_APPLEPAY = 'applepay'; public const TYPES_WITH_ERRORS_BANESE_CARD = 'banese_card'; @@ -264,6 +266,7 @@ public function getModelName() public const TYPES_WITH_ERRORS_DIRECTDEBIT_GB = 'directdebit_GB'; public const TYPES_WITH_ERRORS_DISCOVER = 'discover'; public const TYPES_WITH_ERRORS_EBANKING_FI = 'ebanking_FI'; + public const TYPES_WITH_ERRORS_EFT_DIRECTDEBIT_CA = 'eft_directdebit_CA'; public const TYPES_WITH_ERRORS_EFTPOS_AUSTRALIA = 'eftpos_australia'; public const TYPES_WITH_ERRORS_ELO = 'elo'; public const TYPES_WITH_ERRORS_ELOCREDIT = 'elocredit'; @@ -294,6 +297,7 @@ public function getModelName() public const TYPES_WITH_ERRORS_PAYNOW_POS = 'paynow_pos'; public const TYPES_WITH_ERRORS_PAYPAL = 'paypal'; public const TYPES_WITH_ERRORS_PAYSHOP = 'payshop'; + public const TYPES_WITH_ERRORS_PAYTO = 'payto'; public const TYPES_WITH_ERRORS_PULSE = 'pulse'; public const TYPES_WITH_ERRORS_SODEXO = 'sodexo'; public const TYPES_WITH_ERRORS_STAR = 'star'; @@ -322,11 +326,13 @@ public function getTypesWithErrorsAllowableValues() { return [ self::TYPES_WITH_ERRORS_ACCEL, + self::TYPES_WITH_ERRORS_ACH, self::TYPES_WITH_ERRORS_AFFIRM, self::TYPES_WITH_ERRORS_AFTERPAYTOUCH, self::TYPES_WITH_ERRORS_ALELO, self::TYPES_WITH_ERRORS_ALIPAY, self::TYPES_WITH_ERRORS_ALIPAY_HK, + self::TYPES_WITH_ERRORS_ALIPAY_WAP, self::TYPES_WITH_ERRORS_AMEX, self::TYPES_WITH_ERRORS_APPLEPAY, self::TYPES_WITH_ERRORS_BANESE_CARD, @@ -346,6 +352,7 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_DIRECTDEBIT_GB, self::TYPES_WITH_ERRORS_DISCOVER, self::TYPES_WITH_ERRORS_EBANKING_FI, + self::TYPES_WITH_ERRORS_EFT_DIRECTDEBIT_CA, self::TYPES_WITH_ERRORS_EFTPOS_AUSTRALIA, self::TYPES_WITH_ERRORS_ELO, self::TYPES_WITH_ERRORS_ELOCREDIT, @@ -376,6 +383,7 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_PAYNOW_POS, self::TYPES_WITH_ERRORS_PAYPAL, self::TYPES_WITH_ERRORS_PAYSHOP, + self::TYPES_WITH_ERRORS_PAYTO, self::TYPES_WITH_ERRORS_PULSE, self::TYPES_WITH_ERRORS_SODEXO, self::TYPES_WITH_ERRORS_STAR, diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index f8e26495..d78f964c 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -45,6 +45,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'accel' => '\Adyen\Model\Management\AccelInfo', + 'affirm' => '\Adyen\Model\Management\AffirmInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'amex' => '\Adyen\Model\Management\AmexInfo', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', @@ -58,6 +59,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'customRoutingFlags' => 'string[]', 'diners' => '\Adyen\Model\Management\DinersInfo', 'discover' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'giroPay' => '\Adyen\Model\Management\GiroPayInfo', 'girocard' => '\Adyen\Model\Management\GenericPmWithTdiInfo', @@ -72,6 +74,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'nyce' => '\Adyen\Model\Management\NyceInfo', 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'payto' => '\Adyen\Model\Management\PayToInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', @@ -98,6 +101,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'accel' => null, + 'affirm' => null, 'afterpayTouch' => null, 'amex' => null, 'applePay' => null, @@ -111,6 +115,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'customRoutingFlags' => null, 'diners' => null, 'discover' => null, + 'eftDirectdebitCA' => null, 'eftposAustralia' => null, 'giroPay' => null, 'girocard' => null, @@ -125,6 +130,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'nyce' => null, 'payme' => null, 'paypal' => null, + 'payto' => null, 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, @@ -149,6 +155,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPINullables = [ 'accel' => false, + 'affirm' => false, 'afterpayTouch' => false, 'amex' => false, 'applePay' => false, @@ -162,6 +169,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'customRoutingFlags' => false, 'diners' => false, 'discover' => false, + 'eftDirectdebitCA' => false, 'eftposAustralia' => false, 'giroPay' => false, 'girocard' => false, @@ -176,6 +184,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'nyce' => false, 'payme' => false, 'paypal' => false, + 'payto' => false, 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, @@ -280,6 +289,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accel' => 'accel', + 'affirm' => 'affirm', 'afterpayTouch' => 'afterpayTouch', 'amex' => 'amex', 'applePay' => 'applePay', @@ -293,6 +303,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'customRoutingFlags', 'diners' => 'diners', 'discover' => 'discover', + 'eftDirectdebitCA' => 'eft_directdebit_CA', 'eftposAustralia' => 'eftpos_australia', 'giroPay' => 'giroPay', 'girocard' => 'girocard', @@ -307,6 +318,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'nyce', 'payme' => 'payme', 'paypal' => 'paypal', + 'payto' => 'payto', 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', @@ -331,6 +343,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accel' => 'setAccel', + 'affirm' => 'setAffirm', 'afterpayTouch' => 'setAfterpayTouch', 'amex' => 'setAmex', 'applePay' => 'setApplePay', @@ -344,6 +357,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'setCustomRoutingFlags', 'diners' => 'setDiners', 'discover' => 'setDiscover', + 'eftDirectdebitCA' => 'setEftDirectdebitCA', 'eftposAustralia' => 'setEftposAustralia', 'giroPay' => 'setGiroPay', 'girocard' => 'setGirocard', @@ -358,6 +372,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'setNyce', 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'payto' => 'setPayto', 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', @@ -382,6 +397,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accel' => 'getAccel', + 'affirm' => 'getAffirm', 'afterpayTouch' => 'getAfterpayTouch', 'amex' => 'getAmex', 'applePay' => 'getApplePay', @@ -395,6 +411,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'getCustomRoutingFlags', 'diners' => 'getDiners', 'discover' => 'getDiscover', + 'eftDirectdebitCA' => 'getEftDirectdebitCA', 'eftposAustralia' => 'getEftposAustralia', 'giroPay' => 'getGiroPay', 'girocard' => 'getGirocard', @@ -409,6 +426,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'getNyce', 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'payto' => 'getPayto', 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', @@ -472,11 +490,13 @@ public function getModelName() public const SHOPPER_INTERACTION_MOTO = 'moto'; public const SHOPPER_INTERACTION_CONT_AUTH = 'contAuth'; public const TYPE_ACCEL = 'accel'; + public const TYPE_ACH = 'ach'; public const TYPE_AFFIRM = 'affirm'; public const TYPE_AFTERPAYTOUCH = 'afterpaytouch'; public const TYPE_ALELO = 'alelo'; public const TYPE_ALIPAY = 'alipay'; public const TYPE_ALIPAY_HK = 'alipay_hk'; + public const TYPE_ALIPAY_WAP = 'alipay_wap'; public const TYPE_AMEX = 'amex'; public const TYPE_APPLEPAY = 'applepay'; public const TYPE_BANESE_CARD = 'banese_card'; @@ -496,6 +516,7 @@ public function getModelName() public const TYPE_DIRECTDEBIT_GB = 'directdebit_GB'; public const TYPE_DISCOVER = 'discover'; public const TYPE_EBANKING_FI = 'ebanking_FI'; + public const TYPE_EFT_DIRECTDEBIT_CA = 'eft_directdebit_CA'; public const TYPE_EFTPOS_AUSTRALIA = 'eftpos_australia'; public const TYPE_ELO = 'elo'; public const TYPE_ELOCREDIT = 'elocredit'; @@ -526,6 +547,7 @@ public function getModelName() public const TYPE_PAYNOW_POS = 'paynow_pos'; public const TYPE_PAYPAL = 'paypal'; public const TYPE_PAYSHOP = 'payshop'; + public const TYPE_PAYTO = 'payto'; public const TYPE_PULSE = 'pulse'; public const TYPE_SODEXO = 'sodexo'; public const TYPE_STAR = 'star'; @@ -568,11 +590,13 @@ public function getTypeAllowableValues() { return [ self::TYPE_ACCEL, + self::TYPE_ACH, self::TYPE_AFFIRM, self::TYPE_AFTERPAYTOUCH, self::TYPE_ALELO, self::TYPE_ALIPAY, self::TYPE_ALIPAY_HK, + self::TYPE_ALIPAY_WAP, self::TYPE_AMEX, self::TYPE_APPLEPAY, self::TYPE_BANESE_CARD, @@ -592,6 +616,7 @@ public function getTypeAllowableValues() self::TYPE_DIRECTDEBIT_GB, self::TYPE_DISCOVER, self::TYPE_EBANKING_FI, + self::TYPE_EFT_DIRECTDEBIT_CA, self::TYPE_EFTPOS_AUSTRALIA, self::TYPE_ELO, self::TYPE_ELOCREDIT, @@ -622,6 +647,7 @@ public function getTypeAllowableValues() self::TYPE_PAYNOW_POS, self::TYPE_PAYPAL, self::TYPE_PAYSHOP, + self::TYPE_PAYTO, self::TYPE_PULSE, self::TYPE_SODEXO, self::TYPE_STAR, @@ -658,6 +684,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accel', $data ?? [], null); + $this->setIfExists('affirm', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); @@ -671,6 +698,7 @@ public function __construct(array $data = null) $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('diners', $data ?? [], null); $this->setIfExists('discover', $data ?? [], null); + $this->setIfExists('eftDirectdebitCA', $data ?? [], null); $this->setIfExists('eftposAustralia', $data ?? [], null); $this->setIfExists('giroPay', $data ?? [], null); $this->setIfExists('girocard', $data ?? [], null); @@ -685,6 +713,7 @@ public function __construct(array $data = null) $this->setIfExists('nyce', $data ?? [], null); $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('payto', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); @@ -789,6 +818,30 @@ public function setAccel($accel) return $this; } + /** + * Gets affirm + * + * @return \Adyen\Model\Management\AffirmInfo|null + */ + public function getAffirm() + { + return $this->container['affirm']; + } + + /** + * Sets affirm + * + * @param \Adyen\Model\Management\AffirmInfo|null $affirm affirm + * + * @return self + */ + public function setAffirm($affirm) + { + $this->container['affirm'] = $affirm; + + return $this; + } + /** * Gets afterpayTouch * @@ -1101,6 +1154,30 @@ public function setDiscover($discover) return $this; } + /** + * Gets eftDirectdebitCA + * + * @return \Adyen\Model\Management\GenericPmWithTdiInfo|null + */ + public function getEftDirectdebitCA() + { + return $this->container['eftDirectdebitCA']; + } + + /** + * Sets eftDirectdebitCA + * + * @param \Adyen\Model\Management\GenericPmWithTdiInfo|null $eftDirectdebitCA eftDirectdebitCA + * + * @return self + */ + public function setEftDirectdebitCA($eftDirectdebitCA) + { + $this->container['eftDirectdebitCA'] = $eftDirectdebitCA; + + return $this; + } + /** * Gets eftposAustralia * @@ -1437,6 +1514,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets payto + * + * @return \Adyen\Model\Management\PayToInfo|null + */ + public function getPayto() + { + return $this->container['payto']; + } + + /** + * Sets payto + * + * @param \Adyen\Model\Management\PayToInfo|null $payto payto + * + * @return self + */ + public function setPayto($payto) + { + $this->container['payto'] = $payto; + + return $this; + } + /** * Gets pulse * diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index 3968180b..5bb7234e 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -414,7 +414,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + * @param string|null $fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** * * @return self */ diff --git a/src/Adyen/Model/Management/Surcharge.php b/src/Adyen/Model/Management/Surcharge.php index 3c7edb01..f5ea9593 100644 --- a/src/Adyen/Model/Management/Surcharge.php +++ b/src/Adyen/Model/Management/Surcharge.php @@ -45,7 +45,8 @@ class Surcharge implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'askConfirmation' => 'bool', - 'configurations' => '\Adyen\Model\Management\Configuration[]' + 'configurations' => '\Adyen\Model\Management\Configuration[]', + 'excludeGratuityFromSurcharge' => 'bool' ]; /** @@ -57,7 +58,8 @@ class Surcharge implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'askConfirmation' => null, - 'configurations' => null + 'configurations' => null, + 'excludeGratuityFromSurcharge' => null ]; /** @@ -67,7 +69,8 @@ class Surcharge implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'askConfirmation' => false, - 'configurations' => false + 'configurations' => false, + 'excludeGratuityFromSurcharge' => false ]; /** @@ -157,7 +160,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'askConfirmation' => 'askConfirmation', - 'configurations' => 'configurations' + 'configurations' => 'configurations', + 'excludeGratuityFromSurcharge' => 'excludeGratuityFromSurcharge' ]; /** @@ -167,7 +171,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'askConfirmation' => 'setAskConfirmation', - 'configurations' => 'setConfigurations' + 'configurations' => 'setConfigurations', + 'excludeGratuityFromSurcharge' => 'setExcludeGratuityFromSurcharge' ]; /** @@ -177,7 +182,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'askConfirmation' => 'getAskConfirmation', - 'configurations' => 'getConfigurations' + 'configurations' => 'getConfigurations', + 'excludeGratuityFromSurcharge' => 'getExcludeGratuityFromSurcharge' ]; /** @@ -239,6 +245,7 @@ public function __construct(array $data = null) { $this->setIfExists('askConfirmation', $data ?? [], null); $this->setIfExists('configurations', $data ?? [], null); + $this->setIfExists('excludeGratuityFromSurcharge', $data ?? [], null); } /** @@ -330,6 +337,30 @@ public function setConfigurations($configurations) return $this; } + + /** + * Gets excludeGratuityFromSurcharge + * + * @return bool|null + */ + public function getExcludeGratuityFromSurcharge() + { + return $this->container['excludeGratuityFromSurcharge']; + } + + /** + * Sets excludeGratuityFromSurcharge + * + * @param bool|null $excludeGratuityFromSurcharge Exclude the tip amount from the surcharge calculation. + * + * @return self + */ + public function setExcludeGratuityFromSurcharge($excludeGratuityFromSurcharge) + { + $this->container['excludeGratuityFromSurcharge'] = $excludeGratuityFromSurcharge; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index ec08dea9..f22cda8b 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -53,6 +53,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'customRoutingFlags' => 'string[]', 'diners' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'discover' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'enabled' => 'bool', 'girocard' => '\Adyen\Model\Management\GenericPmWithTdiInfo', @@ -86,6 +87,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'customRoutingFlags' => null, 'diners' => null, 'discover' => null, + 'eftDirectdebitCA' => null, 'eftposAustralia' => null, 'enabled' => null, 'girocard' => null, @@ -117,6 +119,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'customRoutingFlags' => false, 'diners' => false, 'discover' => false, + 'eftDirectdebitCA' => false, 'eftposAustralia' => false, 'enabled' => false, 'girocard' => false, @@ -228,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'customRoutingFlags', 'diners' => 'diners', 'discover' => 'discover', + 'eftDirectdebitCA' => 'eft_directdebit_CA', 'eftposAustralia' => 'eftpos_australia', 'enabled' => 'enabled', 'girocard' => 'girocard', @@ -259,6 +263,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'setCustomRoutingFlags', 'diners' => 'setDiners', 'discover' => 'setDiscover', + 'eftDirectdebitCA' => 'setEftDirectdebitCA', 'eftposAustralia' => 'setEftposAustralia', 'enabled' => 'setEnabled', 'girocard' => 'setGirocard', @@ -290,6 +295,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'getCustomRoutingFlags', 'diners' => 'getDiners', 'discover' => 'getDiscover', + 'eftDirectdebitCA' => 'getEftDirectdebitCA', 'eftposAustralia' => 'getEftposAustralia', 'enabled' => 'getEnabled', 'girocard' => 'getGirocard', @@ -372,6 +378,7 @@ public function __construct(array $data = null) $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('diners', $data ?? [], null); $this->setIfExists('discover', $data ?? [], null); + $this->setIfExists('eftDirectdebitCA', $data ?? [], null); $this->setIfExists('eftposAustralia', $data ?? [], null); $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('girocard', $data ?? [], null); @@ -646,6 +653,30 @@ public function setDiscover($discover) return $this; } + /** + * Gets eftDirectdebitCA + * + * @return \Adyen\Model\Management\GenericPmWithTdiInfo|null + */ + public function getEftDirectdebitCA() + { + return $this->container['eftDirectdebitCA']; + } + + /** + * Sets eftDirectdebitCA + * + * @param \Adyen\Model\Management\GenericPmWithTdiInfo|null $eftDirectdebitCA eftDirectdebitCA + * + * @return self + */ + public function setEftDirectdebitCA($eftDirectdebitCA) + { + $this->container['eftDirectdebitCA'] = $eftDirectdebitCA; + + return $this; + } + /** * Gets eftposAustralia * diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index ef571556..399c545b 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -343,7 +343,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + * @param string|null $fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** * * @return self */ diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php index 20799937..eed5c5c9 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php @@ -233,7 +233,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PAYMENT_METHOD_REQUEST_REMOVED = 'paymentMethod.requestRemoved'; + public const TYPE_PAYMENT_METHOD_REQUEST_REMOVED = 'paymentMethodRequest.removed'; /** * Gets allowable values of the enum diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php index 50aa4d76..d916cff6 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php @@ -233,7 +233,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL = 'paymentMethod.requestScheduledForRemoval'; + public const TYPE_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL = 'paymentMethodRequest.scheduledForRemoval'; /** * Gets allowable values of the enum diff --git a/src/Adyen/Model/Payments/AdditionalData3DSecure.php b/src/Adyen/Model/Payments/AdditionalData3DSecure.php index a0091822..fbe64c05 100644 --- a/src/Adyen/Model/Payments/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/AdditionalData3DSecure.php @@ -483,7 +483,7 @@ public function getThreeDSVersion() /** * Sets threeDSVersion * - * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. + * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. * * @return self */ diff --git a/src/Adyen/Model/Payments/FundDestination.php b/src/Adyen/Model/Payments/FundDestination.php index e1125b27..d2f9218c 100644 --- a/src/Adyen/Model/Payments/FundDestination.php +++ b/src/Adyen/Model/Payments/FundDestination.php @@ -527,7 +527,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index ea72302a..17db88d6 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -1863,7 +1863,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index 8c8ed844..adeea3ce 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -1518,7 +1518,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index 92df5e30..266d33e7 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -1470,7 +1470,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php index fa74b35f..b720a11d 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php @@ -101,6 +101,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => 'string', 'threeDOfferedResponse' => 'string', 'threeDSVersion' => 'string', + 'tokenizationShopperReference' => 'string', + 'tokenizationStoreOperationType' => 'string', + 'tokenizationStoredPaymentMethodId' => 'string', 'visaTransactionId' => 'string', 'xid' => 'string' ]; @@ -170,6 +173,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => null, 'threeDOfferedResponse' => null, 'threeDSVersion' => null, + 'tokenizationShopperReference' => null, + 'tokenizationStoreOperationType' => null, + 'tokenizationStoredPaymentMethodId' => null, 'visaTransactionId' => null, 'xid' => null ]; @@ -237,6 +243,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => false, 'threeDOfferedResponse' => false, 'threeDSVersion' => false, + 'tokenizationShopperReference' => false, + 'tokenizationStoreOperationType' => false, + 'tokenizationStoredPaymentMethodId' => false, 'visaTransactionId' => false, 'xid' => false ]; @@ -384,6 +393,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'threeDOffered', 'threeDOfferedResponse' => 'threeDOfferedResponse', 'threeDSVersion' => 'threeDSVersion', + 'tokenizationShopperReference' => 'tokenization.shopperReference', + 'tokenizationStoreOperationType' => 'tokenization.store.operationType', + 'tokenizationStoredPaymentMethodId' => 'tokenization.storedPaymentMethodId', 'visaTransactionId' => 'visaTransactionId', 'xid' => 'xid' ]; @@ -451,6 +463,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'setThreeDOffered', 'threeDOfferedResponse' => 'setThreeDOfferedResponse', 'threeDSVersion' => 'setThreeDSVersion', + 'tokenizationShopperReference' => 'setTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'setTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'setTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'setVisaTransactionId', 'xid' => 'setXid' ]; @@ -518,6 +533,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'getThreeDOffered', 'threeDOfferedResponse' => 'getThreeDOfferedResponse', 'threeDSVersion' => 'getThreeDSVersion', + 'tokenizationShopperReference' => 'getTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'getTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'getTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'getVisaTransactionId', 'xid' => 'getXid' ]; @@ -568,6 +586,9 @@ public function getModelName() 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'; + public const TOKENIZATION_STORE_OPERATION_TYPE_CREATED = 'created'; + public const TOKENIZATION_STORE_OPERATION_TYPE_UPDATED = 'updated'; + public const TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_STORED = 'alreadyStored'; /** * Gets allowable values of the enum @@ -594,6 +615,19 @@ public function getRecurringProcessingModelAllowableValues() self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenizationStoreOperationTypeAllowableValues() + { + return [ + self::TOKENIZATION_STORE_OPERATION_TYPE_CREATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_UPDATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_STORED, + ]; + } /** * Associative array for storing property values * @@ -666,6 +700,9 @@ public function __construct(array $data = null) $this->setIfExists('threeDOffered', $data ?? [], null); $this->setIfExists('threeDOfferedResponse', $data ?? [], null); $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenizationShopperReference', $data ?? [], null); + $this->setIfExists('tokenizationStoreOperationType', $data ?? [], null); + $this->setIfExists('tokenizationStoredPaymentMethodId', $data ?? [], null); $this->setIfExists('visaTransactionId', $data ?? [], null); $this->setIfExists('xid', $data ?? [], null); } @@ -715,6 +752,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!is_null($this->container['tokenizationStoreOperationType']) && !in_array($this->container['tokenizationStoreOperationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $this->container['tokenizationStoreOperationType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -2118,6 +2164,88 @@ public function setThreeDSVersion($threeDSVersion) return $this; } + /** + * Gets tokenizationShopperReference + * + * @return string|null + */ + public function getTokenizationShopperReference() + { + return $this->container['tokenizationShopperReference']; + } + + /** + * Sets tokenizationShopperReference + * + * @param string|null $tokenizationShopperReference The provided reference of the shopper. + * + * @return self + */ + public function setTokenizationShopperReference($tokenizationShopperReference) + { + $this->container['tokenizationShopperReference'] = $tokenizationShopperReference; + + return $this; + } + + /** + * Gets tokenizationStoreOperationType + * + * @return string|null + */ + public function getTokenizationStoreOperationType() + { + return $this->container['tokenizationStoreOperationType']; + } + + /** + * Sets tokenizationStoreOperationType + * + * @param string|null $tokenizationStoreOperationType The store operation performed on the token. + * + * @return self + */ + public function setTokenizationStoreOperationType($tokenizationStoreOperationType) + { + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!in_array($tokenizationStoreOperationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $tokenizationStoreOperationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenizationStoreOperationType'] = $tokenizationStoreOperationType; + + return $this; + } + + /** + * Gets tokenizationStoredPaymentMethodId + * + * @return string|null + */ + public function getTokenizationStoredPaymentMethodId() + { + return $this->container['tokenizationStoredPaymentMethodId']; + } + + /** + * Sets tokenizationStoredPaymentMethodId + * + * @param string|null $tokenizationStoredPaymentMethodId The reference that uniquely identifies tokenized payment details. + * + * @return self + */ + public function setTokenizationStoredPaymentMethodId($tokenizationStoredPaymentMethodId) + { + $this->container['tokenizationStoredPaymentMethodId'] = $tokenizationStoredPaymentMethodId; + + return $this; + } + /** * Gets visaTransactionId * @@ -2155,7 +2283,7 @@ public function getXid() /** * Sets xid * - * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= * * @return self */ diff --git a/src/Adyen/Model/Payments/ThreeDSecureData.php b/src/Adyen/Model/Payments/ThreeDSecureData.php index cc124731..fcb986fc 100644 --- a/src/Adyen/Model/Payments/ThreeDSecureData.php +++ b/src/Adyen/Model/Payments/ThreeDSecureData.php @@ -461,7 +461,7 @@ public function getAuthenticationResponse() /** * Sets authenticationResponse * - * @param string|null $authenticationResponse In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. + * @param string|null $authenticationResponse In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. * * @return self */ @@ -577,7 +577,7 @@ public function getDirectoryResponse() /** * Sets directoryResponse * - * @param string|null $directoryResponse In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. + * @param string|null $directoryResponse In 3D Secure 2, this is the `transStatus` from the `ARes`. * * @return self */ diff --git a/src/Adyen/Model/Payout/PayoutRequest.php b/src/Adyen/Model/Payout/PayoutRequest.php index 90bb1c1d..d8a28e9e 100644 --- a/src/Adyen/Model/Payout/PayoutRequest.php +++ b/src/Adyen/Model/Payout/PayoutRequest.php @@ -714,7 +714,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. 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 */ diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php index ec660c49..d9d3fdd1 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php @@ -101,6 +101,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => 'string', 'threeDOfferedResponse' => 'string', 'threeDSVersion' => 'string', + 'tokenizationShopperReference' => 'string', + 'tokenizationStoreOperationType' => 'string', + 'tokenizationStoredPaymentMethodId' => 'string', 'visaTransactionId' => 'string', 'xid' => 'string' ]; @@ -170,6 +173,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => null, 'threeDOfferedResponse' => null, 'threeDSVersion' => null, + 'tokenizationShopperReference' => null, + 'tokenizationStoreOperationType' => null, + 'tokenizationStoredPaymentMethodId' => null, 'visaTransactionId' => null, 'xid' => null ]; @@ -237,6 +243,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => false, 'threeDOfferedResponse' => false, 'threeDSVersion' => false, + 'tokenizationShopperReference' => false, + 'tokenizationStoreOperationType' => false, + 'tokenizationStoredPaymentMethodId' => false, 'visaTransactionId' => false, 'xid' => false ]; @@ -384,6 +393,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'threeDOffered', 'threeDOfferedResponse' => 'threeDOfferedResponse', 'threeDSVersion' => 'threeDSVersion', + 'tokenizationShopperReference' => 'tokenization.shopperReference', + 'tokenizationStoreOperationType' => 'tokenization.store.operationType', + 'tokenizationStoredPaymentMethodId' => 'tokenization.storedPaymentMethodId', 'visaTransactionId' => 'visaTransactionId', 'xid' => 'xid' ]; @@ -451,6 +463,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'setThreeDOffered', 'threeDOfferedResponse' => 'setThreeDOfferedResponse', 'threeDSVersion' => 'setThreeDSVersion', + 'tokenizationShopperReference' => 'setTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'setTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'setTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'setVisaTransactionId', 'xid' => 'setXid' ]; @@ -518,6 +533,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'getThreeDOffered', 'threeDOfferedResponse' => 'getThreeDOfferedResponse', 'threeDSVersion' => 'getThreeDSVersion', + 'tokenizationShopperReference' => 'getTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'getTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'getTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'getVisaTransactionId', 'xid' => 'getXid' ]; @@ -568,6 +586,9 @@ public function getModelName() 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'; + public const TOKENIZATION_STORE_OPERATION_TYPE_CREATED = 'created'; + public const TOKENIZATION_STORE_OPERATION_TYPE_UPDATED = 'updated'; + public const TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING = 'alreadyExisting'; /** * Gets allowable values of the enum @@ -594,6 +615,19 @@ public function getRecurringProcessingModelAllowableValues() self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenizationStoreOperationTypeAllowableValues() + { + return [ + self::TOKENIZATION_STORE_OPERATION_TYPE_CREATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_UPDATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING, + ]; + } /** * Associative array for storing property values * @@ -666,6 +700,9 @@ public function __construct(array $data = null) $this->setIfExists('threeDOffered', $data ?? [], null); $this->setIfExists('threeDOfferedResponse', $data ?? [], null); $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenizationShopperReference', $data ?? [], null); + $this->setIfExists('tokenizationStoreOperationType', $data ?? [], null); + $this->setIfExists('tokenizationStoredPaymentMethodId', $data ?? [], null); $this->setIfExists('visaTransactionId', $data ?? [], null); $this->setIfExists('xid', $data ?? [], null); } @@ -715,6 +752,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!is_null($this->container['tokenizationStoreOperationType']) && !in_array($this->container['tokenizationStoreOperationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $this->container['tokenizationStoreOperationType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1752,6 +1798,7 @@ public function setRecurringFirstPspReference($recurringFirstPspReference) * Gets recurringRecurringDetailReference * * @return string|null + * @deprecated since Adyen Payout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function getRecurringRecurringDetailReference() { @@ -1764,6 +1811,7 @@ public function getRecurringRecurringDetailReference() * @param string|null $recurringRecurringDetailReference The reference that uniquely identifies the recurring transaction. * * @return self + * @deprecated since Adyen Payout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) { @@ -1776,6 +1824,7 @@ public function setRecurringRecurringDetailReference($recurringRecurringDetailRe * Gets recurringShopperReference * * @return string|null + * @deprecated since Adyen Payout API v68. "Use tokenization.shopperReference instead." */ public function getRecurringShopperReference() { @@ -1788,6 +1837,7 @@ public function getRecurringShopperReference() * @param string|null $recurringShopperReference The provided reference of the shopper for a recurring transaction. * * @return self + * @deprecated since Adyen Payout API v68. "Use tokenization.shopperReference instead." */ public function setRecurringShopperReference($recurringShopperReference) { @@ -2118,6 +2168,88 @@ public function setThreeDSVersion($threeDSVersion) return $this; } + /** + * Gets tokenizationShopperReference + * + * @return string|null + */ + public function getTokenizationShopperReference() + { + return $this->container['tokenizationShopperReference']; + } + + /** + * Sets tokenizationShopperReference + * + * @param string|null $tokenizationShopperReference The reference for the shopper that you sent when tokenizing the payment details. + * + * @return self + */ + public function setTokenizationShopperReference($tokenizationShopperReference) + { + $this->container['tokenizationShopperReference'] = $tokenizationShopperReference; + + return $this; + } + + /** + * Gets tokenizationStoreOperationType + * + * @return string|null + */ + public function getTokenizationStoreOperationType() + { + return $this->container['tokenizationStoreOperationType']; + } + + /** + * Sets tokenizationStoreOperationType + * + * @param string|null $tokenizationStoreOperationType The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. + * + * @return self + */ + public function setTokenizationStoreOperationType($tokenizationStoreOperationType) + { + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!in_array($tokenizationStoreOperationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $tokenizationStoreOperationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenizationStoreOperationType'] = $tokenizationStoreOperationType; + + return $this; + } + + /** + * Gets tokenizationStoredPaymentMethodId + * + * @return string|null + */ + public function getTokenizationStoredPaymentMethodId() + { + return $this->container['tokenizationStoredPaymentMethodId']; + } + + /** + * Sets tokenizationStoredPaymentMethodId + * + * @param string|null $tokenizationStoredPaymentMethodId The reference that uniquely identifies tokenized payment details. + * + * @return self + */ + public function setTokenizationStoredPaymentMethodId($tokenizationStoredPaymentMethodId) + { + $this->container['tokenizationStoredPaymentMethodId'] = $tokenizationStoredPaymentMethodId; + + return $this; + } + /** * Gets visaTransactionId * @@ -2155,7 +2287,7 @@ public function getXid() /** * Sets xid * - * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= * * @return self */ diff --git a/src/Adyen/Model/Recurring/Address.php b/src/Adyen/Model/Recurring/Address.php index 8babd363..9e61b2d0 100644 --- a/src/Adyen/Model/Recurring/Address.php +++ b/src/Adyen/Model/Recurring/Address.php @@ -1,7 +1,7 @@