diff --git a/src/Adyen/Model/Management/AlipayPlusInfo.php b/src/Adyen/Model/Management/AlipayPlusInfo.php index a3fa3869c..2a8cc222c 100644 --- a/src/Adyen/Model/Management/AlipayPlusInfo.php +++ b/src/Adyen/Model/Management/AlipayPlusInfo.php @@ -286,7 +286,7 @@ public function getSettlementCurrencyCode() /** * Sets settlementCurrencyCode * - * @param string|null $settlementCurrencyCode currency used for settlement. Defaults to USD + * @param string|null $settlementCurrencyCode The currency used for settlement. Defaults to USD. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index 8baf1b4d6..8bc0eaa60 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -859,7 +859,7 @@ public function getType() /** * Sets type * - * @param string $type The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + * @param string $type The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types/#event-codes) and [other types of webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types/#other-webhooks). * * @return self */ diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index 9dafcb46d..a29535b04 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -756,7 +756,7 @@ public function getType() /** * Sets type * - * @param string $type The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + * @param string $type The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types/#event-codes) and [other types of webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types/#other-webhooks). * * @return self */ diff --git a/src/Adyen/Model/Management/PayByBankPlaidInfo.php b/src/Adyen/Model/Management/PayByBankPlaidInfo.php index c4b20cf93..c9985ad57 100644 --- a/src/Adyen/Model/Management/PayByBankPlaidInfo.php +++ b/src/Adyen/Model/Management/PayByBankPlaidInfo.php @@ -29,17 +29,17 @@ class PayByBankPlaidInfo implements ModelInterface, ArrayAccess, \JsonSerializab public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'PayByBankPlaidInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'countryCode' => 'string', 'logo' => 'string', @@ -53,12 +53,12 @@ class PayByBankPlaidInfo implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'countryCode' => null, 'logo' => null, @@ -72,10 +72,10 @@ class PayByBankPlaidInfo implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static $openAPINullables = [ 'countryCode' => false, 'logo' => false, @@ -89,10 +89,10 @@ class PayByBankPlaidInfo implements ModelInterface, ArrayAccess, \JsonSerializab ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected $openAPINullablesSetToNull = []; /** @@ -288,14 +288,14 @@ public function __construct(?array $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 - */ + * 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])) { @@ -620,10 +620,10 @@ public function toArray(): array // 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 + // 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 + // 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; diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 8dae25117..e3e2152a9 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -79,6 +79,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'payto' => '\Adyen\Model\Management\PayToInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', + 'sepadirectdebit' => '\Adyen\Model\Management\SepaDirectDebitInfo', 'shopperInteraction' => 'string', 'sodexo' => '\Adyen\Model\Management\SodexoInfo', 'sofort' => '\Adyen\Model\Management\SofortInfo', @@ -141,6 +142,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'payto' => null, 'pulse' => null, 'reference' => null, + 'sepadirectdebit' => null, 'shopperInteraction' => null, 'sodexo' => null, 'sofort' => null, @@ -201,6 +203,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'payto' => false, 'pulse' => false, 'reference' => false, + 'sepadirectdebit' => false, 'shopperInteraction' => false, 'sodexo' => false, 'sofort' => false, @@ -341,6 +344,7 @@ public function isNullableSetToNull(string $property): bool 'payto' => 'payto', 'pulse' => 'pulse', 'reference' => 'reference', + 'sepadirectdebit' => 'sepadirectdebit', 'shopperInteraction' => 'shopperInteraction', 'sodexo' => 'sodexo', 'sofort' => 'sofort', @@ -401,6 +405,7 @@ public function isNullableSetToNull(string $property): bool 'payto' => 'setPayto', 'pulse' => 'setPulse', 'reference' => 'setReference', + 'sepadirectdebit' => 'setSepadirectdebit', 'shopperInteraction' => 'setShopperInteraction', 'sodexo' => 'setSodexo', 'sofort' => 'setSofort', @@ -461,6 +466,7 @@ public function isNullableSetToNull(string $property): bool 'payto' => 'getPayto', 'pulse' => 'getPulse', 'reference' => 'getReference', + 'sepadirectdebit' => 'getSepadirectdebit', 'shopperInteraction' => 'getShopperInteraction', 'sodexo' => 'getSodexo', 'sofort' => 'getSofort', @@ -590,6 +596,7 @@ public function __construct(?array $data = null) $this->setIfExists('payto', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('sepadirectdebit', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); $this->setIfExists('sodexo', $data ?? [], null); $this->setIfExists('sofort', $data ?? [], null); @@ -1572,6 +1579,30 @@ public function setReference($reference) return $this; } + /** + * Gets sepadirectdebit + * + * @return \Adyen\Model\Management\SepaDirectDebitInfo|null + */ + public function getSepadirectdebit() + { + return $this->container['sepadirectdebit']; + } + + /** + * Sets sepadirectdebit + * + * @param \Adyen\Model\Management\SepaDirectDebitInfo|null $sepadirectdebit sepadirectdebit + * + * @return self + */ + public function setSepadirectdebit($sepadirectdebit) + { + $this->container['sepadirectdebit'] = $sepadirectdebit; + + return $this; + } + /** * Gets shopperInteraction * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index 3db349a03..e2c94078c 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -236,6 +236,10 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPES_WITH_ERRORS_ABRAPETITE = 'abrapetite'; + public const TYPES_WITH_ERRORS_ABRAPETITE_CREDIT = 'abrapetite_credit'; + public const TYPES_WITH_ERRORS_ABRAPETITE_DEBIT = 'abrapetite_debit'; + public const TYPES_WITH_ERRORS_ABRAPETITE_PREPAID = 'abrapetite_prepaid'; public const TYPES_WITH_ERRORS_ACCEL = 'accel'; public const TYPES_WITH_ERRORS_ACH = 'ach'; public const TYPES_WITH_ERRORS_AFFIRM = 'affirm'; @@ -328,8 +332,12 @@ public function getModelName() public const TYPES_WITH_ERRORS_PERSONAL_CARD_CREDIT = 'personal_card_credit'; public const TYPES_WITH_ERRORS_PERSONAL_CARD_DEBIT = 'personal_card_debit'; public const TYPES_WITH_ERRORS_PULSE = 'pulse'; + public const TYPES_WITH_ERRORS_ROMCARD = 'romcard'; + public const TYPES_WITH_ERRORS_ROMCARD_CREDIT = 'romcard_credit'; + public const TYPES_WITH_ERRORS_ROMCARD_DEBIT = 'romcard_debit'; public const TYPES_WITH_ERRORS_SENFF = 'senff'; public const TYPES_WITH_ERRORS_SENFF_CREDIT = 'senff_credit'; + public const TYPES_WITH_ERRORS_SEPADIRECTDEBIT = 'sepadirectdebit'; public const TYPES_WITH_ERRORS_SODEXO = 'sodexo'; public const TYPES_WITH_ERRORS_STAR = 'star'; public const TYPES_WITH_ERRORS_SWISH = 'swish'; @@ -366,6 +374,10 @@ public function getModelName() public function getTypesWithErrorsAllowableValues() { return [ + self::TYPES_WITH_ERRORS_ABRAPETITE, + self::TYPES_WITH_ERRORS_ABRAPETITE_CREDIT, + self::TYPES_WITH_ERRORS_ABRAPETITE_DEBIT, + self::TYPES_WITH_ERRORS_ABRAPETITE_PREPAID, self::TYPES_WITH_ERRORS_ACCEL, self::TYPES_WITH_ERRORS_ACH, self::TYPES_WITH_ERRORS_AFFIRM, @@ -458,8 +470,12 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_PERSONAL_CARD_CREDIT, self::TYPES_WITH_ERRORS_PERSONAL_CARD_DEBIT, self::TYPES_WITH_ERRORS_PULSE, + self::TYPES_WITH_ERRORS_ROMCARD, + self::TYPES_WITH_ERRORS_ROMCARD_CREDIT, + self::TYPES_WITH_ERRORS_ROMCARD_DEBIT, self::TYPES_WITH_ERRORS_SENFF, self::TYPES_WITH_ERRORS_SENFF_CREDIT, + self::TYPES_WITH_ERRORS_SEPADIRECTDEBIT, self::TYPES_WITH_ERRORS_SODEXO, self::TYPES_WITH_ERRORS_STAR, self::TYPES_WITH_ERRORS_SWISH, @@ -668,7 +684,7 @@ public function getTypesWithErrors() /** * Sets typesWithErrors * - * @param string[]|null $typesWithErrors Payment method types with errors. + * @param string[]|null $typesWithErrors The payment method types that were not successfully requested and their corresponding errors. * * @return self */ diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 834703fcc..c2ec6ebbc 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -76,6 +76,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'payto' => '\Adyen\Model\Management\PayToInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', + 'sepadirectdebit' => '\Adyen\Model\Management\SepaDirectDebitInfo', 'shopperInteraction' => 'string', 'sodexo' => '\Adyen\Model\Management\SodexoInfo', 'sofort' => '\Adyen\Model\Management\SofortInfo', @@ -134,6 +135,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'payto' => null, 'pulse' => null, 'reference' => null, + 'sepadirectdebit' => null, 'shopperInteraction' => null, 'sodexo' => null, 'sofort' => null, @@ -190,6 +192,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'payto' => false, 'pulse' => false, 'reference' => false, + 'sepadirectdebit' => false, 'shopperInteraction' => false, 'sodexo' => false, 'sofort' => false, @@ -326,6 +329,7 @@ public function isNullableSetToNull(string $property): bool 'payto' => 'payto', 'pulse' => 'pulse', 'reference' => 'reference', + 'sepadirectdebit' => 'sepadirectdebit', 'shopperInteraction' => 'shopperInteraction', 'sodexo' => 'sodexo', 'sofort' => 'sofort', @@ -382,6 +386,7 @@ public function isNullableSetToNull(string $property): bool 'payto' => 'setPayto', 'pulse' => 'setPulse', 'reference' => 'setReference', + 'sepadirectdebit' => 'setSepadirectdebit', 'shopperInteraction' => 'setShopperInteraction', 'sodexo' => 'setSodexo', 'sofort' => 'setSofort', @@ -438,6 +443,7 @@ public function isNullableSetToNull(string $property): bool 'payto' => 'getPayto', 'pulse' => 'getPulse', 'reference' => 'getReference', + 'sepadirectdebit' => 'getSepadirectdebit', 'shopperInteraction' => 'getShopperInteraction', 'sodexo' => 'getSodexo', 'sofort' => 'getSofort', @@ -498,6 +504,10 @@ public function getModelName() public const SHOPPER_INTERACTION_POS = 'pos'; public const SHOPPER_INTERACTION_MOTO = 'moto'; public const SHOPPER_INTERACTION_CONT_AUTH = 'contAuth'; + public const TYPE_ABRAPETITE = 'abrapetite'; + public const TYPE_ABRAPETITE_CREDIT = 'abrapetite_credit'; + public const TYPE_ABRAPETITE_DEBIT = 'abrapetite_debit'; + public const TYPE_ABRAPETITE_PREPAID = 'abrapetite_prepaid'; public const TYPE_ACCEL = 'accel'; public const TYPE_ACH = 'ach'; public const TYPE_AFFIRM = 'affirm'; @@ -590,8 +600,12 @@ public function getModelName() public const TYPE_PERSONAL_CARD_CREDIT = 'personal_card_credit'; public const TYPE_PERSONAL_CARD_DEBIT = 'personal_card_debit'; public const TYPE_PULSE = 'pulse'; + public const TYPE_ROMCARD = 'romcard'; + public const TYPE_ROMCARD_CREDIT = 'romcard_credit'; + public const TYPE_ROMCARD_DEBIT = 'romcard_debit'; public const TYPE_SENFF = 'senff'; public const TYPE_SENFF_CREDIT = 'senff_credit'; + public const TYPE_SEPADIRECTDEBIT = 'sepadirectdebit'; public const TYPE_SODEXO = 'sodexo'; public const TYPE_STAR = 'star'; public const TYPE_SWISH = 'swish'; @@ -642,6 +656,10 @@ public function getShopperInteractionAllowableValues() public function getTypeAllowableValues() { return [ + self::TYPE_ABRAPETITE, + self::TYPE_ABRAPETITE_CREDIT, + self::TYPE_ABRAPETITE_DEBIT, + self::TYPE_ABRAPETITE_PREPAID, self::TYPE_ACCEL, self::TYPE_ACH, self::TYPE_AFFIRM, @@ -734,8 +752,12 @@ public function getTypeAllowableValues() self::TYPE_PERSONAL_CARD_CREDIT, self::TYPE_PERSONAL_CARD_DEBIT, self::TYPE_PULSE, + self::TYPE_ROMCARD, + self::TYPE_ROMCARD_CREDIT, + self::TYPE_ROMCARD_DEBIT, self::TYPE_SENFF, self::TYPE_SENFF_CREDIT, + self::TYPE_SEPADIRECTDEBIT, self::TYPE_SODEXO, self::TYPE_STAR, self::TYPE_SWISH, @@ -815,6 +837,7 @@ public function __construct(?array $data = null) $this->setIfExists('payto', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('sepadirectdebit', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); $this->setIfExists('sodexo', $data ?? [], null); $this->setIfExists('sofort', $data ?? [], null); @@ -1733,6 +1756,30 @@ public function setReference($reference) return $this; } + /** + * Gets sepadirectdebit + * + * @return \Adyen\Model\Management\SepaDirectDebitInfo|null + */ + public function getSepadirectdebit() + { + return $this->container['sepadirectdebit']; + } + + /** + * Sets sepadirectdebit + * + * @param \Adyen\Model\Management\SepaDirectDebitInfo|null $sepadirectdebit sepadirectdebit + * + * @return self + */ + public function setSepadirectdebit($sepadirectdebit) + { + $this->container['sepadirectdebit'] = $sepadirectdebit; + + return $this; + } + /** * Gets shopperInteraction * diff --git a/src/Adyen/Model/Management/SepaDirectDebitInfo.php b/src/Adyen/Model/Management/SepaDirectDebitInfo.php new file mode 100644 index 000000000..fe8c1bf1c --- /dev/null +++ b/src/Adyen/Model/Management/SepaDirectDebitInfo.php @@ -0,0 +1,435 @@ + + */ +class SepaDirectDebitInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SepaDirectDebitInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'creditorId' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'creditorId' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'creditorId' => false, + 'transactionDescription' => 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 = [ + 'creditorId' => 'creditorId', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'creditorId' => 'setCreditorId', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'creditorId' => 'getCreditorId', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * 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('creditorId', $data ?? [], null); + $this->setIfExists('transactionDescription', $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 creditorId + * + * @return string|null + */ + public function getCreditorId() + { + return $this->container['creditorId']; + } + + /** + * Sets creditorId + * + * @param string|null $creditorId Creditor id + * + * @return self + */ + public function setCreditorId($creditorId) + { + $this->container['creditorId'] = $creditorId; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index ce7b4d4a8..35a0cdcab 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -29,17 +29,17 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'SplitConfigurationRule'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'currency' => 'string', 'fundingSource' => 'string', @@ -50,12 +50,12 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'currency' => null, 'fundingSource' => null, @@ -66,10 +66,10 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static $openAPINullables = [ 'currency' => false, 'fundingSource' => false, @@ -80,10 +80,10 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected $openAPINullablesSetToNull = []; /** @@ -309,14 +309,14 @@ public function __construct(?array $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 - */ + * 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])) { @@ -619,10 +619,10 @@ public function toArray(): array // 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 + // 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 + // 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; diff --git a/src/Adyen/Model/Management/TestOutput.php b/src/Adyen/Model/Management/TestOutput.php index 4e7186ac5..3e7bcd7e4 100644 --- a/src/Adyen/Model/Management/TestOutput.php +++ b/src/Adyen/Model/Management/TestOutput.php @@ -348,7 +348,7 @@ public function getOutput() /** * Sets output * - * @param string|null $output A short, human-readable explanation of the test result. Your server must respond with **HTTP 2xx* for the test webhook to be successful (`data.status`: **success**). Find out more about [accepting notifications](https://docs.adyen.com/development-resources/webhooks#accept-notifications) You can use the value of this field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot unsuccessful test webhooks. + * @param string|null $output A short, human-readable explanation of the test result. Your server must respond with **HTTP 2xx* for the test webhook to be successful (`data.status`: **success**). Find out more about [accepting notifications](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks) You can use the value of this field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot unsuccessful test webhooks. * * @return self */ diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index acb74581d..30eafc4c0 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -63,6 +63,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'nyce' => '\Adyen\Model\Management\NyceInfo', 'paybybankPlaid' => '\Adyen\Model\Management\PayByBankPlaidInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', + 'sepadirectdebit' => '\Adyen\Model\Management\SepaDirectDebitInfo', 'star' => '\Adyen\Model\Management\StarInfo', 'storeId' => 'string', 'storeIds' => 'string[]', @@ -99,6 +100,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'nyce' => null, 'paybybankPlaid' => null, 'pulse' => null, + 'sepadirectdebit' => null, 'star' => null, 'storeId' => null, 'storeIds' => null, @@ -133,6 +135,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'nyce' => false, 'paybybankPlaid' => false, 'pulse' => false, + 'sepadirectdebit' => false, 'star' => false, 'storeId' => false, 'storeIds' => false, @@ -247,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'nyce', 'paybybankPlaid' => 'paybybank_plaid', 'pulse' => 'pulse', + 'sepadirectdebit' => 'sepadirectdebit', 'star' => 'star', 'storeId' => 'storeId', 'storeIds' => 'storeIds', @@ -281,6 +285,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'setNyce', 'paybybankPlaid' => 'setPaybybankPlaid', 'pulse' => 'setPulse', + 'sepadirectdebit' => 'setSepadirectdebit', 'star' => 'setStar', 'storeId' => 'setStoreId', 'storeIds' => 'setStoreIds', @@ -315,6 +320,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'getNyce', 'paybybankPlaid' => 'getPaybybankPlaid', 'pulse' => 'getPulse', + 'sepadirectdebit' => 'getSepadirectdebit', 'star' => 'getStar', 'storeId' => 'getStoreId', 'storeIds' => 'getStoreIds', @@ -400,6 +406,7 @@ public function __construct(?array $data = null) $this->setIfExists('nyce', $data ?? [], null); $this->setIfExists('paybybankPlaid', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); + $this->setIfExists('sepadirectdebit', $data ?? [], null); $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeId', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); @@ -976,6 +983,30 @@ public function setPulse($pulse) return $this; } + /** + * Gets sepadirectdebit + * + * @return \Adyen\Model\Management\SepaDirectDebitInfo|null + */ + public function getSepadirectdebit() + { + return $this->container['sepadirectdebit']; + } + + /** + * Sets sepadirectdebit + * + * @param \Adyen\Model\Management\SepaDirectDebitInfo|null $sepadirectdebit sepadirectdebit + * + * @return self + */ + public function setSepadirectdebit($sepadirectdebit) + { + $this->container['sepadirectdebit'] = $sepadirectdebit; + + return $this; + } + /** * Gets star * diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index 746a4fe1c..555d87508 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -29,17 +29,17 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateSplitConfigurationRuleRequest'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'currency' => 'string', 'fundingSource' => 'string', @@ -48,12 +48,12 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'currency' => null, 'fundingSource' => null, @@ -62,10 +62,10 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static $openAPINullables = [ 'currency' => false, 'fundingSource' => false, @@ -74,10 +74,10 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected $openAPINullablesSetToNull = []; /** @@ -253,14 +253,14 @@ public function __construct(?array $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 - */ + * 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])) { @@ -474,10 +474,10 @@ public function toArray(): array // 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 + // 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 + // 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; diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index a499d5ee0..0f7ecb13c 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -1039,7 +1039,7 @@ public function getType() /** * Sets type * - * @param string $type The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + * @param string $type The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types/#event-codes) and [other types of webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types/#other-webhooks). * * @return self */