diff --git a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php index f65103eb3..c1dfe2cdb 100644 --- a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php +++ b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const CHALLENGE_CANCEL__00 = '00'; public const CHALLENGE_CANCEL__01 = '01'; public const CHALLENGE_CANCEL__02 = '02'; public const CHALLENGE_CANCEL__03 = '03'; @@ -252,6 +253,7 @@ public function getModelName() public const CHALLENGE_CANCEL__05 = '05'; public const CHALLENGE_CANCEL__06 = '06'; public const CHALLENGE_CANCEL__07 = '07'; + public const CHALLENGE_CANCEL__08 = '08'; public const FLOW_OTP_SMS = 'OTP_SMS'; public const FLOW_OOB = 'OOB'; @@ -263,6 +265,7 @@ public function getModelName() public function getChallengeCancelAllowableValues() { return [ + self::CHALLENGE_CANCEL__00, self::CHALLENGE_CANCEL__01, self::CHALLENGE_CANCEL__02, self::CHALLENGE_CANCEL__03, @@ -270,6 +273,7 @@ public function getChallengeCancelAllowableValues() self::CHALLENGE_CANCEL__05, self::CHALLENGE_CANCEL__06, self::CHALLENGE_CANCEL__07, + self::CHALLENGE_CANCEL__08, ]; } /** @@ -386,7 +390,7 @@ public function getChallengeCancel() /** * Sets challengeCancel * - * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index aa990b8da..e577c748b 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -646,7 +646,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php index 6f306b283..cb6ee2c00 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php @@ -578,7 +578,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/AssociationDelegatedAuthenticationData.php b/src/Adyen/Model/BalancePlatform/AssociationDelegatedAuthenticationData.php new file mode 100644 index 000000000..01aed066c --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/AssociationDelegatedAuthenticationData.php @@ -0,0 +1,410 @@ + + */ +class AssociationDelegatedAuthenticationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AssociationDelegatedAuthenticationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sdkOutput' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sdkOutput' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'sdkOutput' => 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 = [ + 'sdkOutput' => 'sdkOutput' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sdkOutput' => 'setSdkOutput' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sdkOutput' => 'getSdkOutput' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('sdkOutput', $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['sdkOutput'] === null) { + $invalidProperties[] = "'sdkOutput' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sdkOutput + * + * @return string + */ + public function getSdkOutput() + { + return $this->container['sdkOutput']; + } + + /** + * Sets sdkOutput + * + * @param string $sdkOutput A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. + * + * @return self + */ + public function setSdkOutput($sdkOutput) + { + $this->container['sdkOutput'] = $sdkOutput; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/AssociationFinaliseRequest.php b/src/Adyen/Model/BalancePlatform/AssociationFinaliseRequest.php new file mode 100644 index 000000000..f15fe4473 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/AssociationFinaliseRequest.php @@ -0,0 +1,509 @@ + + */ +class AssociationFinaliseRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AssociationFinaliseRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'ids' => 'string[]', + 'strongCustomerAuthentication' => '\Adyen\Model\BalancePlatform\AssociationDelegatedAuthenticationData', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'ids' => null, + 'strongCustomerAuthentication' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'ids' => false, + 'strongCustomerAuthentication' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ids' => 'ids', + 'strongCustomerAuthentication' => 'strongCustomerAuthentication', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ids' => 'setIds', + 'strongCustomerAuthentication' => 'setStrongCustomerAuthentication', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ids' => 'getIds', + 'strongCustomerAuthentication' => 'getStrongCustomerAuthentication', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PAYMENT_INSTRUMENT = 'PaymentInstrument'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_INSTRUMENT, + ]; + } + /** + * 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('ids', $data ?? [], null); + $this->setIfExists('strongCustomerAuthentication', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ids'] === null) { + $invalidProperties[] = "'ids' can't be null"; + } + if ($this->container['strongCustomerAuthentication'] === null) { + $invalidProperties[] = "'strongCustomerAuthentication' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * 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 ids + * + * @return string[] + */ + public function getIds() + { + return $this->container['ids']; + } + + /** + * Sets ids + * + * @param string[] $ids The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * + * @return self + */ + public function setIds($ids) + { + $this->container['ids'] = $ids; + + return $this; + } + + /** + * Gets strongCustomerAuthentication + * + * @return \Adyen\Model\BalancePlatform\AssociationDelegatedAuthenticationData + */ + public function getStrongCustomerAuthentication() + { + return $this->container['strongCustomerAuthentication']; + } + + /** + * Sets strongCustomerAuthentication + * + * @param \Adyen\Model\BalancePlatform\AssociationDelegatedAuthenticationData $strongCustomerAuthentication strongCustomerAuthentication + * + * @return self + */ + public function setStrongCustomerAuthentication($strongCustomerAuthentication) + { + $this->container['strongCustomerAuthentication'] = $strongCustomerAuthentication; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/AssociationFinaliseResponse.php b/src/Adyen/Model/BalancePlatform/AssociationFinaliseResponse.php new file mode 100644 index 000000000..9ebedae5d --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/AssociationFinaliseResponse.php @@ -0,0 +1,503 @@ + + */ +class AssociationFinaliseResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AssociationFinaliseResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'deviceId' => 'string', + 'ids' => 'string[]', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'deviceId' => null, + 'ids' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'deviceId' => false, + 'ids' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'deviceId' => 'deviceId', + 'ids' => 'ids', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'deviceId' => 'setDeviceId', + 'ids' => 'setIds', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'deviceId' => 'getDeviceId', + 'ids' => 'getIds', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PAYMENT_INSTRUMENT = 'PAYMENT_INSTRUMENT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_INSTRUMENT, + ]; + } + /** + * 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('deviceId', $data ?? [], null); + $this->setIfExists('ids', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets deviceId + * + * @return string|null + */ + public function getDeviceId() + { + return $this->container['deviceId']; + } + + /** + * Sets deviceId + * + * @param string|null $deviceId The unique identifier of the SCA device you associated with a resource. + * + * @return self + */ + public function setDeviceId($deviceId) + { + $this->container['deviceId'] = $deviceId; + + return $this; + } + + /** + * Gets ids + * + * @return string[]|null + */ + public function getIds() + { + return $this->container['ids']; + } + + /** + * Sets ids + * + * @param string[]|null $ids The list of unique identifiers of the resources that you associated with the SCA device. + * + * @return self + */ + public function setIds($ids) + { + $this->container['ids'] = $ids; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of resource that you associated with the SCA device. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/AssociationInitiateRequest.php b/src/Adyen/Model/BalancePlatform/AssociationInitiateRequest.php new file mode 100644 index 000000000..4c0ba7156 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/AssociationInitiateRequest.php @@ -0,0 +1,475 @@ + + */ +class AssociationInitiateRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AssociationInitiateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'ids' => 'string[]', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'ids' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'ids' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'ids' => 'ids', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ids' => 'setIds', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ids' => 'getIds', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PAYMENT_INSTRUMENT = 'PaymentInstrument'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_INSTRUMENT, + ]; + } + /** + * 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('ids', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['ids'] === null) { + $invalidProperties[] = "'ids' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * 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 ids + * + * @return string[] + */ + public function getIds() + { + return $this->container['ids']; + } + + /** + * Sets ids + * + * @param string[] $ids The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * + * @return self + */ + public function setIds($ids) + { + $this->container['ids'] = $ids; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/AssociationInitiateResponse.php b/src/Adyen/Model/BalancePlatform/AssociationInitiateResponse.php new file mode 100644 index 000000000..2d7d08156 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/AssociationInitiateResponse.php @@ -0,0 +1,407 @@ + + */ +class AssociationInitiateResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AssociationInitiateResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sdkInput' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sdkInput' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'sdkInput' => 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 = [ + 'sdkInput' => 'sdkInput' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sdkInput' => 'setSdkInput' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sdkInput' => 'getSdkInput' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('sdkInput', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sdkInput + * + * @return string|null + */ + public function getSdkInput() + { + return $this->container['sdkInput']; + } + + /** + * Sets sdkInput + * + * @param string|null $sdkInput A string that you must pass to the authentication SDK to continue with the association process. + * + * @return self + */ + public function setSdkInput($sdkInput) + { + $this->container['sdkInput'] = $sdkInput; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/NetworkToken.php b/src/Adyen/Model/BalancePlatform/NetworkToken.php index 40088296e..f4c619b91 100644 --- a/src/Adyen/Model/BalancePlatform/NetworkToken.php +++ b/src/Adyen/Model/BalancePlatform/NetworkToken.php @@ -543,7 +543,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of wallet the network token is associated with. For example, **applePay**. + * @param string|null $type The type of network token. For example, **wallet**, **cof**. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/PriorityRestriction.php b/src/Adyen/Model/BalancePlatform/TokenRequestorsRestriction.php similarity index 90% rename from src/Adyen/Model/BalancePlatform/PriorityRestriction.php rename to src/Adyen/Model/BalancePlatform/TokenRequestorsRestriction.php index 096a642e7..d64d4fdab 100644 --- a/src/Adyen/Model/BalancePlatform/PriorityRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TokenRequestorsRestriction.php @@ -19,7 +19,7 @@ use Adyen\Model\BalancePlatform\ObjectSerializer; /** - * PriorityRestriction Class Doc Comment + * TokenRequestorsRestriction Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class PriorityRestriction implements ModelInterface, ArrayAccess, \JsonSerializable +class TokenRequestorsRestriction implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class PriorityRestriction implements ModelInterface, ArrayAccess, \JsonSerializa * * @var string */ - protected static $openAPIModelName = 'PriorityRestriction'; + protected static $openAPIModelName = 'TokenRequestorsRestriction'; /** * Array of property to type mappings. Used for (de)serialization @@ -221,27 +221,7 @@ public function getModelName() return self::$openAPIModelName; } - public const VALUE_CROSS_BORDER = 'crossBorder'; - public const VALUE_FAST = 'fast'; - public const VALUE_INSTANT = 'instant'; - public const VALUE_INTRA_BANK = 'intraBank'; - public const VALUE_REGULAR = 'regular'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getValueAllowableValues() - { - return [ - self::VALUE_CROSS_BORDER, - self::VALUE_FAST, - self::VALUE_INSTANT, - self::VALUE_INTRA_BANK, - self::VALUE_REGULAR, - ]; - } /** * Associative array for storing property values * @@ -349,15 +329,6 @@ public function getValue() */ public function setValue($value) { - $allowedValues = $this->getValueAllowableValues(); - if (array_diff($value, $allowedValues)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'value', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 5ec2fc905..6021835b8 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -58,13 +58,13 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'mccs' => '\Adyen\Model\BalancePlatform\MccsRestriction', 'merchantNames' => '\Adyen\Model\BalancePlatform\MerchantNamesRestriction', 'merchants' => '\Adyen\Model\BalancePlatform\MerchantsRestriction', - 'priority' => '\Adyen\Model\BalancePlatform\PriorityRestriction', 'processingTypes' => '\Adyen\Model\BalancePlatform\ProcessingTypesRestriction', 'riskScores' => '\Adyen\Model\BalancePlatform\RiskScoresRestriction', 'sameAmountRestriction' => '\Adyen\Model\BalancePlatform\SameAmountRestriction', 'sameCounterpartyRestriction' => '\Adyen\Model\BalancePlatform\SameCounterpartyRestriction', 'sourceAccountTypes' => '\Adyen\Model\BalancePlatform\SourceAccountTypesRestriction', 'timeOfDay' => '\Adyen\Model\BalancePlatform\TimeOfDayRestriction', + 'tokenRequestors' => '\Adyen\Model\BalancePlatform\TokenRequestorsRestriction', 'totalAmount' => '\Adyen\Model\BalancePlatform\TotalAmountRestriction' ]; @@ -90,13 +90,13 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'mccs' => null, 'merchantNames' => null, 'merchants' => null, - 'priority' => null, 'processingTypes' => null, 'riskScores' => null, 'sameAmountRestriction' => null, 'sameCounterpartyRestriction' => null, 'sourceAccountTypes' => null, 'timeOfDay' => null, + 'tokenRequestors' => null, 'totalAmount' => null ]; @@ -120,13 +120,13 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'mccs' => false, 'merchantNames' => false, 'merchants' => false, - 'priority' => false, 'processingTypes' => false, 'riskScores' => false, 'sameAmountRestriction' => false, 'sameCounterpartyRestriction' => false, 'sourceAccountTypes' => false, 'timeOfDay' => false, + 'tokenRequestors' => false, 'totalAmount' => false ]; @@ -230,13 +230,13 @@ public function isNullableSetToNull(string $property): bool 'mccs' => 'mccs', 'merchantNames' => 'merchantNames', 'merchants' => 'merchants', - 'priority' => 'priority', 'processingTypes' => 'processingTypes', 'riskScores' => 'riskScores', 'sameAmountRestriction' => 'sameAmountRestriction', 'sameCounterpartyRestriction' => 'sameCounterpartyRestriction', 'sourceAccountTypes' => 'sourceAccountTypes', 'timeOfDay' => 'timeOfDay', + 'tokenRequestors' => 'tokenRequestors', 'totalAmount' => 'totalAmount' ]; @@ -260,13 +260,13 @@ public function isNullableSetToNull(string $property): bool 'mccs' => 'setMccs', 'merchantNames' => 'setMerchantNames', 'merchants' => 'setMerchants', - 'priority' => 'setPriority', 'processingTypes' => 'setProcessingTypes', 'riskScores' => 'setRiskScores', 'sameAmountRestriction' => 'setSameAmountRestriction', 'sameCounterpartyRestriction' => 'setSameCounterpartyRestriction', 'sourceAccountTypes' => 'setSourceAccountTypes', 'timeOfDay' => 'setTimeOfDay', + 'tokenRequestors' => 'setTokenRequestors', 'totalAmount' => 'setTotalAmount' ]; @@ -290,13 +290,13 @@ public function isNullableSetToNull(string $property): bool 'mccs' => 'getMccs', 'merchantNames' => 'getMerchantNames', 'merchants' => 'getMerchants', - 'priority' => 'getPriority', 'processingTypes' => 'getProcessingTypes', 'riskScores' => 'getRiskScores', 'sameAmountRestriction' => 'getSameAmountRestriction', 'sameCounterpartyRestriction' => 'getSameCounterpartyRestriction', 'sourceAccountTypes' => 'getSourceAccountTypes', 'timeOfDay' => 'getTimeOfDay', + 'tokenRequestors' => 'getTokenRequestors', 'totalAmount' => 'getTotalAmount' ]; @@ -371,13 +371,13 @@ public function __construct(array $data = null) $this->setIfExists('mccs', $data ?? [], null); $this->setIfExists('merchantNames', $data ?? [], null); $this->setIfExists('merchants', $data ?? [], null); - $this->setIfExists('priority', $data ?? [], null); $this->setIfExists('processingTypes', $data ?? [], null); $this->setIfExists('riskScores', $data ?? [], null); $this->setIfExists('sameAmountRestriction', $data ?? [], null); $this->setIfExists('sameCounterpartyRestriction', $data ?? [], null); $this->setIfExists('sourceAccountTypes', $data ?? [], null); $this->setIfExists('timeOfDay', $data ?? [], null); + $this->setIfExists('tokenRequestors', $data ?? [], null); $this->setIfExists('totalAmount', $data ?? [], null); } @@ -759,30 +759,6 @@ public function setMerchants($merchants) return $this; } - /** - * Gets priority - * - * @return \Adyen\Model\BalancePlatform\PriorityRestriction|null - */ - public function getPriority() - { - return $this->container['priority']; - } - - /** - * Sets priority - * - * @param \Adyen\Model\BalancePlatform\PriorityRestriction|null $priority priority - * - * @return self - */ - public function setPriority($priority) - { - $this->container['priority'] = $priority; - - return $this; - } - /** * Gets processingTypes * @@ -927,6 +903,30 @@ public function setTimeOfDay($timeOfDay) return $this; } + /** + * Gets tokenRequestors + * + * @return \Adyen\Model\BalancePlatform\TokenRequestorsRestriction|null + */ + public function getTokenRequestors() + { + return $this->container['tokenRequestors']; + } + + /** + * Sets tokenRequestors + * + * @param \Adyen\Model\BalancePlatform\TokenRequestorsRestriction|null $tokenRequestors tokenRequestors + * + * @return self + */ + public function setTokenRequestors($tokenRequestors) + { + $this->container['tokenRequestors'] = $tokenRequestors; + + return $this; + } + /** * Gets totalAmount * diff --git a/src/Adyen/Model/BinLookup/CostEstimateResponse.php b/src/Adyen/Model/BinLookup/CostEstimateResponse.php index a658d059f..6b93f7add 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateResponse.php +++ b/src/Adyen/Model/BinLookup/CostEstimateResponse.php @@ -47,8 +47,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'cardBin' => '\Adyen\Model\BinLookup\CardBin', 'costEstimateAmount' => '\Adyen\Model\BinLookup\Amount', 'costEstimateReference' => 'string', - 'resultCode' => 'string', - 'surchargeType' => 'string' + 'resultCode' => 'string' ]; /** @@ -62,8 +61,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'cardBin' => null, 'costEstimateAmount' => null, 'costEstimateReference' => null, - 'resultCode' => null, - 'surchargeType' => null + 'resultCode' => null ]; /** @@ -75,8 +73,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'cardBin' => false, 'costEstimateAmount' => false, 'costEstimateReference' => false, - 'resultCode' => false, - 'surchargeType' => false + 'resultCode' => false ]; /** @@ -168,8 +165,7 @@ public function isNullableSetToNull(string $property): bool 'cardBin' => 'cardBin', 'costEstimateAmount' => 'costEstimateAmount', 'costEstimateReference' => 'costEstimateReference', - 'resultCode' => 'resultCode', - 'surchargeType' => 'surchargeType' + 'resultCode' => 'resultCode' ]; /** @@ -181,8 +177,7 @@ public function isNullableSetToNull(string $property): bool 'cardBin' => 'setCardBin', 'costEstimateAmount' => 'setCostEstimateAmount', 'costEstimateReference' => 'setCostEstimateReference', - 'resultCode' => 'setResultCode', - 'surchargeType' => 'setSurchargeType' + 'resultCode' => 'setResultCode' ]; /** @@ -194,8 +189,7 @@ public function isNullableSetToNull(string $property): bool 'cardBin' => 'getCardBin', 'costEstimateAmount' => 'getCostEstimateAmount', 'costEstimateReference' => 'getCostEstimateReference', - 'resultCode' => 'getResultCode', - 'surchargeType' => 'getSurchargeType' + 'resultCode' => 'getResultCode' ]; /** @@ -259,7 +253,6 @@ public function __construct(array $data = null) $this->setIfExists('costEstimateAmount', $data ?? [], null); $this->setIfExists('costEstimateReference', $data ?? [], null); $this->setIfExists('resultCode', $data ?? [], null); - $this->setIfExists('surchargeType', $data ?? [], null); } /** @@ -399,30 +392,6 @@ public function setResultCode($resultCode) return $this; } - - /** - * Gets surchargeType - * - * @return string|null - */ - public function getSurchargeType() - { - return $this->container['surchargeType']; - } - - /** - * Sets surchargeType - * - * @param string|null $surchargeType Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on - * - * @return self - */ - public function setSurchargeType($surchargeType) - { - $this->container['surchargeType'] = $surchargeType; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 26f122e7c..35bd3eeff 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -55,6 +55,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'fundingSource' => 'string', 'holderName' => 'string', 'networkPaymentReference' => 'string', @@ -89,6 +90,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'fundingSource' => null, 'holderName' => null, 'networkPaymentReference' => null, @@ -121,6 +123,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'fundingSource' => false, 'holderName' => false, 'networkPaymentReference' => false, @@ -233,6 +236,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'fundingSource' => 'fundingSource', 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', @@ -265,6 +269,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'fundingSource' => 'setFundingSource', 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', @@ -297,6 +302,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'fundingSource' => 'getFundingSource', 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', @@ -416,6 +422,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); @@ -757,6 +764,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string|null + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string|null $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets fundingSource * diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index 5c54e8305..44d29d7b4 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -55,6 +55,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'fundingSource' => 'string', 'holderName' => 'string', 'networkPaymentReference' => 'string', @@ -89,6 +90,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'fundingSource' => null, 'holderName' => null, 'networkPaymentReference' => null, @@ -121,6 +123,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'fundingSource' => false, 'holderName' => false, 'networkPaymentReference' => false, @@ -233,6 +236,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'fundingSource' => 'fundingSource', 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', @@ -265,6 +269,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'fundingSource' => 'setFundingSource', 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', @@ -297,6 +302,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'fundingSource' => 'getFundingSource', 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', @@ -416,6 +422,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); @@ -757,6 +764,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string|null + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string|null $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets fundingSource * diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 4e5465218..970aae68a 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -77,6 +77,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'networkPaymentReference' => 'string', 'number' => 'string', 'shopperNotificationReference' => 'string', @@ -159,6 +160,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'networkPaymentReference' => null, 'number' => null, 'shopperNotificationReference' => null, @@ -239,6 +241,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'networkPaymentReference' => false, 'number' => false, 'shopperNotificationReference' => false, @@ -399,6 +402,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', @@ -479,6 +483,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', @@ -559,6 +564,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', @@ -689,6 +695,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); @@ -773,6 +780,9 @@ public function listInvalidProperties() if ($this->container['issuer'] === null) { $invalidProperties[] = "'issuer' can't be null"; } + if ($this->container['fastlaneData'] === null) { + $invalidProperties[] = "'fastlaneData' can't be null"; + } if ($this->container['firstName'] === null) { $invalidProperties[] = "'firstName' can't be null"; } @@ -1602,6 +1612,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets networkPaymentReference * diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index 690744aa9..9347e8388 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -61,6 +61,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'holderName' => 'string', 'networkPaymentReference' => 'string', 'number' => 'string', @@ -99,6 +100,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'holderName' => null, 'networkPaymentReference' => null, 'number' => null, @@ -135,6 +137,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'holderName' => false, 'networkPaymentReference' => false, 'number' => false, @@ -251,6 +254,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', @@ -287,6 +291,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', @@ -323,6 +328,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', @@ -409,6 +415,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); @@ -861,6 +868,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string|null + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string|null $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets holderName * diff --git a/src/Adyen/Model/Checkout/FastlaneDetails.php b/src/Adyen/Model/Checkout/FastlaneDetails.php new file mode 100644 index 000000000..95a3271db --- /dev/null +++ b/src/Adyen/Model/Checkout/FastlaneDetails.php @@ -0,0 +1,570 @@ + + */ +class FastlaneDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FastlaneDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'fastlaneData' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'fastlaneData' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'fastlaneData' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fastlaneData' => 'fastlaneData', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fastlaneData' => 'setFastlaneData', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fastlaneData' => 'getFastlaneData', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_FASTLANE = 'fastlane'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_FASTLANE, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fastlaneData'] === null) { + $invalidProperties[] = "'fastlaneData' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets fastlaneData + * + * @return string + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **fastlane** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php index 6dd33f19c..b0ba19462 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php @@ -646,7 +646,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/FinancialReport.php b/src/Adyen/Model/LegalEntityManagement/FinancialReport.php new file mode 100644 index 000000000..2e4786712 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/FinancialReport.php @@ -0,0 +1,562 @@ + + */ +class FinancialReport implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FinancialReport'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'annualTurnover' => 'string', + 'balanceSheetTotal' => 'string', + 'currencyOfFinancialData' => 'string', + 'dateOfFinancialData' => 'string', + 'employeeCount' => 'string', + 'netAssets' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'annualTurnover' => null, + 'balanceSheetTotal' => null, + 'currencyOfFinancialData' => null, + 'dateOfFinancialData' => null, + 'employeeCount' => null, + 'netAssets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'annualTurnover' => false, + 'balanceSheetTotal' => false, + 'currencyOfFinancialData' => false, + 'dateOfFinancialData' => false, + 'employeeCount' => false, + 'netAssets' => 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 = [ + 'annualTurnover' => 'annualTurnover', + 'balanceSheetTotal' => 'balanceSheetTotal', + 'currencyOfFinancialData' => 'currencyOfFinancialData', + 'dateOfFinancialData' => 'dateOfFinancialData', + 'employeeCount' => 'employeeCount', + 'netAssets' => 'netAssets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'annualTurnover' => 'setAnnualTurnover', + 'balanceSheetTotal' => 'setBalanceSheetTotal', + 'currencyOfFinancialData' => 'setCurrencyOfFinancialData', + 'dateOfFinancialData' => 'setDateOfFinancialData', + 'employeeCount' => 'setEmployeeCount', + 'netAssets' => 'setNetAssets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'annualTurnover' => 'getAnnualTurnover', + 'balanceSheetTotal' => 'getBalanceSheetTotal', + 'currencyOfFinancialData' => 'getCurrencyOfFinancialData', + 'dateOfFinancialData' => 'getDateOfFinancialData', + 'employeeCount' => 'getEmployeeCount', + 'netAssets' => 'getNetAssets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('annualTurnover', $data ?? [], null); + $this->setIfExists('balanceSheetTotal', $data ?? [], null); + $this->setIfExists('currencyOfFinancialData', $data ?? [], null); + $this->setIfExists('dateOfFinancialData', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('netAssets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets annualTurnover + * + * @return string|null + */ + public function getAnnualTurnover() + { + return $this->container['annualTurnover']; + } + + /** + * Sets annualTurnover + * + * @param string|null $annualTurnover The annual turnover of the business. + * + * @return self + */ + public function setAnnualTurnover($annualTurnover) + { + $this->container['annualTurnover'] = $annualTurnover; + + return $this; + } + + /** + * Gets balanceSheetTotal + * + * @return string|null + */ + public function getBalanceSheetTotal() + { + return $this->container['balanceSheetTotal']; + } + + /** + * Sets balanceSheetTotal + * + * @param string|null $balanceSheetTotal The balance sheet total of the business. + * + * @return self + */ + public function setBalanceSheetTotal($balanceSheetTotal) + { + $this->container['balanceSheetTotal'] = $balanceSheetTotal; + + return $this; + } + + /** + * Gets currencyOfFinancialData + * + * @return string|null + */ + public function getCurrencyOfFinancialData() + { + return $this->container['currencyOfFinancialData']; + } + + /** + * Sets currencyOfFinancialData + * + * @param string|null $currencyOfFinancialData The currency used for the net assets and balance sheet total. + * + * @return self + */ + public function setCurrencyOfFinancialData($currencyOfFinancialData) + { + $this->container['currencyOfFinancialData'] = $currencyOfFinancialData; + + return $this; + } + + /** + * Gets dateOfFinancialData + * + * @return string|null + */ + public function getDateOfFinancialData() + { + return $this->container['dateOfFinancialData']; + } + + /** + * Sets dateOfFinancialData + * + * @param string|null $dateOfFinancialData The date the financial data were provided, in YYYY-MM-DD format. + * + * @return self + */ + public function setDateOfFinancialData($dateOfFinancialData) + { + $this->container['dateOfFinancialData'] = $dateOfFinancialData; + + return $this; + } + + /** + * Gets employeeCount + * + * @return string|null + */ + public function getEmployeeCount() + { + return $this->container['employeeCount']; + } + + /** + * Sets employeeCount + * + * @param string|null $employeeCount The number of employees of the business. + * + * @return self + */ + public function setEmployeeCount($employeeCount) + { + $this->container['employeeCount'] = $employeeCount; + + return $this; + } + + /** + * Gets netAssets + * + * @return string|null + */ + public function getNetAssets() + { + return $this->container['netAssets']; + } + + /** + * Sets netAssets + * + * @param string|null $netAssets The net assets of the business. + * + * @return self + */ + public function setNetAssets($netAssets) + { + $this->container['netAssets'] = $netAssets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 90db63d9f..a54827807 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', + 'nominee' => 'bool', 'relationship' => 'string', 'settlorExemptionReason' => 'string[]', 'type' => 'string' @@ -67,6 +68,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => null, 'legalEntityId' => null, 'name' => null, + 'nominee' => null, 'relationship' => null, 'settlorExemptionReason' => null, 'type' => null @@ -83,6 +85,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => false, 'legalEntityId' => false, 'name' => false, + 'nominee' => false, 'relationship' => false, 'settlorExemptionReason' => false, 'type' => false @@ -179,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'jobTitle', 'legalEntityId' => 'legalEntityId', 'name' => 'name', + 'nominee' => 'nominee', 'relationship' => 'relationship', 'settlorExemptionReason' => 'settlorExemptionReason', 'type' => 'type' @@ -195,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'setJobTitle', 'legalEntityId' => 'setLegalEntityId', 'name' => 'setName', + 'nominee' => 'setNominee', 'relationship' => 'setRelationship', 'settlorExemptionReason' => 'setSettlorExemptionReason', 'type' => 'setType' @@ -211,6 +216,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'getJobTitle', 'legalEntityId' => 'getLegalEntityId', 'name' => 'getName', + 'nominee' => 'getNominee', 'relationship' => 'getRelationship', 'settlorExemptionReason' => 'getSettlorExemptionReason', 'type' => 'getType' @@ -324,6 +330,7 @@ public function __construct(array $data = null) $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nominee', $data ?? [], null); $this->setIfExists('relationship', $data ?? [], null); $this->setIfExists('settlorExemptionReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -506,6 +513,30 @@ public function setName($name) return $this; } + /** + * Gets nominee + * + * @return bool|null + */ + public function getNominee() + { + return $this->container['nominee']; + } + + /** + * Sets nominee + * + * @param bool|null $nominee Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. + * + * @return self + */ + public function setNominee($nominee) + { + $this->container['nominee'] = $nominee; + + return $this; + } + /** * Gets relationship * diff --git a/src/Adyen/Model/LegalEntityManagement/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index 8d7b95902..fd32d9aef 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -49,6 +49,7 @@ class Organization implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => 'string', 'doingBusinessAs' => 'string', 'email' => 'string', + 'financialReports' => '\Adyen\Model\LegalEntityManagement\FinancialReport[]', 'legalName' => 'string', 'phone' => '\Adyen\Model\LegalEntityManagement\PhoneNumber', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -76,6 +77,7 @@ class Organization implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => null, 'doingBusinessAs' => null, 'email' => null, + 'financialReports' => null, 'legalName' => null, 'phone' => null, 'principalPlaceOfBusiness' => null, @@ -101,6 +103,7 @@ class Organization implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => false, 'doingBusinessAs' => false, 'email' => false, + 'financialReports' => false, 'legalName' => false, 'phone' => false, 'principalPlaceOfBusiness' => false, @@ -206,6 +209,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'email' => 'email', + 'financialReports' => 'financialReports', 'legalName' => 'legalName', 'phone' => 'phone', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -231,6 +235,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'email' => 'setEmail', + 'financialReports' => 'setFinancialReports', 'legalName' => 'setLegalName', 'phone' => 'setPhone', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -256,6 +261,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'email' => 'getEmail', + 'financialReports' => 'getFinancialReports', 'legalName' => 'getLegalName', 'phone' => 'getPhone', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -368,6 +374,7 @@ public function __construct(array $data = null) $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('financialReports', $data ?? [], null); $this->setIfExists('legalName', $data ?? [], null); $this->setIfExists('phone', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -568,6 +575,30 @@ public function setEmail($email) return $this; } + /** + * Gets financialReports + * + * @return \Adyen\Model\LegalEntityManagement\FinancialReport[]|null + */ + public function getFinancialReports() + { + return $this->container['financialReports']; + } + + /** + * Sets financialReports + * + * @param \Adyen\Model\LegalEntityManagement\FinancialReport[]|null $financialReports The financial report information of the organization. + * + * @return self + */ + public function setFinancialReports($financialReports) + { + $this->container['financialReports'] = $financialReports; + + return $this; + } + /** * Gets legalName * diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 9ec848f99..e810c983a 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -47,6 +47,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', 'doingBusinessAs' => 'string', + 'financialReports' => '\Adyen\Model\LegalEntityManagement\FinancialReport[]', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', @@ -68,6 +69,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, 'doingBusinessAs' => null, + 'financialReports' => null, 'name' => null, 'principalPlaceOfBusiness' => null, 'registeredAddress' => null, @@ -87,6 +89,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, 'doingBusinessAs' => false, + 'financialReports' => false, 'name' => false, 'principalPlaceOfBusiness' => false, 'registeredAddress' => false, @@ -186,6 +189,7 @@ public function isNullableSetToNull(string $property): bool 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', 'doingBusinessAs' => 'doingBusinessAs', + 'financialReports' => 'financialReports', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', 'registeredAddress' => 'registeredAddress', @@ -205,6 +209,7 @@ public function isNullableSetToNull(string $property): bool 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', 'doingBusinessAs' => 'setDoingBusinessAs', + 'financialReports' => 'setFinancialReports', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', 'registeredAddress' => 'setRegisteredAddress', @@ -224,6 +229,7 @@ public function isNullableSetToNull(string $property): bool 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', 'doingBusinessAs' => 'getDoingBusinessAs', + 'financialReports' => 'getFinancialReports', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', 'registeredAddress' => 'getRegisteredAddress', @@ -308,6 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); + $this->setIfExists('financialReports', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); $this->setIfExists('registeredAddress', $data ?? [], null); @@ -450,6 +457,30 @@ public function setDoingBusinessAs($doingBusinessAs) return $this; } + /** + * Gets financialReports + * + * @return \Adyen\Model\LegalEntityManagement\FinancialReport[]|null + */ + public function getFinancialReports() + { + return $this->container['financialReports']; + } + + /** + * Sets financialReports + * + * @param \Adyen\Model\LegalEntityManagement\FinancialReport[]|null $financialReports The information from the financial report of the sole proprietorship. + * + * @return self + */ + public function setFinancialReports($financialReports) + { + $this->container['financialReports'] = $financialReports; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php index 201e411cd..40bdd3233 100644 --- a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php +++ b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php @@ -332,7 +332,7 @@ public function getAcquiringBusinessLineId() /** * Sets acquiringBusinessLineId * - * @param string|null $acquiringBusinessLineId The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. + * @param string|null $acquiringBusinessLineId The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. * * @return self * @deprecated since Legal Entity Management API v3. "This field will be removed in v4." diff --git a/src/Adyen/Model/TransferWebhooks/TransferReview.php b/src/Adyen/Model/TransferWebhooks/TransferReview.php index 0a5e192ba..a655c0ede 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferReview.php +++ b/src/Adyen/Model/TransferWebhooks/TransferReview.php @@ -44,9 +44,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'numberOfApprovalsCompleted' => 'int', - 'numberOfApprovalsRequired' => 'int', - 'scaOnApproval' => 'string' + 'numberOfApprovalsRequired' => 'int' ]; /** @@ -57,9 +55,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'numberOfApprovalsCompleted' => 'int32', - 'numberOfApprovalsRequired' => 'int32', - 'scaOnApproval' => null + 'numberOfApprovalsRequired' => 'int32' ]; /** @@ -68,9 +64,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'numberOfApprovalsCompleted' => true, - 'numberOfApprovalsRequired' => true, - 'scaOnApproval' => false + 'numberOfApprovalsRequired' => true ]; /** @@ -159,9 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'numberOfApprovalsCompleted' => 'numberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired', - 'scaOnApproval' => 'scaOnApproval' + 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired' ]; /** @@ -170,9 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'numberOfApprovalsCompleted' => 'setNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired', - 'scaOnApproval' => 'setScaOnApproval' + 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired' ]; /** @@ -181,9 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'numberOfApprovalsCompleted' => 'getNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired', - 'scaOnApproval' => 'getScaOnApproval' + 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired' ]; /** @@ -227,23 +215,7 @@ public function getModelName() return self::$openAPIModelName; } - public const SCA_ON_APPROVAL_COMPLETED = 'completed'; - public const SCA_ON_APPROVAL_NOT_APPLICABLE = 'notApplicable'; - public const SCA_ON_APPROVAL_REQUIRED = 'required'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getScaOnApprovalAllowableValues() - { - return [ - self::SCA_ON_APPROVAL_COMPLETED, - self::SCA_ON_APPROVAL_NOT_APPLICABLE, - self::SCA_ON_APPROVAL_REQUIRED, - ]; - } /** * Associative array for storing property values * @@ -259,9 +231,7 @@ public function getScaOnApprovalAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('numberOfApprovalsCompleted', $data ?? [], null); $this->setIfExists('numberOfApprovalsRequired', $data ?? [], null); - $this->setIfExists('scaOnApproval', $data ?? [], null); } /** @@ -291,15 +261,6 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!is_null($this->container['scaOnApproval']) && !in_array($this->container['scaOnApproval'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $this->container['scaOnApproval'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -315,30 +276,6 @@ public function valid() } - /** - * Gets numberOfApprovalsCompleted - * - * @return int|null - */ - public function getNumberOfApprovalsCompleted() - { - return $this->container['numberOfApprovalsCompleted']; - } - - /** - * Sets numberOfApprovalsCompleted - * - * @param int|null $numberOfApprovalsCompleted Shows the number of approvals completed for the transfer. - * - * @return self - */ - public function setNumberOfApprovalsCompleted($numberOfApprovalsCompleted) - { - $this->container['numberOfApprovalsCompleted'] = $numberOfApprovalsCompleted; - - return $this; - } - /** * Gets numberOfApprovalsRequired * @@ -362,40 +299,6 @@ public function setNumberOfApprovalsRequired($numberOfApprovalsRequired) return $this; } - - /** - * Gets scaOnApproval - * - * @return string|null - */ - public function getScaOnApproval() - { - return $this->container['scaOnApproval']; - } - - /** - * Sets scaOnApproval - * - * @param string|null $scaOnApproval Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @return self - */ - public function setScaOnApproval($scaOnApproval) - { - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!in_array($scaOnApproval, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $scaOnApproval, - implode("', '", $allowedValues) - ) - ); - } - $this->container['scaOnApproval'] = $scaOnApproval; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Transfers/TransferReview.php b/src/Adyen/Model/Transfers/TransferReview.php index 15bc6bfed..f07fed4be 100644 --- a/src/Adyen/Model/Transfers/TransferReview.php +++ b/src/Adyen/Model/Transfers/TransferReview.php @@ -44,9 +44,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'numberOfApprovalsCompleted' => 'int', - 'numberOfApprovalsRequired' => 'int', - 'scaOnApproval' => 'string' + 'numberOfApprovalsRequired' => 'int' ]; /** @@ -57,9 +55,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'numberOfApprovalsCompleted' => 'int32', - 'numberOfApprovalsRequired' => 'int32', - 'scaOnApproval' => null + 'numberOfApprovalsRequired' => 'int32' ]; /** @@ -68,9 +64,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'numberOfApprovalsCompleted' => true, - 'numberOfApprovalsRequired' => true, - 'scaOnApproval' => false + 'numberOfApprovalsRequired' => true ]; /** @@ -159,9 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'numberOfApprovalsCompleted' => 'numberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired', - 'scaOnApproval' => 'scaOnApproval' + 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired' ]; /** @@ -170,9 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'numberOfApprovalsCompleted' => 'setNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired', - 'scaOnApproval' => 'setScaOnApproval' + 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired' ]; /** @@ -181,9 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'numberOfApprovalsCompleted' => 'getNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired', - 'scaOnApproval' => 'getScaOnApproval' + 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired' ]; /** @@ -227,23 +215,7 @@ public function getModelName() return self::$openAPIModelName; } - public const SCA_ON_APPROVAL_COMPLETED = 'completed'; - public const SCA_ON_APPROVAL_NOT_APPLICABLE = 'notApplicable'; - public const SCA_ON_APPROVAL_REQUIRED = 'required'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getScaOnApprovalAllowableValues() - { - return [ - self::SCA_ON_APPROVAL_COMPLETED, - self::SCA_ON_APPROVAL_NOT_APPLICABLE, - self::SCA_ON_APPROVAL_REQUIRED, - ]; - } /** * Associative array for storing property values * @@ -259,9 +231,7 @@ public function getScaOnApprovalAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('numberOfApprovalsCompleted', $data ?? [], null); $this->setIfExists('numberOfApprovalsRequired', $data ?? [], null); - $this->setIfExists('scaOnApproval', $data ?? [], null); } /** @@ -291,15 +261,6 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!is_null($this->container['scaOnApproval']) && !in_array($this->container['scaOnApproval'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $this->container['scaOnApproval'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -315,30 +276,6 @@ public function valid() } - /** - * Gets numberOfApprovalsCompleted - * - * @return int|null - */ - public function getNumberOfApprovalsCompleted() - { - return $this->container['numberOfApprovalsCompleted']; - } - - /** - * Sets numberOfApprovalsCompleted - * - * @param int|null $numberOfApprovalsCompleted Shows the number of approvals completed for the transfer. - * - * @return self - */ - public function setNumberOfApprovalsCompleted($numberOfApprovalsCompleted) - { - $this->container['numberOfApprovalsCompleted'] = $numberOfApprovalsCompleted; - - return $this; - } - /** * Gets numberOfApprovalsRequired * @@ -362,40 +299,6 @@ public function setNumberOfApprovalsRequired($numberOfApprovalsRequired) return $this; } - - /** - * Gets scaOnApproval - * - * @return string|null - */ - public function getScaOnApproval() - { - return $this->container['scaOnApproval']; - } - - /** - * Sets scaOnApproval - * - * @param string|null $scaOnApproval Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @return self - */ - public function setScaOnApproval($scaOnApproval) - { - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!in_array($scaOnApproval, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $scaOnApproval, - implode("', '", $allowedValues) - ) - ); - } - $this->container['scaOnApproval'] = $scaOnApproval; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php b/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php index db4742658..204e1220a 100644 --- a/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php @@ -42,6 +42,7 @@ public function __construct(Client $client) /** * Get a grant account * + * @deprecated since Configuration API v2. "Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead." * @param string $id * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\CapitalGrantAccount diff --git a/src/Adyen/Service/BalancePlatform/GrantOffersApi.php b/src/Adyen/Service/BalancePlatform/GrantOffersApi.php index 895f3b39c..0dd316d66 100644 --- a/src/Adyen/Service/BalancePlatform/GrantOffersApi.php +++ b/src/Adyen/Service/BalancePlatform/GrantOffersApi.php @@ -42,6 +42,7 @@ public function __construct(Client $client) /** * Get all available grant offers * + * @deprecated since Configuration API v2. "Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead." * @param array|null $requestOptions ['queryParams' => ['accountHolderId'=> string]] * @return \Adyen\Model\BalancePlatform\GrantOffers * @throws AdyenException @@ -56,6 +57,7 @@ public function getAllAvailableGrantOffers(array $requestOptions = null): \Adyen /** * Get a grant offer * + * @deprecated since Configuration API v2. "Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead." * @param string $grantOfferId * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\GrantOffer diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index df3b7a28a..a0f18f360 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -39,6 +39,22 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); } + /** + * Complete an association between an SCA device and a resource + * + * @param string $deviceId + * @param \Adyen\Model\BalancePlatform\AssociationFinaliseRequest $associationFinaliseRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\AssociationFinaliseResponse + * @throws AdyenException + */ + public function completeAssociationBetweenScaDeviceAndResource(string $deviceId, \Adyen\Model\BalancePlatform\AssociationFinaliseRequest $associationFinaliseRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\AssociationFinaliseResponse + { + $endpoint = $this->baseURL . str_replace(['{deviceId}'], [$deviceId], "/registeredDevices/{deviceId}/associations"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $associationFinaliseRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\AssociationFinaliseResponse::class); + } + /** * Complete the registration of an SCA device * @@ -69,6 +85,22 @@ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); } + /** + * Initiate an association between an SCA device and a resource + * + * @param string $deviceId + * @param \Adyen\Model\BalancePlatform\AssociationInitiateRequest $associationInitiateRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\AssociationInitiateResponse + * @throws AdyenException + */ + public function initiateAssociationBetweenScaDeviceAndResource(string $deviceId, \Adyen\Model\BalancePlatform\AssociationInitiateRequest $associationInitiateRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\AssociationInitiateResponse + { + $endpoint = $this->baseURL . str_replace(['{deviceId}'], [$deviceId], "/registeredDevices/{deviceId}/associations"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $associationInitiateRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\AssociationInitiateResponse::class); + } + /** * Initiate the registration of an SCA device * diff --git a/src/Adyen/Service/Transfers/CapitalApi.php b/src/Adyen/Service/Transfers/CapitalApi.php index ecb1614fe..967dc7f76 100644 --- a/src/Adyen/Service/Transfers/CapitalApi.php +++ b/src/Adyen/Service/Transfers/CapitalApi.php @@ -42,6 +42,7 @@ public function __construct(Client $client) /** * Get a capital account * + * @deprecated since Transfers API v4. "Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead." * @param array|null $requestOptions ['queryParams' => ['counterpartyAccountHolderId'=> string]] * @return \Adyen\Model\Transfers\CapitalGrants * @throws AdyenException @@ -56,6 +57,7 @@ public function getCapitalAccount(array $requestOptions = null): \Adyen\Model\Tr /** * Get grant reference details * + * @deprecated since Transfers API v4. "Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead." * @param string $id * @param array|null $requestOptions * @return \Adyen\Model\Transfers\CapitalGrant @@ -71,6 +73,7 @@ public function getGrantReferenceDetails(string $id, array $requestOptions = nul /** * Request a grant payout * + * @deprecated since Transfers API v4. "Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead." * @param \Adyen\Model\Transfers\CapitalGrantInfo $capitalGrantInfo * @param array|null $requestOptions * @return \Adyen\Model\Transfers\CapitalGrant