diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index 2ef327c28..d8456e950 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -446,7 +446,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index ba7373e31..a82948bbf 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -412,7 +412,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index 29f07c3fd..bccfbacd4 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -368,7 +368,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index e97f31c21..e477f881a 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -45,7 +45,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPITypes = [ 'accountHolderId' => 'string', - 'defaultCurrencyCode' => 'string', 'description' => 'string', 'metadata' => 'array', 'platformPaymentConfiguration' => '\Adyen\Model\BalancePlatform\PlatformPaymentConfiguration', @@ -63,7 +62,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPIFormats = [ 'accountHolderId' => null, - 'defaultCurrencyCode' => null, 'description' => null, 'metadata' => null, 'platformPaymentConfiguration' => null, @@ -79,7 +77,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPINullables = [ 'accountHolderId' => false, - 'defaultCurrencyCode' => false, 'description' => false, 'metadata' => false, 'platformPaymentConfiguration' => false, @@ -175,7 +172,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountHolderId' => 'accountHolderId', - 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', 'metadata' => 'metadata', 'platformPaymentConfiguration' => 'platformPaymentConfiguration', @@ -191,7 +187,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountHolderId' => 'setAccountHolderId', - 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', 'metadata' => 'setMetadata', 'platformPaymentConfiguration' => 'setPlatformPaymentConfiguration', @@ -207,7 +202,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountHolderId' => 'getAccountHolderId', - 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', 'metadata' => 'getMetadata', 'platformPaymentConfiguration' => 'getPlatformPaymentConfiguration', @@ -292,7 +286,6 @@ public function getStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountHolderId', $data ?? [], null); - $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('platformPaymentConfiguration', $data ?? [], null); @@ -379,33 +372,6 @@ public function setAccountHolderId($accountHolderId) return $this; } - /** - * Gets defaultCurrencyCode - * - * @return string|null - */ - public function getDefaultCurrencyCode() - { - return $this->container['defaultCurrencyCode']; - } - - /** - * Sets defaultCurrencyCode - * - * @param string|null $defaultCurrencyCode The default currency code of this balance account, in three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) format. The default value is **EUR**. - * - * @return self - */ - public function setDefaultCurrencyCode($defaultCurrencyCode) - { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } - $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; - - return $this; - } - /** * Gets description * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index df53ff3db..d808045d8 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -55,7 +55,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => 'string', 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -81,7 +80,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => null, 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -105,7 +103,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => false, 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -209,7 +206,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'transitNumber', 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -233,7 +229,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'setTransitNumber', 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -257,7 +252,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'getTransitNumber', 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -331,7 +325,6 @@ public function __construct(array $data = null) $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -395,9 +388,6 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -519,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -695,33 +685,6 @@ public function setIban($iban) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index 6fc6e0d3f..13cf1319c 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -55,7 +55,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => 'string', 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -81,7 +80,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => null, 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -105,7 +103,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => false, 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -209,7 +206,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'transitNumber', 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -233,7 +229,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'setTransitNumber', 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -257,7 +252,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'getTransitNumber', 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -331,7 +325,6 @@ public function __construct(array $data = null) $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -395,9 +388,6 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -519,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -695,33 +685,6 @@ public function setIban($iban) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/BalancePlatform/BankIdentification.php b/src/Adyen/Model/BalancePlatform/BankIdentification.php new file mode 100644 index 000000000..cff25d900 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/BankIdentification.php @@ -0,0 +1,485 @@ + + */ +class BankIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'country' => 'string', + 'identification' => 'string', + 'identificationType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'country' => null, + 'identification' => null, + 'identificationType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'country' => false, + 'identification' => false, + 'identificationType' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'country' => 'country', + 'identification' => 'identification', + 'identificationType' => 'identificationType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'country' => 'setCountry', + 'identification' => 'setIdentification', + 'identificationType' => 'setIdentificationType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'country' => 'getCountry', + 'identification' => 'getIdentification', + 'identificationType' => 'getIdentificationType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const IDENTIFICATION_TYPE_IBAN = 'iban'; + public const IDENTIFICATION_TYPE_ROUTING_NUMBER = 'routingNumber'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIdentificationTypeAllowableValues() + { + return [ + self::IDENTIFICATION_TYPE_IBAN, + self::IDENTIFICATION_TYPE_ROUTING_NUMBER, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('identification', $data ?? [], null); + $this->setIfExists('identificationType', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getIdentificationTypeAllowableValues(); + if (!is_null($this->container['identificationType']) && !in_array($this->container['identificationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'identificationType', must be one of '%s'", + $this->container['identificationType'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets identification + * + * @return string|null + */ + public function getIdentification() + { + return $this->container['identification']; + } + + /** + * Sets identification + * + * @param string|null $identification identification + * + * @return self + */ + public function setIdentification($identification) + { + if (is_null($identification)) { + throw new \InvalidArgumentException('non-nullable identification cannot be null'); + } + $this->container['identification'] = $identification; + + return $this; + } + + /** + * Gets identificationType + * + * @return string|null + */ + public function getIdentificationType() + { + return $this->container['identificationType']; + } + + /** + * Sets identificationType + * + * @param string|null $identificationType identificationType + * + * @return self + */ + public function setIdentificationType($identificationType) + { + if (is_null($identificationType)) { + throw new \InvalidArgumentException('non-nullable identificationType cannot be null'); + } + $allowedValues = $this->getIdentificationTypeAllowableValues(); + if (!in_array($identificationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'identificationType', must be one of '%s'", + $identificationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['identificationType'] = $identificationType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Transfers/JSONObject.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php similarity index 80% rename from src/Adyen/Model/Transfers/JSONObject.php rename to src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php index 5efabb113..fbf6f1f19 100644 --- a/src/Adyen/Model/Transfers/JSONObject.php +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -1,9 +1,9 @@ */ -class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable +class CounterpartyBankRestriction implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONObject'; + protected static $openAPIModelName = 'CounterpartyBankRestriction'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,8 +44,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\Transfers\JSONPath[]', - 'rootPath' => '\Adyen\Model\Transfers\JSONPath' + 'operation' => 'string', + 'value' => '\Adyen\Model\BalancePlatform\BankIdentification[]' ]; /** @@ -56,8 +56,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'paths' => null, - 'rootPath' => null + 'operation' => null, + 'value' => null ]; /** @@ -66,8 +66,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'paths' => false, - 'rootPath' => false + 'operation' => false, + 'value' => false ]; /** @@ -156,8 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'paths' => 'paths', - 'rootPath' => 'rootPath' + 'operation' => 'operation', + 'value' => 'value' ]; /** @@ -166,8 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'paths' => 'setPaths', - 'rootPath' => 'setRootPath' + 'operation' => 'setOperation', + 'value' => 'setValue' ]; /** @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'paths' => 'getPaths', - 'rootPath' => 'getRootPath' + 'operation' => 'getOperation', + 'value' => 'getValue' ]; /** @@ -237,8 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('paths', $data ?? [], null); - $this->setIfExists('rootPath', $data ?? [], null); + $this->setIfExists('operation', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -268,6 +268,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['operation'] === null) { + $invalidProperties[] = "'operation' can't be null"; + } return $invalidProperties; } @@ -284,55 +287,55 @@ public function valid() /** - * Gets paths + * Gets operation * - * @return \Adyen\Model\Transfers\JSONPath[]|null + * @return string */ - public function getPaths() + public function getOperation() { - return $this->container['paths']; + return $this->container['operation']; } /** - * Sets paths + * Sets operation * - * @param \Adyen\Model\Transfers\JSONPath[]|null $paths paths + * @param string $operation Defines how the condition must be evaluated. * * @return self */ - public function setPaths($paths) + public function setOperation($operation) { - if (is_null($paths)) { - throw new \InvalidArgumentException('non-nullable paths cannot be null'); + if (is_null($operation)) { + throw new \InvalidArgumentException('non-nullable operation cannot be null'); } - $this->container['paths'] = $paths; + $this->container['operation'] = $operation; return $this; } /** - * Gets rootPath + * Gets value * - * @return \Adyen\Model\Transfers\JSONPath|null + * @return \Adyen\Model\BalancePlatform\BankIdentification[]|null */ - public function getRootPath() + public function getValue() { - return $this->container['rootPath']; + return $this->container['value']; } /** - * Sets rootPath + * Sets value * - * @param \Adyen\Model\Transfers\JSONPath|null $rootPath rootPath + * @param \Adyen\Model\BalancePlatform\BankIdentification[]|null $value List of counterparty Bank Institutions and the operation. * * @return self */ - public function setRootPath($rootPath) + public function setValue($value) { - if (is_null($rootPath)) { - throw new \InvalidArgumentException('non-nullable rootPath cannot be null'); + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['rootPath'] = $rootPath; + $this->container['value'] = $value; return $this; } diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 9a0404822..805603649 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -285,7 +285,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -293,16 +292,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -331,7 +333,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -349,16 +350,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/Transfers/JSONPath.php b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php similarity index 74% rename from src/Adyen/Model/Transfers/JSONPath.php rename to src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php index e6817687e..ea3df25eb 100644 --- a/src/Adyen/Model/Transfers/JSONPath.php +++ b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php @@ -1,9 +1,9 @@ */ -class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable +class GetTaxFormResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONPath'; + protected static $openAPIModelName = 'GetTaxFormResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,7 +44,8 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'content' => 'string[]' + 'content' => 'string', + 'contentType' => 'string' ]; /** @@ -55,7 +56,8 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'content' => null + 'content' => 'byte', + 'contentType' => null ]; /** @@ -64,7 +66,8 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'content' => false + 'content' => false, + 'contentType' => false ]; /** @@ -153,7 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'content' => 'content' + 'content' => 'content', + 'contentType' => 'contentType' ]; /** @@ -162,7 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'content' => 'setContent' + 'content' => 'setContent', + 'contentType' => 'setContentType' ]; /** @@ -171,7 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'content' => 'getContent' + 'content' => 'getContent', + 'contentType' => 'getContentType' ]; /** @@ -215,7 +221,19 @@ public function getModelName() return self::$openAPIModelName; } + public const CONTENT_TYPE_APPLICATION_PDF = 'application/pdf'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getContentTypeAllowableValues() + { + return [ + self::CONTENT_TYPE_APPLICATION_PDF, + ]; + } /** * Associative array for storing property values * @@ -232,6 +250,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('contentType', $data ?? [], null); } /** @@ -261,6 +280,18 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + $allowedValues = $this->getContentTypeAllowableValues(); + if (!is_null($this->container['contentType']) && !in_array($this->container['contentType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'contentType', must be one of '%s'", + $this->container['contentType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -279,7 +310,7 @@ public function valid() /** * Gets content * - * @return string[]|null + * @return string */ public function getContent() { @@ -289,7 +320,7 @@ public function getContent() /** * Sets content * - * @param string[]|null $content content + * @param string $content The content of the tax form in Base64 format. * * @return self */ @@ -302,6 +333,43 @@ public function setContent($content) return $this; } + + /** + * Gets contentType + * + * @return string|null + */ + public function getContentType() + { + return $this->container['contentType']; + } + + /** + * Sets contentType + * + * @param string|null $contentType The content type of the tax form. Possible values: * **application/pdf** + * + * @return self + */ + public function setContentType($contentType) + { + if (is_null($contentType)) { + throw new \InvalidArgumentException('non-nullable contentType cannot be null'); + } + $allowedValues = $this->getContentTypeAllowableValues(); + if (!in_array($contentType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'contentType', must be one of '%s'", + $contentType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['contentType'] = $contentType; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 561d32201..262c9de65 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * @param string $accountNumber The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index 0df909d2b..ff1b67d47 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -45,8 +45,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'accountSuffix' => 'string', - 'bankCode' => 'string', 'type' => 'string' ]; @@ -59,8 +57,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'accountSuffix' => null, - 'bankCode' => null, 'type' => null ]; @@ -71,8 +67,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'accountSuffix' => false, - 'bankCode' => false, 'type' => false ]; @@ -163,8 +157,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'accountSuffix' => 'accountSuffix', - 'bankCode' => 'bankCode', 'type' => 'type' ]; @@ -175,8 +167,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'accountSuffix' => 'setAccountSuffix', - 'bankCode' => 'setBankCode', 'type' => 'setType' ]; @@ -187,8 +177,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'accountSuffix' => 'getAccountSuffix', - 'bankCode' => 'getBankCode', 'type' => 'getType' ]; @@ -262,8 +250,6 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'nzLocal'); } @@ -297,12 +283,6 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -343,7 +323,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 7-digit bank account number, without separators or whitespace. + * @param string $accountNumber The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * * @return self */ @@ -357,60 +337,6 @@ public function setAccountNumber($accountNumber) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - - /** - * Gets bankCode - * - * @return string - */ - public function getBankCode() - { - return $this->container['bankCode']; - } - - /** - * Sets bankCode - * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * - * @return self - */ - public function setBankCode($bankCode) - { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } - $this->container['bankCode'] = $bankCode; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index 83d3719c2..00fd465f4 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -46,6 +46,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'description' => 'string', 'issuingCountryCode' => 'string', + 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string', 'type' => 'string' ]; @@ -60,6 +61,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'description' => null, 'issuingCountryCode' => null, + 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'description' => false, 'issuingCountryCode' => false, + 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false, 'type' => false ]; @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'description' => 'description', 'issuingCountryCode' => 'issuingCountryCode', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType', 'type' => 'type' ]; @@ -176,6 +180,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'description' => 'setDescription', 'issuingCountryCode' => 'setIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType', 'type' => 'setType' ]; @@ -188,6 +193,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'description' => 'getDescription', 'issuingCountryCode' => 'getIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType', 'type' => 'getType' ]; @@ -277,6 +283,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); } @@ -398,6 +405,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + /** * Gets paymentInstrumentType * diff --git a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php index d5f3759b0..0ea45c5c8 100644 --- a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php @@ -296,7 +296,7 @@ public function getSalesDayClosingTime() /** * Sets salesDayClosingTime * - * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * * @return self */ @@ -323,7 +323,7 @@ public function getSettlementDelayDays() /** * Sets settlementDelayDays * - * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 78b0ea9f3..9a5e1b56e 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -291,7 +291,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -299,16 +298,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -337,7 +339,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -355,16 +356,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 11cad0321..04a403188 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -46,6 +46,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'activeNetworkTokens' => '\Adyen\Model\BalancePlatform\ActiveNetworkTokensRestriction', 'brandVariants' => '\Adyen\Model\BalancePlatform\BrandVariantsRestriction', + 'counterpartyBank' => '\Adyen\Model\BalancePlatform\CounterpartyBankRestriction', 'countries' => '\Adyen\Model\BalancePlatform\CountriesRestriction', 'dayOfWeek' => '\Adyen\Model\BalancePlatform\DayOfWeekRestriction', 'differentCurrencies' => '\Adyen\Model\BalancePlatform\DifferentCurrenciesRestriction', @@ -70,6 +71,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'activeNetworkTokens' => null, 'brandVariants' => null, + 'counterpartyBank' => null, 'countries' => null, 'dayOfWeek' => null, 'differentCurrencies' => null, @@ -92,6 +94,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPINullables = [ 'activeNetworkTokens' => false, 'brandVariants' => false, + 'counterpartyBank' => false, 'countries' => false, 'dayOfWeek' => false, 'differentCurrencies' => false, @@ -194,6 +197,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'activeNetworkTokens' => 'activeNetworkTokens', 'brandVariants' => 'brandVariants', + 'counterpartyBank' => 'counterpartyBank', 'countries' => 'countries', 'dayOfWeek' => 'dayOfWeek', 'differentCurrencies' => 'differentCurrencies', @@ -216,6 +220,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'activeNetworkTokens' => 'setActiveNetworkTokens', 'brandVariants' => 'setBrandVariants', + 'counterpartyBank' => 'setCounterpartyBank', 'countries' => 'setCountries', 'dayOfWeek' => 'setDayOfWeek', 'differentCurrencies' => 'setDifferentCurrencies', @@ -238,6 +243,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'activeNetworkTokens' => 'getActiveNetworkTokens', 'brandVariants' => 'getBrandVariants', + 'counterpartyBank' => 'getCounterpartyBank', 'countries' => 'getCountries', 'dayOfWeek' => 'getDayOfWeek', 'differentCurrencies' => 'getDifferentCurrencies', @@ -311,6 +317,7 @@ public function __construct(array $data = null) { $this->setIfExists('activeNetworkTokens', $data ?? [], null); $this->setIfExists('brandVariants', $data ?? [], null); + $this->setIfExists('counterpartyBank', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('dayOfWeek', $data ?? [], null); $this->setIfExists('differentCurrencies', $data ?? [], null); @@ -421,6 +428,33 @@ public function setBrandVariants($brandVariants) return $this; } + /** + * Gets counterpartyBank + * + * @return \Adyen\Model\BalancePlatform\CounterpartyBankRestriction|null + */ + public function getCounterpartyBank() + { + return $this->container['counterpartyBank']; + } + + /** + * Sets counterpartyBank + * + * @param \Adyen\Model\BalancePlatform\CounterpartyBankRestriction|null $counterpartyBank counterpartyBank + * + * @return self + */ + public function setCounterpartyBank($counterpartyBank) + { + if (is_null($counterpartyBank)) { + throw new \InvalidArgumentException('non-nullable counterpartyBank cannot be null'); + } + $this->container['counterpartyBank'] = $counterpartyBank; + + return $this; + } + /** * Gets countries * diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index 0d7c123c7..e72c147ca 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -44,7 +44,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'balancePlatform' => 'string', 'category' => 'string', 'country' => 'string', 'currency' => 'string', @@ -60,7 +59,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'balancePlatform' => null, 'category' => null, 'country' => null, 'currency' => null, @@ -74,7 +72,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'balancePlatform' => false, 'category' => false, 'country' => false, 'currency' => false, @@ -168,7 +165,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'balancePlatform' => 'balancePlatform', 'category' => 'category', 'country' => 'country', 'currency' => 'currency', @@ -182,7 +178,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'balancePlatform' => 'setBalancePlatform', 'category' => 'setCategory', 'country' => 'setCountry', 'currency' => 'setCurrency', @@ -196,7 +191,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'balancePlatform' => 'getBalancePlatform', 'category' => 'getCategory', 'country' => 'getCountry', 'currency' => 'getCurrency', @@ -252,6 +246,7 @@ public function getModelName() public const CATEGORY_ISSUED_CARD = 'issuedCard'; public const CATEGORY_MIGRATION = 'migration'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; + public const CATEGORY_UPGRADE = 'upgrade'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_FAST = 'fast'; public const PRIORITY_INSTANT = 'instant'; @@ -274,6 +269,7 @@ public function getCategoryAllowableValues() self::CATEGORY_ISSUED_CARD, self::CATEGORY_MIGRATION, self::CATEGORY_PLATFORM_PAYMENT, + self::CATEGORY_UPGRADE, ]; } /** @@ -307,7 +303,6 @@ public function getPriorityAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('balancePlatform', $data ?? [], null); $this->setIfExists('category', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); @@ -375,33 +370,6 @@ public function valid() } - /** - * Gets balancePlatform - * - * @return string|null - */ - public function getBalancePlatform() - { - return $this->container['balancePlatform']; - } - - /** - * Sets balancePlatform - * - * @param string|null $balancePlatform The unique identifier assigned to the balance platform associated with the account holder. - * - * @return self - */ - public function setBalancePlatform($balancePlatform) - { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } - $this->container['balancePlatform'] = $balancePlatform; - - return $this; - } - /** * Gets category * diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php index 6039b0908..74f39f20d 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php @@ -52,6 +52,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => 'int', 'bankAccountIdentificationTypes' => 'string[]', 'issuingCountryCode' => 'string', + 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string' ]; @@ -70,6 +71,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => 'int64', 'bankAccountIdentificationTypes' => null, 'issuingCountryCode' => null, + 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null ]; @@ -86,6 +88,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => false, 'bankAccountIdentificationTypes' => false, 'issuingCountryCode' => false, + 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false ]; @@ -182,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'min', 'bankAccountIdentificationTypes' => 'bankAccountIdentificationTypes', 'issuingCountryCode' => 'issuingCountryCode', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType' ]; @@ -198,6 +202,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'setMin', 'bankAccountIdentificationTypes' => 'setBankAccountIdentificationTypes', 'issuingCountryCode' => 'setIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType' ]; @@ -214,6 +219,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'getMin', 'bankAccountIdentificationTypes' => 'getBankAccountIdentificationTypes', 'issuingCountryCode' => 'getIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType' ]; @@ -280,6 +286,7 @@ public function __construct(array $data = null) $this->setIfExists('min', $data ?? [], null); $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); } @@ -519,6 +526,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + /** * Gets paymentInstrumentType * diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index eaedc36f7..f728eba4b 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -291,7 +291,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -299,16 +298,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -337,7 +339,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -355,16 +356,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 2f4cdc052..52c30a926 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -47,7 +47,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => 'string', 'directoryServerId' => 'string', 'fromSDKVersion' => 'string', - 'publicKey' => 'string' + 'publicKey' => 'string', + 'rootCertificates' => 'string' ]; /** @@ -61,7 +62,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => null, 'directoryServerId' => null, 'fromSDKVersion' => null, - 'publicKey' => 'byte' + 'publicKey' => 'byte', + 'rootCertificates' => null ]; /** @@ -73,7 +75,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => false, 'directoryServerId' => false, 'fromSDKVersion' => false, - 'publicKey' => false + 'publicKey' => false, + 'rootCertificates' => false ]; /** @@ -165,7 +168,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'brand', 'directoryServerId' => 'directoryServerId', 'fromSDKVersion' => 'fromSDKVersion', - 'publicKey' => 'publicKey' + 'publicKey' => 'publicKey', + 'rootCertificates' => 'rootCertificates' ]; /** @@ -177,7 +181,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'setBrand', 'directoryServerId' => 'setDirectoryServerId', 'fromSDKVersion' => 'setFromSDKVersion', - 'publicKey' => 'setPublicKey' + 'publicKey' => 'setPublicKey', + 'rootCertificates' => 'setRootCertificates' ]; /** @@ -189,7 +194,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'getBrand', 'directoryServerId' => 'getDirectoryServerId', 'fromSDKVersion' => 'getFromSDKVersion', - 'publicKey' => 'getPublicKey' + 'publicKey' => 'getPublicKey', + 'rootCertificates' => 'getRootCertificates' ]; /** @@ -253,6 +259,7 @@ public function __construct(array $data = null) $this->setIfExists('directoryServerId', $data ?? [], null); $this->setIfExists('fromSDKVersion', $data ?? [], null); $this->setIfExists('publicKey', $data ?? [], null); + $this->setIfExists('rootCertificates', $data ?? [], null); } /** @@ -404,6 +411,33 @@ public function setPublicKey($publicKey) return $this; } + + /** + * Gets rootCertificates + * + * @return string|null + */ + public function getRootCertificates() + { + return $this->container['rootCertificates']; + } + + /** + * Sets rootCertificates + * + * @param string|null $rootCertificates Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + * + * @return self + */ + public function setRootCertificates($rootCertificates) + { + if (is_null($rootCertificates)) { + throw new \InvalidArgumentException('non-nullable rootCertificates cannot be null'); + } + $this->container['rootCertificates'] = $rootCertificates; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index 29a586afd..a7bf98bdd 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php index 78b86ecf1..f2d73ebb5 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php @@ -52,7 +52,6 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria 'requested' => 'bool', 'requestedLevel' => 'string', 'requestedSettings' => '\Adyen\Model\ConfigurationWebhooks\CapabilitySettings', - 'transferInstruments' => '\Adyen\Model\ConfigurationWebhooks\AccountSupportingEntityCapability[]', 'verificationStatus' => 'string' ]; @@ -72,7 +71,6 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria 'requested' => null, 'requestedLevel' => null, 'requestedSettings' => null, - 'transferInstruments' => null, 'verificationStatus' => null ]; @@ -90,7 +88,6 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria 'requested' => false, 'requestedLevel' => false, 'requestedSettings' => false, - 'transferInstruments' => false, 'verificationStatus' => false ]; @@ -188,7 +185,6 @@ public function isNullableSetToNull(string $property): bool 'requested' => 'requested', 'requestedLevel' => 'requestedLevel', 'requestedSettings' => 'requestedSettings', - 'transferInstruments' => 'transferInstruments', 'verificationStatus' => 'verificationStatus' ]; @@ -206,7 +202,6 @@ public function isNullableSetToNull(string $property): bool 'requested' => 'setRequested', 'requestedLevel' => 'setRequestedLevel', 'requestedSettings' => 'setRequestedSettings', - 'transferInstruments' => 'setTransferInstruments', 'verificationStatus' => 'setVerificationStatus' ]; @@ -224,7 +219,6 @@ public function isNullableSetToNull(string $property): bool 'requested' => 'getRequested', 'requestedLevel' => 'getRequestedLevel', 'requestedSettings' => 'getRequestedSettings', - 'transferInstruments' => 'getTransferInstruments', 'verificationStatus' => 'getVerificationStatus' ]; @@ -347,7 +341,6 @@ public function __construct(array $data = null) $this->setIfExists('requested', $data ?? [], null); $this->setIfExists('requestedLevel', $data ?? [], null); $this->setIfExists('requestedSettings', $data ?? [], null); - $this->setIfExists('transferInstruments', $data ?? [], null); $this->setIfExists('verificationStatus', $data ?? [], null); } @@ -656,33 +649,6 @@ public function setRequestedSettings($requestedSettings) return $this; } - /** - * Gets transferInstruments - * - * @return \Adyen\Model\ConfigurationWebhooks\AccountSupportingEntityCapability[]|null - */ - public function getTransferInstruments() - { - return $this->container['transferInstruments']; - } - - /** - * Sets transferInstruments - * - * @param \Adyen\Model\ConfigurationWebhooks\AccountSupportingEntityCapability[]|null $transferInstruments Contains the status of the transfer instruments associated with this capability. - * - * @return self - */ - public function setTransferInstruments($transferInstruments) - { - if (is_null($transferInstruments)) { - throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); - } - $this->container['transferInstruments'] = $transferInstruments; - - return $this; - } - /** * Gets verificationStatus * diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php deleted file mode 100644 index 2d02ae5df..000000000 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php +++ /dev/null @@ -1,699 +0,0 @@ - - */ -class AccountSupportingEntityCapability implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'AccountSupportingEntityCapability'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'allowed' => 'bool', - 'allowedLevel' => 'string', - 'enabled' => 'bool', - 'id' => 'string', - 'requested' => 'bool', - 'requestedLevel' => 'string', - 'verificationStatus' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'allowed' => null, - 'allowedLevel' => null, - 'enabled' => null, - 'id' => null, - 'requested' => null, - 'requestedLevel' => null, - 'verificationStatus' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static $openAPINullables = [ - 'allowed' => false, - 'allowedLevel' => false, - 'enabled' => false, - 'id' => false, - 'requested' => false, - 'requestedLevel' => false, - 'verificationStatus' => 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 = [ - 'allowed' => 'allowed', - 'allowedLevel' => 'allowedLevel', - 'enabled' => 'enabled', - 'id' => 'id', - 'requested' => 'requested', - 'requestedLevel' => 'requestedLevel', - 'verificationStatus' => 'verificationStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'allowed' => 'setAllowed', - 'allowedLevel' => 'setAllowedLevel', - 'enabled' => 'setEnabled', - 'id' => 'setId', - 'requested' => 'setRequested', - 'requestedLevel' => 'setRequestedLevel', - 'verificationStatus' => 'setVerificationStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'allowed' => 'getAllowed', - 'allowedLevel' => 'getAllowedLevel', - 'enabled' => 'getEnabled', - 'id' => 'getId', - 'requested' => 'getRequested', - 'requestedLevel' => 'getRequestedLevel', - 'verificationStatus' => 'getVerificationStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const ALLOWED_LEVEL_HIGH = 'high'; - public const ALLOWED_LEVEL_LOW = 'low'; - public const ALLOWED_LEVEL_MEDIUM = 'medium'; - public const ALLOWED_LEVEL_NOT_APPLICABLE = 'notApplicable'; - public const REQUESTED_LEVEL_HIGH = 'high'; - public const REQUESTED_LEVEL_LOW = 'low'; - public const REQUESTED_LEVEL_MEDIUM = 'medium'; - public const REQUESTED_LEVEL_NOT_APPLICABLE = 'notApplicable'; - public const VERIFICATION_STATUS_INVALID = 'invalid'; - public const VERIFICATION_STATUS_PENDING = 'pending'; - public const VERIFICATION_STATUS_REJECTED = 'rejected'; - public const VERIFICATION_STATUS_VALID = 'valid'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getAllowedLevelAllowableValues() - { - return [ - self::ALLOWED_LEVEL_HIGH, - self::ALLOWED_LEVEL_LOW, - self::ALLOWED_LEVEL_MEDIUM, - self::ALLOWED_LEVEL_NOT_APPLICABLE, - ]; - } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getRequestedLevelAllowableValues() - { - return [ - self::REQUESTED_LEVEL_HIGH, - self::REQUESTED_LEVEL_LOW, - self::REQUESTED_LEVEL_MEDIUM, - self::REQUESTED_LEVEL_NOT_APPLICABLE, - ]; - } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getVerificationStatusAllowableValues() - { - return [ - self::VERIFICATION_STATUS_INVALID, - self::VERIFICATION_STATUS_PENDING, - self::VERIFICATION_STATUS_REJECTED, - self::VERIFICATION_STATUS_VALID, - ]; - } - /** - * 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('allowed', $data ?? [], null); - $this->setIfExists('allowedLevel', $data ?? [], null); - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('requested', $data ?? [], null); - $this->setIfExists('requestedLevel', $data ?? [], null); - $this->setIfExists('verificationStatus', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getAllowedLevelAllowableValues(); - if (!is_null($this->container['allowedLevel']) && !in_array($this->container['allowedLevel'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'allowedLevel', must be one of '%s'", - $this->container['allowedLevel'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getRequestedLevelAllowableValues(); - if (!is_null($this->container['requestedLevel']) && !in_array($this->container['requestedLevel'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'requestedLevel', must be one of '%s'", - $this->container['requestedLevel'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getVerificationStatusAllowableValues(); - if (!is_null($this->container['verificationStatus']) && !in_array($this->container['verificationStatus'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'verificationStatus', must be one of '%s'", - $this->container['verificationStatus'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets allowed - * - * @return bool|null - */ - public function getAllowed() - { - return $this->container['allowed']; - } - - /** - * Sets allowed - * - * @param bool|null $allowed Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - * - * @return self - */ - public function setAllowed($allowed) - { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } - $this->container['allowed'] = $allowed; - - return $this; - } - - /** - * Gets allowedLevel - * - * @return string|null - */ - public function getAllowedLevel() - { - return $this->container['allowedLevel']; - } - - /** - * Sets allowedLevel - * - * @param string|null $allowedLevel The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - * - * @return self - */ - public function setAllowedLevel($allowedLevel) - { - if (is_null($allowedLevel)) { - throw new \InvalidArgumentException('non-nullable allowedLevel cannot be null'); - } - $allowedValues = $this->getAllowedLevelAllowableValues(); - if (!in_array($allowedLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'allowedLevel', must be one of '%s'", - $allowedLevel, - implode("', '", $allowedValues) - ) - ); - } - $this->container['allowedLevel'] = $allowedLevel; - - return $this; - } - - /** - * Gets enabled - * - * @return bool|null - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool|null $enabled Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The ID of the supporting entity. - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets requested - * - * @return bool|null - */ - public function getRequested() - { - return $this->container['requested']; - } - - /** - * Sets requested - * - * @param bool|null $requested Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - * - * @return self - */ - public function setRequested($requested) - { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } - $this->container['requested'] = $requested; - - return $this; - } - - /** - * Gets requestedLevel - * - * @return string|null - */ - public function getRequestedLevel() - { - return $this->container['requestedLevel']; - } - - /** - * Sets requestedLevel - * - * @param string|null $requestedLevel The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - * - * @return self - */ - public function setRequestedLevel($requestedLevel) - { - if (is_null($requestedLevel)) { - throw new \InvalidArgumentException('non-nullable requestedLevel cannot be null'); - } - $allowedValues = $this->getRequestedLevelAllowableValues(); - if (!in_array($requestedLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'requestedLevel', must be one of '%s'", - $requestedLevel, - implode("', '", $allowedValues) - ) - ); - } - $this->container['requestedLevel'] = $requestedLevel; - - return $this; - } - - /** - * Gets verificationStatus - * - * @return string|null - */ - public function getVerificationStatus() - { - return $this->container['verificationStatus']; - } - - /** - * Sets verificationStatus - * - * @param string|null $verificationStatus The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - * - * @return self - */ - public function setVerificationStatus($verificationStatus) - { - if (is_null($verificationStatus)) { - throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); - } - $allowedValues = $this->getVerificationStatusAllowableValues(); - if (!in_array($verificationStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'verificationStatus', must be one of '%s'", - $verificationStatus, - implode("', '", $allowedValues) - ) - ); - } - $this->container['verificationStatus'] = $verificationStatus; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php index b20fa504e..bac903d22 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php @@ -453,7 +453,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php index 095bf5377..af80da79b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php @@ -296,7 +296,7 @@ public function getSalesDayClosingTime() /** * Sets salesDayClosingTime * - * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * * @return self */ @@ -323,7 +323,7 @@ public function getSettlementDelayDays() /** * Sets settlementDelayDays * - * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index d9a2be248..29af80cc9 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -277,16 +277,19 @@ public function getModelName() public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -303,16 +306,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php index ef4ded0f7..94f105aaf 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php @@ -492,7 +492,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of Terms of Service. + * @param string|null $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 159ded8ec..b48c4c4dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -534,7 +534,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for this supporting entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems The verification errors related to capabilities for this supporting entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php index 39906621d..8312bd6c0 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php @@ -44,6 +44,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openAPITypes = [ + 'additionalSalesChannels' => 'string[]', 'language' => 'string' ]; @@ -55,6 +56,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $openAPIFormats = [ + 'additionalSalesChannels' => null, 'language' => null ]; @@ -64,6 +66,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @var boolean[] */ protected static $openAPINullables = [ + 'additionalSalesChannels' => false, 'language' => false ]; @@ -153,6 +156,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'additionalSalesChannels' => 'additionalSalesChannels', 'language' => 'language' ]; @@ -162,6 +166,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'additionalSalesChannels' => 'setAdditionalSalesChannels', 'language' => 'setLanguage' ]; @@ -171,6 +176,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'additionalSalesChannels' => 'getAdditionalSalesChannels', 'language' => 'getLanguage' ]; @@ -215,7 +221,25 @@ public function getModelName() return self::$openAPIModelName; } + public const ADDITIONAL_SALES_CHANNELS_E_COMMERCE = 'eCommerce'; + public const ADDITIONAL_SALES_CHANNELS_ECOM_MOTO = 'ecomMoto'; + public const ADDITIONAL_SALES_CHANNELS_POS = 'pos'; + public const ADDITIONAL_SALES_CHANNELS_POS_MOTO = 'posMoto'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdditionalSalesChannelsAllowableValues() + { + return [ + self::ADDITIONAL_SALES_CHANNELS_E_COMMERCE, + self::ADDITIONAL_SALES_CHANNELS_ECOM_MOTO, + self::ADDITIONAL_SALES_CHANNELS_POS, + self::ADDITIONAL_SALES_CHANNELS_POS_MOTO, + ]; + } /** * Associative array for storing property values * @@ -231,6 +255,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('additionalSalesChannels', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); } @@ -276,6 +301,42 @@ public function valid() } + /** + * Gets additionalSalesChannels + * + * @return string[]|null + */ + public function getAdditionalSalesChannels() + { + return $this->container['additionalSalesChannels']; + } + + /** + * Sets additionalSalesChannels + * + * @param string[]|null $additionalSalesChannels An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/create-stores/) and [add payment methods](https://docs.adyen.com/marketplaces-and-platforms/payment-methods/) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * + * @return self + */ + public function setAdditionalSalesChannels($additionalSalesChannels) + { + if (is_null($additionalSalesChannels)) { + throw new \InvalidArgumentException('non-nullable additionalSalesChannels cannot be null'); + } + $allowedValues = $this->getAdditionalSalesChannelsAllowableValues(); + if (array_diff($additionalSalesChannels, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'additionalSalesChannels', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['additionalSalesChannels'] = $additionalSalesChannels; + + return $this; + } + /** * Gets language * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index 3a12d63f3..e9900e12e 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -362,7 +362,7 @@ public function getType() /** * Sets type * - * @param string $type The type of Terms of Service. + * @param string $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index 61183af4b..d7093db76 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -458,7 +458,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of Terms of Service. + * @param string|null $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index 57e32882a..d668b0830 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * @param string $accountNumber The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index b9c79e7af..a236975f3 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -251,7 +251,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PROOF_OF_NATIONAL_ID_NUMBER = 'proofOfNationalIdNumber'; + public const TYPE_NATIONAL_ID_NUMBER = 'nationalIdNumber'; /** * Gets allowable values of the enum @@ -261,7 +261,7 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_PROOF_OF_NATIONAL_ID_NUMBER, + self::TYPE_NATIONAL_ID_NUMBER, ]; } /** @@ -373,7 +373,6 @@ public function setCardNumber($cardNumber) * Gets expiryDate * * @return string|null - * @deprecated */ public function getExpiryDate() { @@ -386,7 +385,6 @@ public function getExpiryDate() * @param string|null $expiryDate The expiry date of the document, in YYYY-MM-DD format. * * @return self - * @deprecated */ public function setExpiryDate($expiryDate) { diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 6e5fd33a6..b7bdf5833 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -55,6 +55,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'transferInstruments' => '\Adyen\Model\LegalEntityManagement\TransferInstrumentReference[]', + 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]' ]; @@ -78,6 +79,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => null, 'soleProprietorship' => null, 'transferInstruments' => null, + 'trust' => null, 'type' => null, 'verificationDeadlines' => null ]; @@ -99,6 +101,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => false, 'soleProprietorship' => false, 'transferInstruments' => false, + 'trust' => false, 'type' => false, 'verificationDeadlines' => false ]; @@ -200,6 +203,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', 'transferInstruments' => 'transferInstruments', + 'trust' => 'trust', 'type' => 'type', 'verificationDeadlines' => 'verificationDeadlines' ]; @@ -221,6 +225,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', 'transferInstruments' => 'setTransferInstruments', + 'trust' => 'setTrust', 'type' => 'setType', 'verificationDeadlines' => 'setVerificationDeadlines' ]; @@ -242,6 +247,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', 'transferInstruments' => 'getTransferInstruments', + 'trust' => 'getTrust', 'type' => 'getType', 'verificationDeadlines' => 'getVerificationDeadlines' ]; @@ -334,6 +340,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('soleProprietorship', $data ?? [], null); $this->setIfExists('transferInstruments', $data ?? [], null); + $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('verificationDeadlines', $data ?? [], null); } @@ -596,7 +603,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for the legal entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of verification errors related to capabilities for the legal entity. * * @return self */ @@ -691,6 +698,33 @@ public function setTransferInstruments($transferInstruments) return $this; } + /** + * Gets trust + * + * @return \Adyen\Model\LegalEntityManagement\Trust|null + */ + public function getTrust() + { + return $this->container['trust']; + } + + /** + * Sets trust + * + * @param \Adyen\Model\LegalEntityManagement\Trust|null $trust trust + * + * @return self + */ + public function setTrust($trust) + { + if (is_null($trust)) { + throw new \InvalidArgumentException('non-nullable trust cannot be null'); + } + $this->container['trust'] = $trust; + + return $this; + } + /** * Gets type * @@ -704,7 +738,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. + * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 012921e27..1c9031d18 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -49,6 +49,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => 'string', 'legalEntityId' => 'string', 'name' => 'string', + 'settlorExemptionReason' => 'string[]', 'type' => 'string' ]; @@ -65,6 +66,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => null, 'legalEntityId' => null, 'name' => null, + 'settlorExemptionReason' => null, 'type' => null ]; @@ -79,6 +81,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => false, 'legalEntityId' => false, 'name' => false, + 'settlorExemptionReason' => false, 'type' => false ]; @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'jobTitle', 'legalEntityId' => 'legalEntityId', 'name' => 'name', + 'settlorExemptionReason' => 'settlorExemptionReason', 'type' => 'type' ]; @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'setJobTitle', 'legalEntityId' => 'setLegalEntityId', 'name' => 'setName', + 'settlorExemptionReason' => 'setSettlorExemptionReason', 'type' => 'setType' ]; @@ -201,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'getJobTitle', 'legalEntityId' => 'getLegalEntityId', 'name' => 'getName', + 'settlorExemptionReason' => 'getSettlorExemptionReason', 'type' => 'getType' ]; @@ -245,12 +251,20 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_DEFINED_BENEFICIARY = 'definedBeneficiary'; + public const TYPE_DIRECTOR = 'director'; public const TYPE_PCI_SIGNATORY = 'pciSignatory'; + public const TYPE_PROTECTOR = 'protector'; + public const TYPE_SECONDARY_TRUSTEE = 'secondaryTrustee'; + public const TYPE_SETTLOR = 'settlor'; public const TYPE_SIGNATORY = 'signatory'; public const TYPE_SOLE_PROPRIETORSHIP = 'soleProprietorship'; + public const TYPE_TRUST = 'trust'; + public const TYPE_TRUST_OWNERSHIP = 'trustOwnership'; public const TYPE_UBO_THROUGH_CONTROL = 'uboThroughControl'; public const TYPE_UBO_THROUGH_OWNERSHIP = 'uboThroughOwnership'; public const TYPE_ULTIMATE_PARENT_COMPANY = 'ultimateParentCompany'; + public const TYPE_UNDEFINED_BENEFICIARY = 'undefinedBeneficiary'; /** * Gets allowable values of the enum @@ -260,12 +274,20 @@ public function getModelName() public function getTypeAllowableValues() { return [ + self::TYPE_DEFINED_BENEFICIARY, + self::TYPE_DIRECTOR, self::TYPE_PCI_SIGNATORY, + self::TYPE_PROTECTOR, + self::TYPE_SECONDARY_TRUSTEE, + self::TYPE_SETTLOR, self::TYPE_SIGNATORY, self::TYPE_SOLE_PROPRIETORSHIP, + self::TYPE_TRUST, + self::TYPE_TRUST_OWNERSHIP, self::TYPE_UBO_THROUGH_CONTROL, self::TYPE_UBO_THROUGH_OWNERSHIP, self::TYPE_ULTIMATE_PARENT_COMPANY, + self::TYPE_UNDEFINED_BENEFICIARY, ]; } /** @@ -288,6 +310,7 @@ public function __construct(array $data = null) $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('settlorExemptionReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -483,6 +506,33 @@ public function setName($name) return $this; } + /** + * Gets settlorExemptionReason + * + * @return string[]|null + */ + public function getSettlorExemptionReason() + { + return $this->container['settlorExemptionReason']; + } + + /** + * Sets settlorExemptionReason + * + * @param string[]|null $settlorExemptionReason Defines the Kyc Exemption Reason for a Settlor associated with a trust. For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**. + * + * @return self + */ + public function setSettlorExemptionReason($settlorExemptionReason) + { + if (is_null($settlorExemptionReason)) { + throw new \InvalidArgumentException('non-nullable settlorExemptionReason cannot be null'); + } + $this->container['settlorExemptionReason'] = $settlorExemptionReason; + + return $this; + } + /** * Gets type * @@ -496,7 +546,7 @@ public function getType() /** * Sets type * - * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. + * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php index 411cae7d6..7eec424fd 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php @@ -392,7 +392,7 @@ public function getAllowed() /** * Sets allowed * - * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful + * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. * * @return self */ @@ -483,7 +483,7 @@ public function getRequested() /** * Sets requested * - * @param bool|null $requested Indicates whether the capability is requested. To check whether the Legal Entity is permitted to use the capability, + * @param bool|null $requested Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. * * @return self */ @@ -574,7 +574,7 @@ public function getTransferInstruments() /** * Sets transferInstruments * - * @param \Adyen\Model\LegalEntityManagement\SupportingEntityCapability[]|null $transferInstruments Capability status for transfer instruments associated with legal entity + * @param \Adyen\Model\LegalEntityManagement\SupportingEntityCapability[]|null $transferInstruments The capability status of transfer instruments associated with the legal entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 84577dade..1bc7809ec 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -50,6 +50,7 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'organization' => '\Adyen\Model\LegalEntityManagement\Organization', 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', + 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string' ]; @@ -67,6 +68,7 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'organization' => null, 'reference' => null, 'soleProprietorship' => null, + 'trust' => null, 'type' => null ]; @@ -82,6 +84,7 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'organization' => false, 'reference' => false, 'soleProprietorship' => false, + 'trust' => false, 'type' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'organization', 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', + 'trust' => 'trust', 'type' => 'type' ]; @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'setOrganization', 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', + 'trust' => 'setTrust', 'type' => 'setType' ]; @@ -207,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'getOrganization', 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', + 'trust' => 'getTrust', 'type' => 'getType' ]; @@ -293,6 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('organization', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('soleProprietorship', $data ?? [], null); + $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -509,6 +516,33 @@ public function setSoleProprietorship($soleProprietorship) return $this; } + /** + * Gets trust + * + * @return \Adyen\Model\LegalEntityManagement\Trust|null + */ + public function getTrust() + { + return $this->container['trust']; + } + + /** + * Sets trust + * + * @param \Adyen\Model\LegalEntityManagement\Trust|null $trust trust + * + * @return self + */ + public function setTrust($trust) + { + if (is_null($trust)) { + throw new \InvalidArgumentException('non-nullable trust cannot be null'); + } + $this->container['trust'] = $trust; + + return $this; + } + /** * Gets type * @@ -522,7 +556,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. + * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 22a5dff8b..e8a75b4a8 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -50,6 +50,7 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'organization' => '\Adyen\Model\LegalEntityManagement\Organization', 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', + 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string' ]; @@ -67,6 +68,7 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'organization' => null, 'reference' => null, 'soleProprietorship' => null, + 'trust' => null, 'type' => null ]; @@ -82,6 +84,7 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'organization' => false, 'reference' => false, 'soleProprietorship' => false, + 'trust' => false, 'type' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'organization', 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', + 'trust' => 'trust', 'type' => 'type' ]; @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'setOrganization', 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', + 'trust' => 'setTrust', 'type' => 'setType' ]; @@ -207,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'getOrganization', 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', + 'trust' => 'getTrust', 'type' => 'getType' ]; @@ -293,6 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('organization', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('soleProprietorship', $data ?? [], null); + $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -512,6 +519,33 @@ public function setSoleProprietorship($soleProprietorship) return $this; } + /** + * Gets trust + * + * @return \Adyen\Model\LegalEntityManagement\Trust|null + */ + public function getTrust() + { + return $this->container['trust']; + } + + /** + * Sets trust + * + * @param \Adyen\Model\LegalEntityManagement\Trust|null $trust trust + * + * @return self + */ + public function setTrust($trust) + { + if (is_null($trust)) { + throw new \InvalidArgumentException('non-nullable trust cannot be null'); + } + $this->container['trust'] = $trust; + + return $this; + } + /** * Gets type * @@ -525,7 +559,7 @@ public function getType() /** * Sets type * - * @param string $type The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. + * @param string $type The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index ed621bfd4..250e8a786 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -364,7 +364,7 @@ public function getSettings() /** * Sets settings * - * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. + * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 935c6ad2e..0e8c25fa9 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -51,6 +51,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', 'registrationNumber' => 'string', + 'taxInformation' => '\Adyen\Model\LegalEntityManagement\TaxInformation[]', 'vatAbsenceReason' => 'string', 'vatNumber' => 'string' ]; @@ -70,6 +71,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'principalPlaceOfBusiness' => null, 'registeredAddress' => null, 'registrationNumber' => null, + 'taxInformation' => null, 'vatAbsenceReason' => null, 'vatNumber' => null ]; @@ -87,6 +89,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'principalPlaceOfBusiness' => false, 'registeredAddress' => false, 'registrationNumber' => false, + 'taxInformation' => false, 'vatAbsenceReason' => false, 'vatNumber' => false ]; @@ -184,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', 'registeredAddress' => 'registeredAddress', 'registrationNumber' => 'registrationNumber', + 'taxInformation' => 'taxInformation', 'vatAbsenceReason' => 'vatAbsenceReason', 'vatNumber' => 'vatNumber' ]; @@ -201,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', 'registeredAddress' => 'setRegisteredAddress', 'registrationNumber' => 'setRegistrationNumber', + 'taxInformation' => 'setTaxInformation', 'vatAbsenceReason' => 'setVatAbsenceReason', 'vatNumber' => 'setVatNumber' ]; @@ -218,6 +223,7 @@ public function isNullableSetToNull(string $property): bool 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', 'registeredAddress' => 'getRegisteredAddress', 'registrationNumber' => 'getRegistrationNumber', + 'taxInformation' => 'getTaxInformation', 'vatAbsenceReason' => 'getVatAbsenceReason', 'vatNumber' => 'getVatNumber' ]; @@ -300,6 +306,7 @@ public function __construct(array $data = null) $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); $this->setIfExists('registeredAddress', $data ?? [], null); $this->setIfExists('registrationNumber', $data ?? [], null); + $this->setIfExists('taxInformation', $data ?? [], null); $this->setIfExists('vatAbsenceReason', $data ?? [], null); $this->setIfExists('vatNumber', $data ?? [], null); } @@ -553,6 +560,33 @@ public function setRegistrationNumber($registrationNumber) return $this; } + /** + * Gets taxInformation + * + * @return \Adyen\Model\LegalEntityManagement\TaxInformation[]|null + */ + public function getTaxInformation() + { + return $this->container['taxInformation']; + } + + /** + * Sets taxInformation + * + * @param \Adyen\Model\LegalEntityManagement\TaxInformation[]|null $taxInformation The tax information of the entity. + * + * @return self + */ + public function setTaxInformation($taxInformation) + { + if (is_null($taxInformation)) { + throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); + } + $this->container['taxInformation'] = $taxInformation; + + return $this; + } + /** * Gets vatAbsenceReason * diff --git a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php index 4460e3308..e9f9d7e55 100644 --- a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php @@ -310,7 +310,7 @@ public function getAllowed() /** * Sets allowed * - * @param bool|null $allowed Indicates whether the supporting entity capability is allowed. If a supporting entity is allowed but its parent legal entity is not, it means there are other supporting entities that failed validation. **The allowed supporting entity can still be used** + * @param bool|null $allowed Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities. * * @return self */ @@ -391,7 +391,7 @@ public function getVerificationStatus() /** * Sets verificationStatus * - * @param string|null $verificationStatus The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. + * @param string|null $verificationStatus The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php index 3daa76557..d0290d076 100644 --- a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php @@ -458,7 +458,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of Terms of Service. + * @param string|null $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php index a89e5fb8b..f5e75f6c2 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php @@ -393,7 +393,7 @@ public function getCapabilities() /** * Sets capabilities * - * @param array|null $capabilities List of capabilities for this supporting entity. + * @param array|null $capabilities List of capabilities for this transfer instrument. * * @return self */ @@ -501,7 +501,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for this supporting entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems The verification errors related to capabilities for this transfer instrument. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Trust.php b/src/Adyen/Model/LegalEntityManagement/Trust.php new file mode 100644 index 000000000..4bcac8bfe --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/Trust.php @@ -0,0 +1,862 @@ + + */ +class Trust implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Trust'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'countryOfGoverningLaw' => 'string', + 'dateOfIncorporation' => 'string', + 'doingBusinessAs' => 'string', + 'name' => 'string', + 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', + 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', + 'registrationNumber' => 'string', + 'taxInformation' => '\Adyen\Model\LegalEntityManagement\TaxInformation[]', + 'type' => 'string', + 'undefinedBeneficiaryInfo' => '\Adyen\Model\LegalEntityManagement\UndefinedBeneficiary[]', + 'vatAbsenceReason' => 'string', + 'vatNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'countryOfGoverningLaw' => null, + 'dateOfIncorporation' => null, + 'doingBusinessAs' => null, + 'name' => null, + 'principalPlaceOfBusiness' => null, + 'registeredAddress' => null, + 'registrationNumber' => null, + 'taxInformation' => null, + 'type' => null, + 'undefinedBeneficiaryInfo' => null, + 'vatAbsenceReason' => null, + 'vatNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'countryOfGoverningLaw' => false, + 'dateOfIncorporation' => false, + 'doingBusinessAs' => false, + 'name' => false, + 'principalPlaceOfBusiness' => false, + 'registeredAddress' => false, + 'registrationNumber' => false, + 'taxInformation' => false, + 'type' => false, + 'undefinedBeneficiaryInfo' => false, + 'vatAbsenceReason' => false, + 'vatNumber' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'countryOfGoverningLaw' => 'countryOfGoverningLaw', + 'dateOfIncorporation' => 'dateOfIncorporation', + 'doingBusinessAs' => 'doingBusinessAs', + 'name' => 'name', + 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', + 'registeredAddress' => 'registeredAddress', + 'registrationNumber' => 'registrationNumber', + 'taxInformation' => 'taxInformation', + 'type' => 'type', + 'undefinedBeneficiaryInfo' => 'undefinedBeneficiaryInfo', + 'vatAbsenceReason' => 'vatAbsenceReason', + 'vatNumber' => 'vatNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', + 'dateOfIncorporation' => 'setDateOfIncorporation', + 'doingBusinessAs' => 'setDoingBusinessAs', + 'name' => 'setName', + 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', + 'registeredAddress' => 'setRegisteredAddress', + 'registrationNumber' => 'setRegistrationNumber', + 'taxInformation' => 'setTaxInformation', + 'type' => 'setType', + 'undefinedBeneficiaryInfo' => 'setUndefinedBeneficiaryInfo', + 'vatAbsenceReason' => 'setVatAbsenceReason', + 'vatNumber' => 'setVatNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', + 'dateOfIncorporation' => 'getDateOfIncorporation', + 'doingBusinessAs' => 'getDoingBusinessAs', + 'name' => 'getName', + 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', + 'registeredAddress' => 'getRegisteredAddress', + 'registrationNumber' => 'getRegistrationNumber', + 'taxInformation' => 'getTaxInformation', + 'type' => 'getType', + 'undefinedBeneficiaryInfo' => 'getUndefinedBeneficiaryInfo', + 'vatAbsenceReason' => 'getVatAbsenceReason', + 'vatNumber' => 'getVatNumber' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_CASH_MANAGEMENT_TRUST = 'cashManagementTrust'; + public const TYPE_CORPORATE_UNIT_TRUST = 'corporateUnitTrust'; + public const TYPE_DECEASED_ESTATE = 'deceasedEstate'; + public const TYPE_DISCRETIONARY_INVESTMENT_TRUST = 'discretionaryInvestmentTrust'; + public const TYPE_DISCRETIONARY_SERVICES_MANAGEMENT_TRUST = 'discretionaryServicesManagementTrust'; + public const TYPE_DISCRETIONARY_TRADING_TRUST = 'discretionaryTradingTrust'; + public const TYPE_FIRST_HOME_SAVER_ACCOUNTS_TRUST = 'firstHomeSaverAccountsTrust'; + public const TYPE_FIXED_TRUST = 'fixedTrust'; + public const TYPE_FIXED_UNIT_TRUST = 'fixedUnitTrust'; + public const TYPE_HYBRID_TRUST = 'hybridTrust'; + public const TYPE_LISTED_PUBLIC_UNIT_TRUST = 'listedPublicUnitTrust'; + public const TYPE_OTHER_TRUST = 'otherTrust'; + public const TYPE_POOLED_SUPERANNUATION_TRUST = 'pooledSuperannuationTrust'; + public const TYPE_PUBLIC_TRADING_TRUST = 'publicTradingTrust'; + public const TYPE_UNLISTED_PUBLIC_UNIT_TRUST = 'unlistedPublicUnitTrust'; + public const VAT_ABSENCE_REASON_INDUSTRY_EXEMPTION = 'industryExemption'; + public const VAT_ABSENCE_REASON_BELOW_TAX_THRESHOLD = 'belowTaxThreshold'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CASH_MANAGEMENT_TRUST, + self::TYPE_CORPORATE_UNIT_TRUST, + self::TYPE_DECEASED_ESTATE, + self::TYPE_DISCRETIONARY_INVESTMENT_TRUST, + self::TYPE_DISCRETIONARY_SERVICES_MANAGEMENT_TRUST, + self::TYPE_DISCRETIONARY_TRADING_TRUST, + self::TYPE_FIRST_HOME_SAVER_ACCOUNTS_TRUST, + self::TYPE_FIXED_TRUST, + self::TYPE_FIXED_UNIT_TRUST, + self::TYPE_HYBRID_TRUST, + self::TYPE_LISTED_PUBLIC_UNIT_TRUST, + self::TYPE_OTHER_TRUST, + self::TYPE_POOLED_SUPERANNUATION_TRUST, + self::TYPE_PUBLIC_TRADING_TRUST, + self::TYPE_UNLISTED_PUBLIC_UNIT_TRUST, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVatAbsenceReasonAllowableValues() + { + return [ + self::VAT_ABSENCE_REASON_INDUSTRY_EXEMPTION, + self::VAT_ABSENCE_REASON_BELOW_TAX_THRESHOLD, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); + $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('doingBusinessAs', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); + $this->setIfExists('registeredAddress', $data ?? [], null); + $this->setIfExists('registrationNumber', $data ?? [], null); + $this->setIfExists('taxInformation', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('undefinedBeneficiaryInfo', $data ?? [], null); + $this->setIfExists('vatAbsenceReason', $data ?? [], null); + $this->setIfExists('vatNumber', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['countryOfGoverningLaw'] === null) { + $invalidProperties[] = "'countryOfGoverningLaw' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['registeredAddress'] === null) { + $invalidProperties[] = "'registeredAddress' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVatAbsenceReasonAllowableValues(); + if (!is_null($this->container['vatAbsenceReason']) && !in_array($this->container['vatAbsenceReason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'vatAbsenceReason', must be one of '%s'", + $this->container['vatAbsenceReason'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets countryOfGoverningLaw + * + * @return string + */ + public function getCountryOfGoverningLaw() + { + return $this->container['countryOfGoverningLaw']; + } + + /** + * Sets countryOfGoverningLaw + * + * @param string $countryOfGoverningLaw The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + * + * @return self + */ + public function setCountryOfGoverningLaw($countryOfGoverningLaw) + { + if (is_null($countryOfGoverningLaw)) { + throw new \InvalidArgumentException('non-nullable countryOfGoverningLaw cannot be null'); + } + $this->container['countryOfGoverningLaw'] = $countryOfGoverningLaw; + + return $this; + } + + /** + * Gets dateOfIncorporation + * + * @return string|null + */ + public function getDateOfIncorporation() + { + return $this->container['dateOfIncorporation']; + } + + /** + * Sets dateOfIncorporation + * + * @param string|null $dateOfIncorporation The date when the legal arrangement was incorporated in YYYY-MM-DD format. + * + * @return self + */ + public function setDateOfIncorporation($dateOfIncorporation) + { + if (is_null($dateOfIncorporation)) { + throw new \InvalidArgumentException('non-nullable dateOfIncorporation cannot be null'); + } + $this->container['dateOfIncorporation'] = $dateOfIncorporation; + + return $this; + } + + /** + * Gets doingBusinessAs + * + * @return string|null + */ + public function getDoingBusinessAs() + { + return $this->container['doingBusinessAs']; + } + + /** + * Sets doingBusinessAs + * + * @param string|null $doingBusinessAs The registered name, if different from the `name`. + * + * @return self + */ + public function setDoingBusinessAs($doingBusinessAs) + { + if (is_null($doingBusinessAs)) { + throw new \InvalidArgumentException('non-nullable doingBusinessAs cannot be null'); + } + $this->container['doingBusinessAs'] = $doingBusinessAs; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The legal name. + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets principalPlaceOfBusiness + * + * @return \Adyen\Model\LegalEntityManagement\Address|null + */ + public function getPrincipalPlaceOfBusiness() + { + return $this->container['principalPlaceOfBusiness']; + } + + /** + * Sets principalPlaceOfBusiness + * + * @param \Adyen\Model\LegalEntityManagement\Address|null $principalPlaceOfBusiness principalPlaceOfBusiness + * + * @return self + */ + public function setPrincipalPlaceOfBusiness($principalPlaceOfBusiness) + { + if (is_null($principalPlaceOfBusiness)) { + throw new \InvalidArgumentException('non-nullable principalPlaceOfBusiness cannot be null'); + } + $this->container['principalPlaceOfBusiness'] = $principalPlaceOfBusiness; + + return $this; + } + + /** + * Gets registeredAddress + * + * @return \Adyen\Model\LegalEntityManagement\Address + */ + public function getRegisteredAddress() + { + return $this->container['registeredAddress']; + } + + /** + * Sets registeredAddress + * + * @param \Adyen\Model\LegalEntityManagement\Address $registeredAddress registeredAddress + * + * @return self + */ + public function setRegisteredAddress($registeredAddress) + { + if (is_null($registeredAddress)) { + throw new \InvalidArgumentException('non-nullable registeredAddress cannot be null'); + } + $this->container['registeredAddress'] = $registeredAddress; + + return $this; + } + + /** + * Gets registrationNumber + * + * @return string|null + */ + public function getRegistrationNumber() + { + return $this->container['registrationNumber']; + } + + /** + * Sets registrationNumber + * + * @param string|null $registrationNumber The registration number. + * + * @return self + */ + public function setRegistrationNumber($registrationNumber) + { + if (is_null($registrationNumber)) { + throw new \InvalidArgumentException('non-nullable registrationNumber cannot be null'); + } + $this->container['registrationNumber'] = $registrationNumber; + + return $this; + } + + /** + * Gets taxInformation + * + * @return \Adyen\Model\LegalEntityManagement\TaxInformation[]|null + */ + public function getTaxInformation() + { + return $this->container['taxInformation']; + } + + /** + * Sets taxInformation + * + * @param \Adyen\Model\LegalEntityManagement\TaxInformation[]|null $taxInformation The tax information of the entity. + * + * @return self + */ + public function setTaxInformation($taxInformation) + { + if (is_null($taxInformation)) { + throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); + } + $this->container['taxInformation'] = $taxInformation; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets undefinedBeneficiaryInfo + * + * @return \Adyen\Model\LegalEntityManagement\UndefinedBeneficiary[]|null + */ + public function getUndefinedBeneficiaryInfo() + { + return $this->container['undefinedBeneficiaryInfo']; + } + + /** + * Sets undefinedBeneficiaryInfo + * + * @param \Adyen\Model\LegalEntityManagement\UndefinedBeneficiary[]|null $undefinedBeneficiaryInfo The undefined beneficiary information of the entity. + * + * @return self + */ + public function setUndefinedBeneficiaryInfo($undefinedBeneficiaryInfo) + { + if (is_null($undefinedBeneficiaryInfo)) { + throw new \InvalidArgumentException('non-nullable undefinedBeneficiaryInfo cannot be null'); + } + $this->container['undefinedBeneficiaryInfo'] = $undefinedBeneficiaryInfo; + + return $this; + } + + /** + * Gets vatAbsenceReason + * + * @return string|null + */ + public function getVatAbsenceReason() + { + return $this->container['vatAbsenceReason']; + } + + /** + * Sets vatAbsenceReason + * + * @param string|null $vatAbsenceReason The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + * + * @return self + */ + public function setVatAbsenceReason($vatAbsenceReason) + { + if (is_null($vatAbsenceReason)) { + throw new \InvalidArgumentException('non-nullable vatAbsenceReason cannot be null'); + } + $allowedValues = $this->getVatAbsenceReasonAllowableValues(); + if (!in_array($vatAbsenceReason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'vatAbsenceReason', must be one of '%s'", + $vatAbsenceReason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['vatAbsenceReason'] = $vatAbsenceReason; + + return $this; + } + + /** + * Gets vatNumber + * + * @return string|null + */ + public function getVatNumber() + { + return $this->container['vatNumber']; + } + + /** + * Sets vatNumber + * + * @param string|null $vatNumber The VAT number. + * + * @return self + */ + public function setVatNumber($vatNumber) + { + if (is_null($vatNumber)) { + throw new \InvalidArgumentException('non-nullable vatNumber cannot be null'); + } + $this->container['vatNumber'] = $vatNumber; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/JSONObject.php b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php similarity index 81% rename from src/Adyen/Model/Management/JSONObject.php rename to src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php index 677a1a6cb..b3811bbdc 100644 --- a/src/Adyen/Model/Management/JSONObject.php +++ b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php @@ -1,7 +1,7 @@ */ -class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable +class UndefinedBeneficiary implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONObject'; + protected static $openAPIModelName = 'UndefinedBeneficiary'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,8 +44,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\Management\JSONPath[]', - 'rootPath' => '\Adyen\Model\Management\JSONPath' + 'description' => 'string', + 'reference' => 'string' ]; /** @@ -56,8 +56,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'paths' => null, - 'rootPath' => null + 'description' => null, + 'reference' => null ]; /** @@ -66,8 +66,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'paths' => false, - 'rootPath' => false + 'description' => false, + 'reference' => false ]; /** @@ -156,8 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'paths' => 'paths', - 'rootPath' => 'rootPath' + 'description' => 'description', + 'reference' => 'reference' ]; /** @@ -166,8 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'paths' => 'setPaths', - 'rootPath' => 'setRootPath' + 'description' => 'setDescription', + 'reference' => 'setReference' ]; /** @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'paths' => 'getPaths', - 'rootPath' => 'getRootPath' + 'description' => 'getDescription', + 'reference' => 'getReference' ]; /** @@ -237,8 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('paths', $data ?? [], null); - $this->setIfExists('rootPath', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); } /** @@ -284,55 +284,55 @@ public function valid() /** - * Gets paths + * Gets description * - * @return \Adyen\Model\Management\JSONPath[]|null + * @return string|null */ - public function getPaths() + public function getDescription() { - return $this->container['paths']; + return $this->container['description']; } /** - * Sets paths + * Sets description * - * @param \Adyen\Model\Management\JSONPath[]|null $paths paths + * @param string|null $description The details of the undefined beneficiary. * * @return self */ - public function setPaths($paths) + public function setDescription($description) { - if (is_null($paths)) { - throw new \InvalidArgumentException('non-nullable paths cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['paths'] = $paths; + $this->container['description'] = $description; return $this; } /** - * Gets rootPath + * Gets reference * - * @return \Adyen\Model\Management\JSONPath|null + * @return string|null */ - public function getRootPath() + public function getReference() { - return $this->container['rootPath']; + return $this->container['reference']; } /** - * Sets rootPath + * Sets reference * - * @param \Adyen\Model\Management\JSONPath|null $rootPath rootPath + * @param string|null $reference The reference of the undefined beneficiary. * * @return self */ - public function setRootPath($rootPath) + public function setReference($reference) { - if (is_null($rootPath)) { - throw new \InvalidArgumentException('non-nullable rootPath cannot be null'); + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); } - $this->container['rootPath'] = $rootPath; + $this->container['reference'] = $reference; return $this; } diff --git a/src/Adyen/Model/Management/JSONPath.php b/src/Adyen/Model/Management/Localization.php similarity index 90% rename from src/Adyen/Model/Management/JSONPath.php rename to src/Adyen/Model/Management/Localization.php index 8fb7a2469..c0ea126ff 100644 --- a/src/Adyen/Model/Management/JSONPath.php +++ b/src/Adyen/Model/Management/Localization.php @@ -19,7 +19,7 @@ use Adyen\Model\Management\ObjectSerializer; /** - * JSONPath Class Doc Comment + * Localization Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable +class Localization implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONPath'; + protected static $openAPIModelName = 'Localization'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,7 +44,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'content' => 'string[]' + 'language' => 'string' ]; /** @@ -55,7 +55,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'content' => null + 'language' => null ]; /** @@ -64,7 +64,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'content' => false + 'language' => false ]; /** @@ -153,7 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'content' => 'content' + 'language' => 'language' ]; /** @@ -162,7 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'content' => 'setContent' + 'language' => 'setLanguage' ]; /** @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'content' => 'getContent' + 'language' => 'getLanguage' ]; /** @@ -231,7 +231,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); } /** @@ -277,28 +277,28 @@ public function valid() /** - * Gets content + * Gets language * - * @return string[]|null + * @return string|null */ - public function getContent() + public function getLanguage() { - return $this->container['content']; + return $this->container['language']; } /** - * Sets content + * Sets language * - * @param string[]|null $content content + * @param string|null $language Language of the terminal. * * @return self */ - public function setContent($content) + public function setLanguage($language) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['content'] = $content; + $this->container['language'] = $language; return $this; } diff --git a/src/Adyen/Model/Management/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index deae21971..8cb282d53 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -49,7 +49,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'instance' => 'string', 'invalidFields' => '\Adyen\Model\Management\InvalidField[]', 'requestId' => 'string', - 'response' => '\Adyen\Model\Management\JSONObject', + 'response' => 'object', 'status' => 'int', 'title' => 'string', 'type' => 'string' @@ -485,7 +485,7 @@ public function setRequestId($requestId) /** * Gets response * - * @return \Adyen\Model\Management\JSONObject|null + * @return object|null */ public function getResponse() { @@ -495,7 +495,7 @@ public function getResponse() /** * Sets response * - * @param \Adyen\Model\Management\JSONObject|null $response response + * @param object|null $response response * * @return self */ diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index e73c9a7be..649a9cc1d 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -239,9 +239,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_REASSIGNMENT_IN_PROGRESS = 'reassignmentInProgress'; + public const STATUS_BOARDED = 'boarded'; public const STATUS_DEPLOYED = 'deployed'; public const STATUS_INVENTORY = 'inventory'; + public const STATUS_REASSIGNMENT_IN_PROGRESS = 'reassignmentInProgress'; /** * Gets allowable values of the enum @@ -251,9 +252,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_REASSIGNMENT_IN_PROGRESS, + self::STATUS_BOARDED, self::STATUS_DEPLOYED, self::STATUS_INVENTORY, + self::STATUS_REASSIGNMENT_IN_PROGRESS, ]; } /** @@ -429,7 +431,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. + * @param string $status The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. * * @return self */ diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index 5c64af771..ca1aaa2a2 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -48,6 +48,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => '\Adyen\Model\Management\Connectivity', 'gratuities' => '\Adyen\Model\Management\Gratuity[]', 'hardware' => '\Adyen\Model\Management\Hardware', + 'localization' => '\Adyen\Model\Management\Localization', 'nexo' => '\Adyen\Model\Management\Nexo', 'offlineProcessing' => '\Adyen\Model\Management\OfflineProcessing', 'opi' => '\Adyen\Model\Management\Opi', @@ -75,6 +76,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => null, 'gratuities' => null, 'hardware' => null, + 'localization' => null, 'nexo' => null, 'offlineProcessing' => null, 'opi' => null, @@ -100,6 +102,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => false, 'gratuities' => false, 'hardware' => false, + 'localization' => false, 'nexo' => false, 'offlineProcessing' => false, 'opi' => false, @@ -205,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'connectivity', 'gratuities' => 'gratuities', 'hardware' => 'hardware', + 'localization' => 'localization', 'nexo' => 'nexo', 'offlineProcessing' => 'offlineProcessing', 'opi' => 'opi', @@ -230,6 +234,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'setConnectivity', 'gratuities' => 'setGratuities', 'hardware' => 'setHardware', + 'localization' => 'setLocalization', 'nexo' => 'setNexo', 'offlineProcessing' => 'setOfflineProcessing', 'opi' => 'setOpi', @@ -255,6 +260,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'getConnectivity', 'gratuities' => 'getGratuities', 'hardware' => 'getHardware', + 'localization' => 'getLocalization', 'nexo' => 'getNexo', 'offlineProcessing' => 'getOfflineProcessing', 'opi' => 'getOpi', @@ -331,6 +337,7 @@ public function __construct(array $data = null) $this->setIfExists('connectivity', $data ?? [], null); $this->setIfExists('gratuities', $data ?? [], null); $this->setIfExists('hardware', $data ?? [], null); + $this->setIfExists('localization', $data ?? [], null); $this->setIfExists('nexo', $data ?? [], null); $this->setIfExists('offlineProcessing', $data ?? [], null); $this->setIfExists('opi', $data ?? [], null); @@ -496,6 +503,33 @@ public function setHardware($hardware) return $this; } + /** + * Gets localization + * + * @return \Adyen\Model\Management\Localization|null + */ + public function getLocalization() + { + return $this->container['localization']; + } + + /** + * Sets localization + * + * @param \Adyen\Model\Management\Localization|null $localization localization + * + * @return self + */ + public function setLocalization($localization) + { + if (is_null($localization)) { + throw new \InvalidArgumentException('non-nullable localization cannot be null'); + } + $this->container['localization'] = $localization; + + return $this; + } + /** * Gets nexo * diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index 8aa38aed4..5174a5d7e 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index b3ac37885..2bc5bfd7e 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/Transfers/RestServiceError.php b/src/Adyen/Model/Transfers/RestServiceError.php index d71acaa75..f561c550c 100644 --- a/src/Adyen/Model/Transfers/RestServiceError.php +++ b/src/Adyen/Model/Transfers/RestServiceError.php @@ -49,7 +49,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'instance' => 'string', 'invalidFields' => '\Adyen\Model\Transfers\InvalidField[]', 'requestId' => 'string', - 'response' => '\Adyen\Model\Transfers\JSONObject', + 'response' => 'object', 'status' => 'int', 'title' => 'string', 'type' => 'string' @@ -485,7 +485,7 @@ public function setRequestId($requestId) /** * Gets response * - * @return \Adyen\Model\Transfers\JSONObject|null + * @return object|null */ public function getResponse() { @@ -495,7 +495,7 @@ public function getResponse() /** * Sets response * - * @param \Adyen\Model\Transfers\JSONObject|null $response response + * @param object|null $response JSON response payload. * * @return self */ diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index 74bf449b5..d6b6e6ff1 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -50,7 +50,6 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable 'balancePlatform' => 'string', 'bookingDate' => '\DateTime', 'creationDate' => '\DateTime', - 'eventId' => 'string', 'id' => 'string', 'status' => 'string', 'transfer' => '\Adyen\Model\Transfers\TransferData', @@ -71,7 +70,6 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable 'balancePlatform' => null, 'bookingDate' => 'date-time', 'creationDate' => 'date-time', - 'eventId' => null, 'id' => null, 'status' => null, 'transfer' => null, @@ -90,7 +88,6 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable 'balancePlatform' => false, 'bookingDate' => false, 'creationDate' => false, - 'eventId' => false, 'id' => false, 'status' => false, 'transfer' => false, @@ -189,7 +186,6 @@ public function isNullableSetToNull(string $property): bool 'balancePlatform' => 'balancePlatform', 'bookingDate' => 'bookingDate', 'creationDate' => 'creationDate', - 'eventId' => 'eventId', 'id' => 'id', 'status' => 'status', 'transfer' => 'transfer', @@ -208,7 +204,6 @@ public function isNullableSetToNull(string $property): bool 'balancePlatform' => 'setBalancePlatform', 'bookingDate' => 'setBookingDate', 'creationDate' => 'setCreationDate', - 'eventId' => 'setEventId', 'id' => 'setId', 'status' => 'setStatus', 'transfer' => 'setTransfer', @@ -227,7 +222,6 @@ public function isNullableSetToNull(string $property): bool 'balancePlatform' => 'getBalancePlatform', 'bookingDate' => 'getBookingDate', 'creationDate' => 'getCreationDate', - 'eventId' => 'getEventId', 'id' => 'getId', 'status' => 'getStatus', 'transfer' => 'getTransfer', @@ -311,7 +305,6 @@ public function __construct(array $data = null) $this->setIfExists('balancePlatform', $data ?? [], null); $this->setIfExists('bookingDate', $data ?? [], null); $this->setIfExists('creationDate', $data ?? [], null); - $this->setIfExists('eventId', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('transfer', $data ?? [], null); @@ -555,33 +548,6 @@ public function setCreationDate($creationDate) return $this; } - /** - * Gets eventId - * - * @return string|null - */ - public function getEventId() - { - return $this->container['eventId']; - } - - /** - * Sets eventId - * - * @param string|null $eventId The PSP reference of the transaction in the journal. - * - * @return self - */ - public function setEventId($eventId) - { - if (is_null($eventId)) { - throw new \InvalidArgumentException('non-nullable eventId cannot be null'); - } - $this->container['eventId'] = $eventId; - - return $this; - } - /** * Gets id *