diff --git a/src/Adyen/Model/AcsWebhooks/Amount.php b/src/Adyen/Model/AcsWebhooks/Amount.php index 8cbc2b71e..6eb235519 100644 --- a/src/Adyen/Model/AcsWebhooks/Amount.php +++ b/src/Adyen/Model/AcsWebhooks/Amount.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * Amount Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Amount implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationDecision.php b/src/Adyen/Model/AcsWebhooks/AuthenticationDecision.php index fecb5079c..e870d4c7b 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationDecision.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationDecision.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * AuthenticationDecision Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AuthenticationDecision implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -320,11 +320,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php b/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php index 934a5b0cc..22374a576 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * AuthenticationInfo Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AuthenticationInfo implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -734,11 +734,11 @@ public function setChallengeIndicator($challengeIndicator) { $allowedValues = $this->getChallengeIndicatorAllowableValues(); if (!in_array($challengeIndicator, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'challengeIndicator', must be one of '%s'", + "challengeIndicator: unexpected enum value '%s' - Supported values are [%s]", $challengeIndicator, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -792,11 +792,11 @@ public function setDeviceChannel($deviceChannel) { $allowedValues = $this->getDeviceChannelAllowableValues(); if (!in_array($deviceChannel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'deviceChannel', must be one of '%s'", + "deviceChannel: unexpected enum value '%s' - Supported values are [%s]", $deviceChannel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -850,11 +850,11 @@ public function setExemptionIndicator($exemptionIndicator) { $allowedValues = $this->getExemptionIndicatorAllowableValues(); if (!in_array($exemptionIndicator, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'exemptionIndicator', must be one of '%s'", + "exemptionIndicator: unexpected enum value '%s' - Supported values are [%s]", $exemptionIndicator, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -908,11 +908,11 @@ public function setMessageCategory($messageCategory) { $allowedValues = $this->getMessageCategoryAllowableValues(); if (!in_array($messageCategory, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'messageCategory', must be one of '%s'", + "messageCategory: unexpected enum value '%s' - Supported values are [%s]", $messageCategory, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1014,11 +1014,11 @@ public function setTransStatus($transStatus) { $allowedValues = $this->getTransStatusAllowableValues(); if (!in_array($transStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'transStatus', must be one of '%s'", + "transStatus: unexpected enum value '%s' - Supported values are [%s]", $transStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1048,11 +1048,11 @@ public function setTransStatusReason($transStatusReason) { $allowedValues = $this->getTransStatusReasonAllowableValues(); if (!in_array($transStatusReason, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'transStatusReason', must be one of '%s'", + "transStatusReason: unexpected enum value '%s' - Supported values are [%s]", $transStatusReason, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1082,11 +1082,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php index ed234cca8..b89c686dc 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * AuthenticationNotificationData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AuthenticationNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -409,7 +409,7 @@ public function getId() /** * Sets id * - * @param string $id Unique identifier of the authentication. + * @param string $id The unique identifier of the authentication. * * @return self */ @@ -433,7 +433,7 @@ public function getPaymentInstrumentId() /** * Sets paymentInstrumentId * - * @param string $paymentInstrumentId Unique identifier of the payment instrument that was used for the authentication. + * @param string $paymentInstrumentId The unique identifier of the payment instrument that was used for the authentication. * * @return self */ @@ -489,11 +489,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php index 727abbea2..e8873725e 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * AuthenticationNotificationRequest Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AuthenticationNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -417,11 +417,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php index d2464b85f..e6d597baa 100644 --- a/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * BalancePlatformNotificationResponse Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -286,7 +286,7 @@ public function getNotificationResponse() /** * Sets notificationResponse * - * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). * * @return self */ diff --git a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php index faa9ad813..56e82597c 100644 --- a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php +++ b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * ChallengeInfo Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ChallengeInfo implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -397,11 +397,11 @@ public function setChallengeCancel($challengeCancel) { $allowedValues = $this->getChallengeCancelAllowableValues(); if (!in_array($challengeCancel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'challengeCancel', must be one of '%s'", + "challengeCancel: unexpected enum value '%s' - Supported values are [%s]", $challengeCancel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -431,11 +431,11 @@ public function setFlow($flow) { $allowedValues = $this->getFlowAllowableValues(); if (!in_array($flow, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'flow', must be one of '%s'", + "flow: unexpected enum value '%s' - Supported values are [%s]", $flow, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 145ff12f6..6db99ef45 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - if ($class === '\SplFileObject') { - $data = Utils::streamFor($data); - - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) - && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) - ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } - /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); diff --git a/src/Adyen/Model/AcsWebhooks/Purchase.php b/src/Adyen/Model/AcsWebhooks/Purchase.php index 3972342d2..7bbb19014 100644 --- a/src/Adyen/Model/AcsWebhooks/Purchase.php +++ b/src/Adyen/Model/AcsWebhooks/Purchase.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * Purchase Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Purchase implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php b/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php index 0ab3e3255..5ba96359e 100644 --- a/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php +++ b/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * PurchaseInfo Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PurchaseInfo implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -309,7 +309,7 @@ public function getDate() /** * Sets date * - * @param string $date Date of the purchase. + * @param string $date The date of the purchase. * * @return self */ @@ -333,7 +333,7 @@ public function getMerchantName() /** * Sets merchantName * - * @param string $merchantName Name of the merchant. + * @param string $merchantName The name of the business that the cardholder purchased from. * * @return self */ diff --git a/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.php b/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.php index dcf7f538b..9ab001dd2 100644 --- a/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.php +++ b/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * RelayedAuthenticationRequest Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -41,9 +41,13 @@ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ + 'environment' => 'string', 'id' => 'string', 'paymentInstrumentId' => 'string', - 'purchase' => '\Adyen\Model\AcsWebhooks\Purchase' + 'purchase' => '\Adyen\Model\AcsWebhooks\Purchase', + 'threeDSRequestorAppURL' => 'string', + 'timestamp' => '\DateTime', + 'type' => 'string' ]; /** @@ -54,9 +58,13 @@ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'environment' => null, 'id' => null, 'paymentInstrumentId' => null, - 'purchase' => null + 'purchase' => null, + 'threeDSRequestorAppURL' => null, + 'timestamp' => 'date-time', + 'type' => null ]; /** @@ -65,9 +73,13 @@ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \Json * @var boolean[] */ protected static $openAPINullables = [ + 'environment' => false, 'id' => false, 'paymentInstrumentId' => false, - 'purchase' => false + 'purchase' => false, + 'threeDSRequestorAppURL' => false, + 'timestamp' => false, + 'type' => false ]; /** @@ -156,9 +168,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'environment' => 'environment', 'id' => 'id', 'paymentInstrumentId' => 'paymentInstrumentId', - 'purchase' => 'purchase' + 'purchase' => 'purchase', + 'threeDSRequestorAppURL' => 'threeDSRequestorAppURL', + 'timestamp' => 'timestamp', + 'type' => 'type' ]; /** @@ -167,9 +183,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'environment' => 'setEnvironment', 'id' => 'setId', 'paymentInstrumentId' => 'setPaymentInstrumentId', - 'purchase' => 'setPurchase' + 'purchase' => 'setPurchase', + 'threeDSRequestorAppURL' => 'setThreeDSRequestorAppURL', + 'timestamp' => 'setTimestamp', + 'type' => 'setType' ]; /** @@ -178,9 +198,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'environment' => 'getEnvironment', 'id' => 'getId', 'paymentInstrumentId' => 'getPaymentInstrumentId', - 'purchase' => 'getPurchase' + 'purchase' => 'getPurchase', + 'threeDSRequestorAppURL' => 'getThreeDSRequestorAppURL', + 'timestamp' => 'getTimestamp', + 'type' => 'getType' ]; /** @@ -224,7 +248,19 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_BALANCE_PLATFORM_AUTHENTICATION_RELAYED = 'balancePlatform.authentication.relayed'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_PLATFORM_AUTHENTICATION_RELAYED, + ]; + } /** * Associative array for storing property values * @@ -240,9 +276,13 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('environment', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('paymentInstrumentId', $data ?? [], null); $this->setIfExists('purchase', $data ?? [], null); + $this->setIfExists('threeDSRequestorAppURL', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -272,6 +312,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } @@ -281,6 +324,18 @@ public function listInvalidProperties() if ($this->container['purchase'] === null) { $invalidProperties[] = "'purchase' can't be null"; } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -296,6 +351,30 @@ public function valid() } + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + $this->container['environment'] = $environment; + + return $this; + } + /** * Gets id * @@ -367,6 +446,88 @@ public function setPurchase($purchase) return $this; } + + /** + * Gets threeDSRequestorAppURL + * + * @return string|null + */ + public function getThreeDSRequestorAppURL() + { + return $this->container['threeDSRequestorAppURL']; + } + + /** + * Sets threeDSRequestorAppURL + * + * @param string|null $threeDSRequestorAppURL URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn't support auto-switching. + * + * @return self + */ + public function setThreeDSRequestorAppURL($threeDSRequestorAppURL) + { + $this->container['threeDSRequestorAppURL'] = $threeDSRequestorAppURL; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp When the event was queued. + * + * @return self + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + error_log( + sprintf( + "type: unexpected enum value '%s' - Supported values are [%s]", + $type, + implode(', ', $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.php b/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.php index 618cdecf2..fa8a92e02 100644 --- a/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.php +++ b/src/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * RelayedAuthenticationResponse Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class RelayedAuthenticationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/AcsWebhooks/Resource.php b/src/Adyen/Model/AcsWebhooks/Resource.php index 8001ea699..10e472173 100644 --- a/src/Adyen/Model/AcsWebhooks/Resource.php +++ b/src/Adyen/Model/AcsWebhooks/Resource.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * Resource Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Resource implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -324,7 +324,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/AcsWebhooks/ServiceError.php b/src/Adyen/Model/AcsWebhooks/ServiceError.php index 1e57df9d1..062310f18 100644 --- a/src/Adyen/Model/AcsWebhooks/ServiceError.php +++ b/src/Adyen/Model/AcsWebhooks/ServiceError.php @@ -15,14 +15,14 @@ namespace Adyen\Model\AcsWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\AcsWebhooks\ObjectSerializer; /** * ServiceError Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ServiceError implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.php index 3ae3e8735..ea2fa4e7f 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.php @@ -15,14 +15,14 @@ namespace Adyen\Model\NegativeBalanceWarningWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\NegativeBalanceWarningWebhooks\ObjectSerializer; /** * Amount Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Amount implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.php index ae62c4a41..23f6afd5f 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\NegativeBalanceWarningWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\NegativeBalanceWarningWebhooks\ObjectSerializer; /** * NegativeBalanceCompensationWarningNotificationData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class NegativeBalanceCompensationWarningNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -407,7 +407,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php index bbb42d765..ac9902bee 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php @@ -15,14 +15,14 @@ namespace Adyen\Model\NegativeBalanceWarningWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\NegativeBalanceWarningWebhooks\ObjectSerializer; /** * NegativeBalanceCompensationWarningNotificationRequest Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class NegativeBalanceCompensationWarningNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -417,11 +417,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php index a58e73774..54a916786 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - if ($class === '\SplFileObject') { - $data = Utils::streamFor($data); - - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) - && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) - ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } - /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php index e7f0deeea..153223668 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php @@ -15,14 +15,14 @@ namespace Adyen\Model\NegativeBalanceWarningWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\NegativeBalanceWarningWebhooks\ObjectSerializer; /** * Resource Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Resource implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -324,7 +324,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.php index 1ab75cfb2..51f66500e 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.php @@ -15,14 +15,14 @@ namespace Adyen\Model\NegativeBalanceWarningWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\NegativeBalanceWarningWebhooks\ObjectSerializer; /** * ResourceReference Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php index f7bde19c4..afe2f9894 100644 --- a/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php @@ -15,14 +15,14 @@ namespace Adyen\Model\ReportWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\ReportWebhooks\ObjectSerializer; /** * BalancePlatformNotificationResponse Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -286,7 +286,7 @@ public function getNotificationResponse() /** * Sets notificationResponse * - * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). * * @return self */ diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index 5d2be7682..819fa4aa9 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - if ($class === '\SplFileObject') { - $data = Utils::streamFor($data); - - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) - && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) - ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } - /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); diff --git a/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php b/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php index 555b268d6..61c772e46 100644 --- a/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php +++ b/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\ReportWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\ReportWebhooks\ObjectSerializer; /** * ReportNotificationData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ReportNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -416,7 +416,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php b/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php index 6ad545b1e..d88705707 100644 --- a/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php +++ b/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php @@ -15,14 +15,14 @@ namespace Adyen\Model\ReportWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\ReportWebhooks\ObjectSerializer; /** * ReportNotificationRequest Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ReportNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -417,11 +417,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/ReportWebhooks/Resource.php b/src/Adyen/Model/ReportWebhooks/Resource.php index 1aebdf2fa..1cc010aa1 100644 --- a/src/Adyen/Model/ReportWebhooks/Resource.php +++ b/src/Adyen/Model/ReportWebhooks/Resource.php @@ -15,14 +15,14 @@ namespace Adyen\Model\ReportWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\ReportWebhooks\ObjectSerializer; /** * Resource Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Resource implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -324,7 +324,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/ReportWebhooks/ResourceReference.php b/src/Adyen/Model/ReportWebhooks/ResourceReference.php index 4333fb180..0046fcfbd 100644 --- a/src/Adyen/Model/ReportWebhooks/ResourceReference.php +++ b/src/Adyen/Model/ReportWebhooks/ResourceReference.php @@ -15,14 +15,14 @@ namespace Adyen\Model\ReportWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\ReportWebhooks\ObjectSerializer; /** * ResourceReference Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/Amount.php b/src/Adyen/Model/TransactionWebhooks/Amount.php index 52a93a29a..b6cc6e6d9 100644 --- a/src/Adyen/Model/TransactionWebhooks/Amount.php +++ b/src/Adyen/Model/TransactionWebhooks/Amount.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * Amount Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Amount implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php index 0ca2d469a..4eebbf612 100644 --- a/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * BalancePlatformNotificationResponse Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -286,7 +286,7 @@ public function getNotificationResponse() /** * Sets notificationResponse * - * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). * * @return self */ diff --git a/src/Adyen/Model/TransactionWebhooks/BankCategoryData.php b/src/Adyen/Model/TransactionWebhooks/BankCategoryData.php index fd3fdf4bf..31d4b0a52 100644 --- a/src/Adyen/Model/TransactionWebhooks/BankCategoryData.php +++ b/src/Adyen/Model/TransactionWebhooks/BankCategoryData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * BankCategoryData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BankCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -345,7 +345,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). * * @return self */ @@ -353,11 +353,11 @@ public function setPriority($priority) { $allowedValues = $this->getPriorityAllowableValues(); if (!in_array($priority, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'priority', must be one of '%s'", + "priority: unexpected enum value '%s' - Supported values are [%s]", $priority, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -387,11 +387,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransactionWebhooks/InternalCategoryData.php b/src/Adyen/Model/TransactionWebhooks/InternalCategoryData.php index 3e389699d..f398ea70f 100644 --- a/src/Adyen/Model/TransactionWebhooks/InternalCategoryData.php +++ b/src/Adyen/Model/TransactionWebhooks/InternalCategoryData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * InternalCategoryData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class InternalCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -377,11 +377,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransactionWebhooks/IssuedCard.php b/src/Adyen/Model/TransactionWebhooks/IssuedCard.php index 7344cb680..d59023155 100644 --- a/src/Adyen/Model/TransactionWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransactionWebhooks/IssuedCard.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * IssuedCard Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -47,6 +47,7 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable 'relayedAuthorisationData' => '\Adyen\Model\TransactionWebhooks\RelayedAuthorisationData', 'schemeTraceId' => 'string', 'schemeUniqueTransactionId' => 'string', + 'threeDSecure' => '\Adyen\Model\TransactionWebhooks\ThreeDSecure', 'type' => 'string', 'validationFacts' => '\Adyen\Model\TransactionWebhooks\TransferNotificationValidationFact[]' ]; @@ -65,6 +66,7 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable 'relayedAuthorisationData' => null, 'schemeTraceId' => null, 'schemeUniqueTransactionId' => null, + 'threeDSecure' => null, 'type' => null, 'validationFacts' => null ]; @@ -81,6 +83,7 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable 'relayedAuthorisationData' => false, 'schemeTraceId' => false, 'schemeUniqueTransactionId' => false, + 'threeDSecure' => false, 'type' => false, 'validationFacts' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'relayedAuthorisationData', 'schemeTraceId' => 'schemeTraceId', 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', + 'threeDSecure' => 'threeDSecure', 'type' => 'type', 'validationFacts' => 'validationFacts' ]; @@ -193,6 +197,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'setRelayedAuthorisationData', 'schemeTraceId' => 'setSchemeTraceId', 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', + 'threeDSecure' => 'setThreeDSecure', 'type' => 'setType', 'validationFacts' => 'setValidationFacts' ]; @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'getRelayedAuthorisationData', 'schemeTraceId' => 'getSchemeTraceId', 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', + 'threeDSecure' => 'getThreeDSecure', 'type' => 'getType', 'validationFacts' => 'getValidationFacts' ]; @@ -338,6 +344,7 @@ public function __construct(?array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); + $this->setIfExists('threeDSecure', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); } @@ -456,11 +463,11 @@ public function setPanEntryMode($panEntryMode) { $allowedValues = $this->getPanEntryModeAllowableValues(); if (!in_array($panEntryMode, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'panEntryMode', must be one of '%s'", + "panEntryMode: unexpected enum value '%s' - Supported values are [%s]", $panEntryMode, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -490,11 +497,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -575,6 +582,30 @@ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) return $this; } + /** + * Gets threeDSecure + * + * @return \Adyen\Model\TransactionWebhooks\ThreeDSecure|null + */ + public function getThreeDSecure() + { + return $this->container['threeDSecure']; + } + + /** + * Sets threeDSecure + * + * @param \Adyen\Model\TransactionWebhooks\ThreeDSecure|null $threeDSecure threeDSecure + * + * @return self + */ + public function setThreeDSecure($threeDSecure) + { + $this->container['threeDSecure'] = $threeDSecure; + + return $this; + } + /** * Gets type * @@ -596,11 +627,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 9a58d27d7..e6ca71de1 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - if ($class === '\SplFileObject') { - $data = Utils::streamFor($data); - - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) - && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) - ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } - /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); diff --git a/src/Adyen/Model/TransactionWebhooks/PaymentInstrument.php b/src/Adyen/Model/TransactionWebhooks/PaymentInstrument.php index f9f8ff09a..a38122ee8 100644 --- a/src/Adyen/Model/TransactionWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/TransactionWebhooks/PaymentInstrument.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * PaymentInstrument Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/PlatformPayment.php b/src/Adyen/Model/TransactionWebhooks/PlatformPayment.php index e63cae972..763836c2b 100644 --- a/src/Adyen/Model/TransactionWebhooks/PlatformPayment.php +++ b/src/Adyen/Model/TransactionWebhooks/PlatformPayment.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * PlatformPayment Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PlatformPayment implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -475,11 +475,11 @@ public function setPlatformPaymentType($platformPaymentType) { $allowedValues = $this->getPlatformPaymentTypeAllowableValues(); if (!in_array($platformPaymentType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'platformPaymentType', must be one of '%s'", + "platformPaymentType: unexpected enum value '%s' - Supported values are [%s]", $platformPaymentType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -533,11 +533,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.php b/src/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.php index 7a118584d..1491043d0 100644 --- a/src/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.php +++ b/src/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * RelayedAuthorisationData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class RelayedAuthorisationData implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/Resource.php b/src/Adyen/Model/TransactionWebhooks/Resource.php index f85e77e92..415bb890c 100644 --- a/src/Adyen/Model/TransactionWebhooks/Resource.php +++ b/src/Adyen/Model/TransactionWebhooks/Resource.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * Resource Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Resource implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -324,7 +324,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php index 5c59ad3ed..4b80acee5 100644 --- a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php +++ b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * ResourceReference Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/ThreeDSecure.php b/src/Adyen/Model/TransactionWebhooks/ThreeDSecure.php new file mode 100644 index 000000000..36d8cceb2 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhooks/ThreeDSecure.php @@ -0,0 +1,404 @@ + + */ +class ThreeDSecure implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDSecure'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acsTransactionId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acsTransactionId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acsTransactionId' => 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 = [ + 'acsTransactionId' => 'acsTransactionId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acsTransactionId' => 'setAcsTransactionId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acsTransactionId' => 'getAcsTransactionId' + ]; + + /** + * 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('acsTransactionId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets acsTransactionId + * + * @return string|null + */ + public function getAcsTransactionId() + { + return $this->container['acsTransactionId']; + } + + /** + * Sets acsTransactionId + * + * @param string|null $acsTransactionId The transaction identifier for the Access Control Server + * + * @return self + */ + public function setAcsTransactionId($acsTransactionId) + { + $this->container['acsTransactionId'] = $acsTransactionId; + + 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/TransactionWebhooks/Transaction.php b/src/Adyen/Model/TransactionWebhooks/Transaction.php index 114b9b09d..8d2a6df01 100644 --- a/src/Adyen/Model/TransactionWebhooks/Transaction.php +++ b/src/Adyen/Model/TransactionWebhooks/Transaction.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * Transaction Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -537,7 +537,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ @@ -665,11 +665,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php index 2698ad0de..77a1c5737 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php +++ b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * TransactionNotificationRequestV4 Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransactionNotificationRequestV4 implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -414,11 +414,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.php b/src/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.php index 7655a3d22..4e9c0fca8 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * TransferNotificationValidationFact Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferNotificationValidationFact implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/TransferView.php b/src/Adyen/Model/TransactionWebhooks/TransferView.php index cc51f8a4b..4fad07204 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransferView.php +++ b/src/Adyen/Model/TransactionWebhooks/TransferView.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** * TransferView Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferView implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.php b/src/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.php index 1eb496cff..139a6992a 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.php +++ b/src/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.php @@ -15,7 +15,7 @@ namespace Adyen\Model\TransactionWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransactionWebhooks\ObjectSerializer; /** @@ -24,7 +24,7 @@ * The relevant data according to the transfer category. * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferViewCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -53,6 +53,7 @@ class TransferViewCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'relayedAuthorisationData' => '\Adyen\Model\TransactionWebhooks\RelayedAuthorisationData', 'schemeTraceId' => 'string', 'schemeUniqueTransactionId' => 'string', + 'threeDSecure' => '\Adyen\Model\TransactionWebhooks\ThreeDSecure', 'validationFacts' => '\Adyen\Model\TransactionWebhooks\TransferNotificationValidationFact[]', 'paymentMerchantReference' => 'string', 'platformPaymentType' => 'string', @@ -77,6 +78,7 @@ class TransferViewCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'relayedAuthorisationData' => null, 'schemeTraceId' => null, 'schemeUniqueTransactionId' => null, + 'threeDSecure' => null, 'validationFacts' => null, 'paymentMerchantReference' => null, 'platformPaymentType' => null, @@ -99,6 +101,7 @@ class TransferViewCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'relayedAuthorisationData' => false, 'schemeTraceId' => false, 'schemeUniqueTransactionId' => false, + 'threeDSecure' => false, 'validationFacts' => false, 'paymentMerchantReference' => false, 'platformPaymentType' => false, @@ -201,6 +204,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'relayedAuthorisationData', 'schemeTraceId' => 'schemeTraceId', 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', + 'threeDSecure' => 'threeDSecure', 'validationFacts' => 'validationFacts', 'paymentMerchantReference' => 'paymentMerchantReference', 'platformPaymentType' => 'platformPaymentType', @@ -223,6 +227,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'setRelayedAuthorisationData', 'schemeTraceId' => 'setSchemeTraceId', 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', + 'threeDSecure' => 'setThreeDSecure', 'validationFacts' => 'setValidationFacts', 'paymentMerchantReference' => 'setPaymentMerchantReference', 'platformPaymentType' => 'setPlatformPaymentType', @@ -245,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'getRelayedAuthorisationData', 'schemeTraceId' => 'getSchemeTraceId', 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', + 'threeDSecure' => 'getThreeDSecure', 'validationFacts' => 'getValidationFacts', 'paymentMerchantReference' => 'getPaymentMerchantReference', 'platformPaymentType' => 'getPlatformPaymentType', @@ -317,6 +323,7 @@ public function __construct(?array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); + $this->setIfExists('threeDSecure', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); @@ -383,7 +390,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). * * @return self */ @@ -610,6 +617,30 @@ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) return $this; } + /** + * Gets threeDSecure + * + * @return \Adyen\Model\TransactionWebhooks\ThreeDSecure|null + */ + public function getThreeDSecure() + { + return $this->container['threeDSecure']; + } + + /** + * Sets threeDSecure + * + * @param \Adyen\Model\TransactionWebhooks\ThreeDSecure|null $threeDSecure threeDSecure + * + * @return self + */ + public function setThreeDSecure($threeDSecure) + { + $this->container['threeDSecure'] = $threeDSecure; + + return $this; + } + /** * Gets validationFacts * diff --git a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php index 4adc0a142..b3a753291 100644 --- a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * AULocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -386,11 +386,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php b/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php index a1e850b52..f92993464 100644 --- a/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * AdditionalBankIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AdditionalBankIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -218,6 +218,8 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_AU_BSB_CODE = 'auBsbCode'; + public const TYPE_CA_ROUTING_NUMBER = 'caRoutingNumber'; public const TYPE_GB_SORT_CODE = 'gbSortCode'; public const TYPE_US_ROUTING_NUMBER = 'usRoutingNumber'; @@ -229,6 +231,8 @@ public function getModelName() public function getTypeAllowableValues() { return [ + self::TYPE_AU_BSB_CODE, + self::TYPE_CA_ROUTING_NUMBER, self::TYPE_GB_SORT_CODE, self::TYPE_US_ROUTING_NUMBER, ]; @@ -340,7 +344,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. + * @param string|null $type The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. * * @return self */ @@ -348,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/Address.php b/src/Adyen/Model/TransferWebhooks/Address.php index 8e1821c6b..b8914fd9d 100644 --- a/src/Adyen/Model/TransferWebhooks/Address.php +++ b/src/Adyen/Model/TransferWebhooks/Address.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Address Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Address implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/Airline.php b/src/Adyen/Model/TransferWebhooks/Airline.php index 3052745d9..cc81f9072 100644 --- a/src/Adyen/Model/TransferWebhooks/Airline.php +++ b/src/Adyen/Model/TransferWebhooks/Airline.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Airline Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Airline implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/Amount.php b/src/Adyen/Model/TransferWebhooks/Amount.php index edb2e4a4f..0cb50a466 100644 --- a/src/Adyen/Model/TransferWebhooks/Amount.php +++ b/src/Adyen/Model/TransferWebhooks/Amount.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Amount Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Amount implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php b/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php index 065c9bd88..2ec7de2b5 100644 --- a/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php +++ b/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * AmountAdjustment Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class AmountAdjustment implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -359,11 +359,11 @@ public function setAmountAdjustmentType($amountAdjustmentType) { $allowedValues = $this->getAmountAdjustmentTypeAllowableValues(); if (!in_array($amountAdjustmentType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'amountAdjustmentType', must be one of '%s'", + "amountAdjustmentType: unexpected enum value '%s' - Supported values are [%s]", $amountAdjustmentType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php index a26868b77..a21cfb93c 100644 --- a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * BRLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -451,11 +451,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/BalanceMutation.php b/src/Adyen/Model/TransferWebhooks/BalanceMutation.php index 1d1329e2f..971f9c4a1 100644 --- a/src/Adyen/Model/TransferWebhooks/BalanceMutation.php +++ b/src/Adyen/Model/TransferWebhooks/BalanceMutation.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * BalanceMutation Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BalanceMutation implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php index 982d2e811..eaf903de3 100644 --- a/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * BalancePlatformNotificationResponse Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -286,7 +286,7 @@ public function getNotificationResponse() /** * Sets notificationResponse * - * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3.php index 0dd5debea..1621563f5 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * BankAccountV3 Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index 17ecdbc65..6e610d9cb 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -15,7 +15,7 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** @@ -24,7 +24,7 @@ * Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php index d7700235c..3d66774a2 100644 --- a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * BankCategoryData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class BankCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -345,7 +345,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). * * @return self */ @@ -353,11 +353,11 @@ public function setPriority($priority) { $allowedValues = $this->getPriorityAllowableValues(); if (!in_array($priority, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'priority', must be one of '%s'", + "priority: unexpected enum value '%s' - Supported values are [%s]", $priority, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -387,11 +387,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php index 286df86d6..a6cfaf6f1 100644 --- a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * CALocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class CALocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -402,11 +402,11 @@ public function setAccountType($accountType) { $allowedValues = $this->getAccountTypeAllowableValues(); if (!in_array($accountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'accountType', must be one of '%s'", + "accountType: unexpected enum value '%s' - Supported values are [%s]", $accountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -484,11 +484,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php index 8d5509706..0465e0057 100644 --- a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * CZLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class CZLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -386,11 +386,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/Card.php b/src/Adyen/Model/TransferWebhooks/Card.php index 3184758a0..5eba9bb31 100644 --- a/src/Adyen/Model/TransferWebhooks/Card.php +++ b/src/Adyen/Model/TransferWebhooks/Card.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Card Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Card implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/CardIdentification.php b/src/Adyen/Model/TransferWebhooks/CardIdentification.php index e13220227..79e568a04 100644 --- a/src/Adyen/Model/TransferWebhooks/CardIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CardIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * CardIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class CardIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php b/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php index d396cf129..b08ad604f 100644 --- a/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * ConfirmationTrackingData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ConfirmationTrackingData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -341,7 +341,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. + * @param string $status The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. * * @return self */ @@ -349,11 +349,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -383,11 +383,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php b/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php index f58df6ae3..3ab9f3aa7 100644 --- a/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php +++ b/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * CounterpartyV3 Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class CounterpartyV3 implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php index 386a702c5..968f3cacb 100644 --- a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * DKLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class DKLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -386,11 +386,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/DirectDebitInformation.php b/src/Adyen/Model/TransferWebhooks/DirectDebitInformation.php index 63d1d67ae..a69d5991f 100644 --- a/src/Adyen/Model/TransferWebhooks/DirectDebitInformation.php +++ b/src/Adyen/Model/TransferWebhooks/DirectDebitInformation.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * DirectDebitInformation Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class DirectDebitInformation implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php b/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php index 6cdeed48c..fb89897eb 100644 --- a/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * EstimationTrackingData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class EstimationTrackingData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -352,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/ExecutionDate.php b/src/Adyen/Model/TransferWebhooks/ExecutionDate.php new file mode 100644 index 000000000..7418d4f51 --- /dev/null +++ b/src/Adyen/Model/TransferWebhooks/ExecutionDate.php @@ -0,0 +1,435 @@ + + */ +class ExecutionDate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ExecutionDate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'date' => '\DateTime', + 'timezone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'date' => 'date', + 'timezone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'date' => false, + 'timezone' => 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 = [ + 'date' => 'date', + 'timezone' => 'timezone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'date' => 'setDate', + 'timezone' => 'setTimezone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'date' => 'getDate', + 'timezone' => 'getTimezone' + ]; + + /** + * 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('date', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets date + * + * @return \DateTime|null + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime|null $date The date when the transfer will be processed. This date must be: * Within 30 days of the current date. * In the [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) **YYYY-MM-DD**. For example: 2025-01-31 + * + * @return self + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() + { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone The timezone that applies to the execution date. Use a timezone identifier from the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Example: **America/Los_Angeles**. Default value: **Europe/Amsterdam**. + * + * @return self + */ + public function setTimezone($timezone) + { + $this->container['timezone'] = $timezone; + + 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/TransferWebhooks/ExternalReason.php b/src/Adyen/Model/TransferWebhooks/ExternalReason.php index 5b07de319..b98173a31 100644 --- a/src/Adyen/Model/TransferWebhooks/ExternalReason.php +++ b/src/Adyen/Model/TransferWebhooks/ExternalReason.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * ExternalReason Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ExternalReason implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index 670a61ac4..ff368c984 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * HKLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -386,11 +386,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php index be98d8ad9..240c1d9a8 100644 --- a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * HULocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class HULocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -352,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php index cb9baf8fa..0fb6ababb 100644 --- a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * IbanAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -352,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php index 261f3f0e2..61cc3c61e 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * InternalCategoryData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class InternalCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -377,11 +377,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php b/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php index 7b35511f9..478bc1276 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * InternalReviewTrackingData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class InternalReviewTrackingData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -379,11 +379,11 @@ public function setReason($reason) { $allowedValues = $this->getReasonAllowableValues(); if (!in_array($reason, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'reason', must be one of '%s'", + "reason: unexpected enum value '%s' - Supported values are [%s]", $reason, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -405,7 +405,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. + * @param string $status The status of the transfer. Possible values: - **pending**: the transfer is under internal review by Adyen. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. * * @return self */ @@ -413,11 +413,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -447,11 +447,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/IssuedCard.php b/src/Adyen/Model/TransferWebhooks/IssuedCard.php index b8b765c20..1755b5009 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransferWebhooks/IssuedCard.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * IssuedCard Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -47,6 +47,7 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable 'relayedAuthorisationData' => '\Adyen\Model\TransferWebhooks\RelayedAuthorisationData', 'schemeTraceId' => 'string', 'schemeUniqueTransactionId' => 'string', + 'threeDSecure' => '\Adyen\Model\TransferWebhooks\ThreeDSecure', 'type' => 'string', 'validationFacts' => '\Adyen\Model\TransferWebhooks\TransferNotificationValidationFact[]' ]; @@ -65,6 +66,7 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable 'relayedAuthorisationData' => null, 'schemeTraceId' => null, 'schemeUniqueTransactionId' => null, + 'threeDSecure' => null, 'type' => null, 'validationFacts' => null ]; @@ -81,6 +83,7 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable 'relayedAuthorisationData' => false, 'schemeTraceId' => false, 'schemeUniqueTransactionId' => false, + 'threeDSecure' => false, 'type' => false, 'validationFacts' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'relayedAuthorisationData', 'schemeTraceId' => 'schemeTraceId', 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', + 'threeDSecure' => 'threeDSecure', 'type' => 'type', 'validationFacts' => 'validationFacts' ]; @@ -193,6 +197,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'setRelayedAuthorisationData', 'schemeTraceId' => 'setSchemeTraceId', 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', + 'threeDSecure' => 'setThreeDSecure', 'type' => 'setType', 'validationFacts' => 'setValidationFacts' ]; @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'getRelayedAuthorisationData', 'schemeTraceId' => 'getSchemeTraceId', 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', + 'threeDSecure' => 'getThreeDSecure', 'type' => 'getType', 'validationFacts' => 'getValidationFacts' ]; @@ -338,6 +344,7 @@ public function __construct(?array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); + $this->setIfExists('threeDSecure', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); } @@ -456,11 +463,11 @@ public function setPanEntryMode($panEntryMode) { $allowedValues = $this->getPanEntryModeAllowableValues(); if (!in_array($panEntryMode, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'panEntryMode', must be one of '%s'", + "panEntryMode: unexpected enum value '%s' - Supported values are [%s]", $panEntryMode, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -490,11 +497,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -575,6 +582,30 @@ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) return $this; } + /** + * Gets threeDSecure + * + * @return \Adyen\Model\TransferWebhooks\ThreeDSecure|null + */ + public function getThreeDSecure() + { + return $this->container['threeDSecure']; + } + + /** + * Sets threeDSecure + * + * @param \Adyen\Model\TransferWebhooks\ThreeDSecure|null $threeDSecure threeDSecure + * + * @return self + */ + public function setThreeDSecure($threeDSecure) + { + $this->container['threeDSecure'] = $threeDSecure; + + return $this; + } + /** * Gets type * @@ -596,11 +627,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/IssuingTransactionData.php b/src/Adyen/Model/TransferWebhooks/IssuingTransactionData.php index 3e248fbf4..7c6bb77ed 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuingTransactionData.php +++ b/src/Adyen/Model/TransferWebhooks/IssuingTransactionData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * IssuingTransactionData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class IssuingTransactionData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -349,11 +349,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/Leg.php b/src/Adyen/Model/TransferWebhooks/Leg.php index 16b4a9579..ec9c85315 100644 --- a/src/Adyen/Model/TransferWebhooks/Leg.php +++ b/src/Adyen/Model/TransferWebhooks/Leg.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Leg Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Leg implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/Lodging.php b/src/Adyen/Model/TransferWebhooks/Lodging.php index 44f4ec2aa..a3f9b0b31 100644 --- a/src/Adyen/Model/TransferWebhooks/Lodging.php +++ b/src/Adyen/Model/TransferWebhooks/Lodging.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Lodging Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Lodging implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/MerchantData.php b/src/Adyen/Model/TransferWebhooks/MerchantData.php index 4cbe73a37..4a4b95304 100644 --- a/src/Adyen/Model/TransferWebhooks/MerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/MerchantData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * MerchantData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/MerchantPurchaseData.php b/src/Adyen/Model/TransferWebhooks/MerchantPurchaseData.php index b988bf226..4d9ed460b 100644 --- a/src/Adyen/Model/TransferWebhooks/MerchantPurchaseData.php +++ b/src/Adyen/Model/TransferWebhooks/MerchantPurchaseData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * MerchantPurchaseData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class MerchantPurchaseData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -380,11 +380,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/Modification.php b/src/Adyen/Model/TransferWebhooks/Modification.php index edc34610a..c60394dc6 100644 --- a/src/Adyen/Model/TransferWebhooks/Modification.php +++ b/src/Adyen/Model/TransferWebhooks/Modification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Modification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Modification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -547,11 +547,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php index fada0cfa6..18d00f397 100644 --- a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * NOLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class NOLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -352,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index 3f12b586e..2e2ce8a71 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * NZLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -352,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/NameLocation.php b/src/Adyen/Model/TransferWebhooks/NameLocation.php index 1ca0081af..82684292d 100644 --- a/src/Adyen/Model/TransferWebhooks/NameLocation.php +++ b/src/Adyen/Model/TransferWebhooks/NameLocation.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * NameLocation Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class NameLocation implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php index 1409c2c5e..470445f2b 100644 --- a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * NumberAndBicAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class NumberAndBicAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -417,11 +417,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index b711c9096..ba698c53f 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - if ($class === '\SplFileObject') { - $data = Utils::streamFor($data); - - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) - && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) - ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } - /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); diff --git a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php index bf7e9cbc3..113baf58c 100644 --- a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * PLLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PLLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -352,11 +352,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php index 9059f5666..62ac351d4 100644 --- a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * PartyIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PartyIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -43,11 +43,13 @@ class PartyIdentification implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPITypes = [ 'address' => '\Adyen\Model\TransferWebhooks\Address', 'dateOfBirth' => '\DateTime', + 'email' => 'string', 'firstName' => 'string', 'fullName' => 'string', 'lastName' => 'string', 'reference' => 'string', - 'type' => 'string' + 'type' => 'string', + 'url' => 'string' ]; /** @@ -60,11 +62,13 @@ class PartyIdentification implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPIFormats = [ 'address' => null, 'dateOfBirth' => 'date', + 'email' => null, 'firstName' => null, 'fullName' => null, 'lastName' => null, 'reference' => null, - 'type' => null + 'type' => null, + 'url' => null ]; /** @@ -75,11 +79,13 @@ class PartyIdentification implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPINullables = [ 'address' => false, 'dateOfBirth' => false, + 'email' => false, 'firstName' => false, 'fullName' => false, 'lastName' => false, 'reference' => false, - 'type' => false + 'type' => false, + 'url' => false ]; /** @@ -170,11 +176,13 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'address' => 'address', 'dateOfBirth' => 'dateOfBirth', + 'email' => 'email', 'firstName' => 'firstName', 'fullName' => 'fullName', 'lastName' => 'lastName', 'reference' => 'reference', - 'type' => 'type' + 'type' => 'type', + 'url' => 'url' ]; /** @@ -185,11 +193,13 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'address' => 'setAddress', 'dateOfBirth' => 'setDateOfBirth', + 'email' => 'setEmail', 'firstName' => 'setFirstName', 'fullName' => 'setFullName', 'lastName' => 'setLastName', 'reference' => 'setReference', - 'type' => 'setType' + 'type' => 'setType', + 'url' => 'setUrl' ]; /** @@ -200,11 +210,13 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'address' => 'getAddress', 'dateOfBirth' => 'getDateOfBirth', + 'email' => 'getEmail', 'firstName' => 'getFirstName', 'fullName' => 'getFullName', 'lastName' => 'getLastName', 'reference' => 'getReference', - 'type' => 'getType' + 'type' => 'getType', + 'url' => 'getUrl' ]; /** @@ -282,11 +294,13 @@ public function __construct(?array $data = null) { $this->setIfExists('address', $data ?? [], null); $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -388,6 +402,30 @@ public function setDateOfBirth($dateOfBirth) return $this; } + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The email address of the organization or individual. Maximum length: 254 characters. + * + * @return self + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** * Gets firstName * @@ -505,11 +543,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -517,6 +555,30 @@ public function setType($type) return $this; } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url The URL of the organization or individual. Maximum length: 255 characters. + * + * @return self + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php b/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php index 7046c8227..3ab15483a 100644 --- a/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * PaymentInstrument Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php index d0b9555e5..1389f2933 100644 --- a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php +++ b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * PlatformPayment Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class PlatformPayment implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -475,11 +475,11 @@ public function setPlatformPaymentType($platformPaymentType) { $allowedValues = $this->getPlatformPaymentTypeAllowableValues(); if (!in_array($platformPaymentType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'platformPaymentType', must be one of '%s'", + "platformPaymentType: unexpected enum value '%s' - Supported values are [%s]", $platformPaymentType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -533,11 +533,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php b/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php index 6ea219b3b..e9e4852be 100644 --- a/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php +++ b/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * RelayedAuthorisationData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class RelayedAuthorisationData implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/Resource.php b/src/Adyen/Model/TransferWebhooks/Resource.php index 9e34a22ae..f4070a009 100644 --- a/src/Adyen/Model/TransferWebhooks/Resource.php +++ b/src/Adyen/Model/TransferWebhooks/Resource.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * Resource Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class Resource implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -324,7 +324,7 @@ public function getCreationDate() /** * Sets creationDate * - * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/ResourceReference.php b/src/Adyen/Model/TransferWebhooks/ResourceReference.php index 83b7518f4..cdbee10d3 100644 --- a/src/Adyen/Model/TransferWebhooks/ResourceReference.php +++ b/src/Adyen/Model/TransferWebhooks/ResourceReference.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * ResourceReference Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php index eed6f2660..67f702276 100644 --- a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * SELocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class SELocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -386,11 +386,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php index d536fe293..f0144581c 100644 --- a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * SGLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class SGLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -383,11 +383,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/ThreeDSecure.php b/src/Adyen/Model/TransferWebhooks/ThreeDSecure.php new file mode 100644 index 000000000..5e21a279a --- /dev/null +++ b/src/Adyen/Model/TransferWebhooks/ThreeDSecure.php @@ -0,0 +1,404 @@ + + */ +class ThreeDSecure implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDSecure'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acsTransactionId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acsTransactionId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acsTransactionId' => 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 = [ + 'acsTransactionId' => 'acsTransactionId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acsTransactionId' => 'setAcsTransactionId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acsTransactionId' => 'getAcsTransactionId' + ]; + + /** + * 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('acsTransactionId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets acsTransactionId + * + * @return string|null + */ + public function getAcsTransactionId() + { + return $this->container['acsTransactionId']; + } + + /** + * Sets acsTransactionId + * + * @param string|null $acsTransactionId The transaction identifier for the Access Control Server + * + * @return self + */ + public function setAcsTransactionId($acsTransactionId) + { + $this->container['acsTransactionId'] = $acsTransactionId; + + 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/TransferWebhooks/TransactionEventViolation.php b/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php index 1618780d4..98e38f11d 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransactionEventViolation Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransactionEventViolation implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php b/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php index c634b1b7e..b4e54c3f8 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransactionRuleReference Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransactionRuleReference implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -410,7 +410,7 @@ public function getScore() /** * Sets score * - * @param int|null $score The score of the rule in case it's a scoreBased rule. + * @param int|null $score The transaction score determined by the rule. Returned only when `outcomeType` is **scoreBased**. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php b/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php index edbf5a1a6..5030ae356 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransactionRuleSource Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransactionRuleSource implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php b/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php index e70a6e506..3e0f36f97 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransactionRulesResult Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransactionRulesResult implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index 420db2b4f..36fc234cc 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -49,12 +49,14 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'category' => 'string', 'categoryData' => '\Adyen\Model\TransferWebhooks\TransferDataCategoryData', 'counterparty' => '\Adyen\Model\TransferWebhooks\TransferNotificationCounterParty', + 'createdAt' => '\DateTime', 'creationDate' => '\DateTime', 'description' => 'string', 'directDebitInformation' => '\Adyen\Model\TransferWebhooks\DirectDebitInformation', 'direction' => 'string', 'eventId' => 'string', 'events' => '\Adyen\Model\TransferWebhooks\TransferEvent[]', + 'executionDate' => '\Adyen\Model\TransferWebhooks\ExecutionDate', 'externalReason' => '\Adyen\Model\TransferWebhooks\ExternalReason', 'id' => 'string', 'paymentInstrument' => '\Adyen\Model\TransferWebhooks\PaymentInstrument', @@ -66,7 +68,8 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => 'string', 'tracking' => '\Adyen\Model\TransferWebhooks\TransferDataTracking', 'transactionRulesResult' => '\Adyen\Model\TransferWebhooks\TransactionRulesResult', - 'type' => 'string' + 'type' => 'string', + 'updatedAt' => '\DateTime' ]; /** @@ -85,12 +88,14 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'category' => null, 'categoryData' => null, 'counterparty' => null, + 'createdAt' => 'date-time', 'creationDate' => 'date-time', 'description' => null, 'directDebitInformation' => null, 'direction' => null, 'eventId' => null, 'events' => null, + 'executionDate' => null, 'externalReason' => null, 'id' => null, 'paymentInstrument' => null, @@ -102,7 +107,8 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => null, 'tracking' => null, 'transactionRulesResult' => null, - 'type' => null + 'type' => null, + 'updatedAt' => 'date-time' ]; /** @@ -119,12 +125,14 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'category' => false, 'categoryData' => false, 'counterparty' => false, + 'createdAt' => false, 'creationDate' => false, 'description' => false, 'directDebitInformation' => false, 'direction' => false, 'eventId' => false, 'events' => false, + 'executionDate' => false, 'externalReason' => false, 'id' => false, 'paymentInstrument' => false, @@ -136,7 +144,8 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => false, 'tracking' => false, 'transactionRulesResult' => false, - 'type' => false + 'type' => false, + 'updatedAt' => false ]; /** @@ -233,12 +242,14 @@ public function isNullableSetToNull(string $property): bool 'category' => 'category', 'categoryData' => 'categoryData', 'counterparty' => 'counterparty', + 'createdAt' => 'createdAt', 'creationDate' => 'creationDate', 'description' => 'description', 'directDebitInformation' => 'directDebitInformation', 'direction' => 'direction', 'eventId' => 'eventId', 'events' => 'events', + 'executionDate' => 'executionDate', 'externalReason' => 'externalReason', 'id' => 'id', 'paymentInstrument' => 'paymentInstrument', @@ -250,7 +261,8 @@ public function isNullableSetToNull(string $property): bool 'status' => 'status', 'tracking' => 'tracking', 'transactionRulesResult' => 'transactionRulesResult', - 'type' => 'type' + 'type' => 'type', + 'updatedAt' => 'updatedAt' ]; /** @@ -267,12 +279,14 @@ public function isNullableSetToNull(string $property): bool 'category' => 'setCategory', 'categoryData' => 'setCategoryData', 'counterparty' => 'setCounterparty', + 'createdAt' => 'setCreatedAt', 'creationDate' => 'setCreationDate', 'description' => 'setDescription', 'directDebitInformation' => 'setDirectDebitInformation', 'direction' => 'setDirection', 'eventId' => 'setEventId', 'events' => 'setEvents', + 'executionDate' => 'setExecutionDate', 'externalReason' => 'setExternalReason', 'id' => 'setId', 'paymentInstrument' => 'setPaymentInstrument', @@ -284,7 +298,8 @@ public function isNullableSetToNull(string $property): bool 'status' => 'setStatus', 'tracking' => 'setTracking', 'transactionRulesResult' => 'setTransactionRulesResult', - 'type' => 'setType' + 'type' => 'setType', + 'updatedAt' => 'setUpdatedAt' ]; /** @@ -301,12 +316,14 @@ public function isNullableSetToNull(string $property): bool 'category' => 'getCategory', 'categoryData' => 'getCategoryData', 'counterparty' => 'getCounterparty', + 'createdAt' => 'getCreatedAt', 'creationDate' => 'getCreationDate', 'description' => 'getDescription', 'directDebitInformation' => 'getDirectDebitInformation', 'direction' => 'getDirection', 'eventId' => 'getEventId', 'events' => 'getEvents', + 'executionDate' => 'getExecutionDate', 'externalReason' => 'getExternalReason', 'id' => 'getId', 'paymentInstrument' => 'getPaymentInstrument', @@ -318,7 +335,8 @@ public function isNullableSetToNull(string $property): bool 'status' => 'getStatus', 'tracking' => 'getTracking', 'transactionRulesResult' => 'getTransactionRulesResult', - 'type' => 'getType' + 'type' => 'getType', + 'updatedAt' => 'getUpdatedAt' ]; /** @@ -372,6 +390,7 @@ public function getModelName() public const DIRECTION_OUTGOING = 'outgoing'; public const REASON_ACCOUNT_HIERARCHY_NOT_ACTIVE = 'accountHierarchyNotActive'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; + public const REASON_APPROVAL_EXPIRED = 'approvalExpired'; public const REASON_APPROVED = 'approved'; public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; @@ -538,6 +557,7 @@ public function getReasonAllowableValues() return [ self::REASON_ACCOUNT_HIERARCHY_NOT_ACTIVE, self::REASON_AMOUNT_LIMIT_EXCEEDED, + self::REASON_APPROVAL_EXPIRED, self::REASON_APPROVED, self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, @@ -710,12 +730,14 @@ public function __construct(?array $data = null) $this->setIfExists('category', $data ?? [], null); $this->setIfExists('categoryData', $data ?? [], null); $this->setIfExists('counterparty', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); $this->setIfExists('creationDate', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('directDebitInformation', $data ?? [], null); $this->setIfExists('direction', $data ?? [], null); $this->setIfExists('eventId', $data ?? [], null); $this->setIfExists('events', $data ?? [], null); + $this->setIfExists('executionDate', $data ?? [], null); $this->setIfExists('externalReason', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('paymentInstrument', $data ?? [], null); @@ -728,6 +750,7 @@ public function __construct(?array $data = null) $this->setIfExists('tracking', $data ?? [], null); $this->setIfExists('transactionRulesResult', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -967,11 +990,11 @@ public function setCategory($category) { $allowedValues = $this->getCategoryAllowableValues(); if (!in_array($category, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'category', must be one of '%s'", + "category: unexpected enum value '%s' - Supported values are [%s]", $category, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1028,10 +1051,35 @@ public function setCounterparty($counterparty) return $this; } + /** + * Gets createdAt + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime|null $createdAt The date and time when the transfer was created, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + /** * Gets creationDate * * @return \DateTime|null + * @deprecated since Transfer webhooks v3. "Use createdAt or updatedAt" */ public function getCreationDate() { @@ -1044,6 +1092,7 @@ public function getCreationDate() * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. * * @return self + * @deprecated since Transfer webhooks v3. "Use createdAt or updatedAt" */ public function setCreationDate($creationDate) { @@ -1121,11 +1170,11 @@ public function setDirection($direction) { $allowedValues = $this->getDirectionAllowableValues(); if (!in_array($direction, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'direction', must be one of '%s'", + "direction: unexpected enum value '%s' - Supported values are [%s]", $direction, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1182,6 +1231,30 @@ public function setEvents($events) return $this; } + /** + * Gets executionDate + * + * @return \Adyen\Model\TransferWebhooks\ExecutionDate|null + */ + public function getExecutionDate() + { + return $this->container['executionDate']; + } + + /** + * Sets executionDate + * + * @param \Adyen\Model\TransferWebhooks\ExecutionDate|null $executionDate executionDate + * + * @return self + */ + public function setExecutionDate($executionDate) + { + $this->container['executionDate'] = $executionDate; + + return $this; + } + /** * Gets externalReason * @@ -1275,11 +1348,11 @@ public function setReason($reason) { $allowedValues = $this->getReasonAllowableValues(); if (!in_array($reason, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'reason', must be one of '%s'", + "reason: unexpected enum value '%s' - Supported values are [%s]", $reason, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1397,7 +1470,7 @@ public function getStatus() /** * Sets status * - * @param string $status The result of the transfer. For example, **authorised**, **refused**, or **error**. + * @param string $status The result of the transfer. For example: - **received**: an outgoing transfer request is created. - **authorised**: the transfer request is authorized and the funds are reserved. - **booked**: the funds are deducted from your user's balance account. - **failed**: the transfer is rejected by the counterparty's bank. - **returned**: the transfer is returned by the counterparty's bank. * * @return self */ @@ -1405,11 +1478,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1487,11 +1560,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1499,6 +1572,30 @@ public function setType($type) return $this; } + + /** + * Gets updatedAt + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime|null $updatedAt The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setUpdatedAt($updatedAt) + { + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php index d792a0915..b02419b2b 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php @@ -15,7 +15,7 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** @@ -24,7 +24,7 @@ * The relevant data according to the transfer category. * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -53,6 +53,7 @@ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'relayedAuthorisationData' => '\Adyen\Model\TransferWebhooks\RelayedAuthorisationData', 'schemeTraceId' => 'string', 'schemeUniqueTransactionId' => 'string', + 'threeDSecure' => '\Adyen\Model\TransferWebhooks\ThreeDSecure', 'validationFacts' => '\Adyen\Model\TransferWebhooks\TransferNotificationValidationFact[]', 'paymentMerchantReference' => 'string', 'platformPaymentType' => 'string', @@ -77,6 +78,7 @@ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'relayedAuthorisationData' => null, 'schemeTraceId' => null, 'schemeUniqueTransactionId' => null, + 'threeDSecure' => null, 'validationFacts' => null, 'paymentMerchantReference' => null, 'platformPaymentType' => null, @@ -99,6 +101,7 @@ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'relayedAuthorisationData' => false, 'schemeTraceId' => false, 'schemeUniqueTransactionId' => false, + 'threeDSecure' => false, 'validationFacts' => false, 'paymentMerchantReference' => false, 'platformPaymentType' => false, @@ -201,6 +204,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'relayedAuthorisationData', 'schemeTraceId' => 'schemeTraceId', 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', + 'threeDSecure' => 'threeDSecure', 'validationFacts' => 'validationFacts', 'paymentMerchantReference' => 'paymentMerchantReference', 'platformPaymentType' => 'platformPaymentType', @@ -223,6 +227,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'setRelayedAuthorisationData', 'schemeTraceId' => 'setSchemeTraceId', 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', + 'threeDSecure' => 'setThreeDSecure', 'validationFacts' => 'setValidationFacts', 'paymentMerchantReference' => 'setPaymentMerchantReference', 'platformPaymentType' => 'setPlatformPaymentType', @@ -245,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'relayedAuthorisationData' => 'getRelayedAuthorisationData', 'schemeTraceId' => 'getSchemeTraceId', 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', + 'threeDSecure' => 'getThreeDSecure', 'validationFacts' => 'getValidationFacts', 'paymentMerchantReference' => 'getPaymentMerchantReference', 'platformPaymentType' => 'getPlatformPaymentType', @@ -317,6 +323,7 @@ public function __construct(?array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); + $this->setIfExists('threeDSecure', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); @@ -383,7 +390,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). * * @return self */ @@ -610,6 +617,30 @@ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) return $this; } + /** + * Gets threeDSecure + * + * @return \Adyen\Model\TransferWebhooks\ThreeDSecure|null + */ + public function getThreeDSecure() + { + return $this->container['threeDSecure']; + } + + /** + * Sets threeDSecure + * + * @param \Adyen\Model\TransferWebhooks\ThreeDSecure|null $threeDSecure threeDSecure + * + * @return self + */ + public function setThreeDSecure($threeDSecure) + { + $this->container['threeDSecure'] = $threeDSecure; + + return $this; + } + /** * Gets validationFacts * diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php b/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php index fe3ba169a..a7dc469ad 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php @@ -15,7 +15,7 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** @@ -24,7 +24,7 @@ * The latest tracking information of the transfer. * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferDataTracking implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -320,7 +320,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. + * @param string $status The status of the transfer. Possible values: - **pending**: the transfer is under internal review by Adyen. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index e70665519..4dc29e263 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferEvent Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -316,6 +316,7 @@ public function getModelName() public const REASON_ACCOUNT_HIERARCHY_NOT_ACTIVE = 'accountHierarchyNotActive'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; + public const REASON_APPROVAL_EXPIRED = 'approvalExpired'; public const REASON_APPROVED = 'approved'; public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; @@ -418,6 +419,7 @@ public function getReasonAllowableValues() return [ self::REASON_ACCOUNT_HIERARCHY_NOT_ACTIVE, self::REASON_AMOUNT_LIMIT_EXCEEDED, + self::REASON_APPROVAL_EXPIRED, self::REASON_APPROVED, self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, @@ -920,11 +922,11 @@ public function setReason($reason) { $allowedValues = $this->getReasonAllowableValues(); if (!in_array($reason, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'reason', must be one of '%s'", + "reason: unexpected enum value '%s' - Supported values are [%s]", $reason, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -954,11 +956,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1036,11 +1038,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.php b/src/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.php index 3ced22d9a..bfe468edf 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferEventEventsDataInner Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferEventEventsDataInner implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php b/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php index c88ed1113..4b1c01bd2 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php @@ -15,7 +15,7 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** @@ -24,7 +24,7 @@ * Additional information for the tracking event. * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferEventTrackingData implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -320,7 +320,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. + * @param string $status The status of the transfer. Possible values: - **pending**: the transfer is under internal review by Adyen. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php index a6b3f5c22..699d92c79 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferNotificationCounterParty Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferNotificationCounterParty implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php index f43b7fc7a..618040a48 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferNotificationMerchantData Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferNotificationMerchantData implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php index f943806fc..54e9198ce 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferNotificationRequest Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -416,11 +416,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php index 1e3913c13..f310cbb95 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferNotificationValidationFact Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferNotificationValidationFact implements ModelInterface, ArrayAccess, \JsonSerializable { diff --git a/src/Adyen/Model/TransferWebhooks/TransferReview.php b/src/Adyen/Model/TransferWebhooks/TransferReview.php index d0faf389b..59c676852 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferReview.php +++ b/src/Adyen/Model/TransferWebhooks/TransferReview.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * TransferReview Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -350,11 +350,11 @@ public function setScaOnApproval($scaOnApproval) { $allowedValues = $this->getScaOnApprovalAllowableValues(); if (!in_array($scaOnApproval, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'scaOnApproval', must be one of '%s'", + "scaOnApproval: unexpected enum value '%s' - Supported values are [%s]", $scaOnApproval, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php index addb9be3c..e8994dc6a 100644 --- a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * UKLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class UKLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -386,11 +386,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php index 6735a3434..011458757 100644 --- a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php @@ -15,14 +15,14 @@ namespace Adyen\Model\TransferWebhooks; -use \ArrayAccess; +use ArrayAccess; use Adyen\Model\TransferWebhooks\ObjectSerializer; /** * USLocalAccountIdentification Class Doc Comment * * @package Adyen - * @implements \ArrayAccess + * @implements ArrayAccess */ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -392,11 +392,11 @@ public function setAccountType($accountType) { $allowedValues = $this->getAccountTypeAllowableValues(); if (!in_array($accountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'accountType', must be one of '%s'", + "accountType: unexpected enum value '%s' - Supported values are [%s]", $accountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -450,11 +450,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); }