From d3ad1ad6ce4dfa82cf589db86e164350b5ebfef3 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:41:34 +0200 Subject: [PATCH] Update all services (#675) * [reformat][adyen-sdk-automation] automated change * style(fmt): code formatted --------- Co-authored-by: AdyenAutomationBot --- .../Model/Checkout/DonationPaymentMethod.php | 7 +-- src/Adyen/Model/Checkout/IdealDetails.php | 7 +-- src/Adyen/Model/Checkout/IdealDonations.php | 7 +-- src/Adyen/Model/Checkout/PaymentDetails.php | 2 - .../Checkout/StoredPaymentMethodDetails.php | 2 + .../Management/CreateCompanyUserRequest.php | 31 ++++++++++ .../Management/CreateMerchantUserRequest.php | 31 ++++++++++ .../Management/UpdateCompanyUserRequest.php | 31 ++++++++++ .../Management/UpdateMerchantUserRequest.php | 31 ++++++++++ src/Adyen/Model/Transfers/TransferInfo.php | 62 +++++++++++++++++++ 10 files changed, 194 insertions(+), 17 deletions(-) diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index ea09f07b..a8c86331 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -444,9 +444,6 @@ public function listInvalidProperties() if ($this->container['googlePayToken'] === null) { $invalidProperties[] = "'googlePayToken' can't be null"; } - if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; - } return $invalidProperties; } @@ -1069,7 +1066,7 @@ public function setGooglePayToken($googlePayToken) /** * Gets issuer * - * @return string + * @return string|null */ public function getIssuer() { @@ -1079,7 +1076,7 @@ public function getIssuer() /** * Sets issuer * - * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + * @param string|null $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. * * @return self */ diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index 9def99b5..fb4d056b 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -301,9 +301,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; - } $allowedValues = $this->getTypeAllowableValues(); if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -355,7 +352,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) /** * Gets issuer * - * @return string + * @return string|null */ public function getIssuer() { @@ -365,7 +362,7 @@ public function getIssuer() /** * Sets issuer * - * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + * @param string|null $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. * * @return self */ diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php index edec8d3e..5376c781 100644 --- a/src/Adyen/Model/Checkout/IdealDonations.php +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -301,9 +301,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; - } $allowedValues = $this->getTypeAllowableValues(); if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -355,7 +352,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) /** * Gets issuer * - * @return string + * @return string|null */ public function getIssuer() { @@ -365,7 +362,7 @@ public function getIssuer() /** * Sets issuer * - * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + * @param string|null $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 7c05dc23..9924f0da 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -223,7 +223,6 @@ public function getModelName() public const TYPE_ALIPAY = 'alipay'; public const TYPE_MULTIBANCO = 'multibanco'; - public const TYPE_BANK_TRANSFER_IBAN = 'bankTransfer_IBAN'; public const TYPE_PAYBRIGHT = 'paybright'; public const TYPE_PAYNOW = 'paynow'; public const TYPE_AFFIRM = 'affirm'; @@ -322,7 +321,6 @@ public function getTypeAllowableValues() return [ self::TYPE_ALIPAY, self::TYPE_MULTIBANCO, - self::TYPE_BANK_TRANSFER_IBAN, self::TYPE_PAYBRIGHT, self::TYPE_PAYNOW, self::TYPE_AFFIRM, diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index bd930be5..4f6f8aa9 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -236,6 +236,7 @@ public function getModelName() public const TYPE_BCMC_MOBILE = 'bcmc_mobile'; public const TYPE_BCMC_MOBILE_QR = 'bcmc_mobile_QR'; public const TYPE_BCMC_MOBILE_APP = 'bcmc_mobile_app'; + public const TYPE_BANK_TRANSFER_IBAN = 'bankTransfer_IBAN'; public const TYPE_MOMO_WALLET = 'momo_wallet'; public const TYPE_MOMO_WALLET_APP = 'momo_wallet_app'; public const TYPE_TWINT = 'twint'; @@ -263,6 +264,7 @@ public function getTypeAllowableValues() self::TYPE_BCMC_MOBILE, self::TYPE_BCMC_MOBILE_QR, self::TYPE_BCMC_MOBILE_APP, + self::TYPE_BANK_TRANSFER_IBAN, self::TYPE_MOMO_WALLET, self::TYPE_MOMO_WALLET_APP, self::TYPE_TWINT, diff --git a/src/Adyen/Model/Management/CreateCompanyUserRequest.php b/src/Adyen/Model/Management/CreateCompanyUserRequest.php index 2fd05934..1b5fa50c 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyUserRequest.php @@ -47,6 +47,7 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => 'string[]', 'associatedMerchantAccounts' => 'string[]', 'email' => 'string', + 'loginMethod' => 'string', 'name' => '\Adyen\Model\Management\Name', 'roles' => 'string[]', 'timeZoneCode' => 'string', @@ -64,6 +65,7 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => null, 'associatedMerchantAccounts' => null, 'email' => null, + 'loginMethod' => null, 'name' => null, 'roles' => null, 'timeZoneCode' => null, @@ -79,6 +81,7 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => false, 'associatedMerchantAccounts' => false, 'email' => false, + 'loginMethod' => false, 'name' => false, 'roles' => false, 'timeZoneCode' => false, @@ -174,6 +177,7 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'accountGroups', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', 'email' => 'email', + 'loginMethod' => 'loginMethod', 'name' => 'name', 'roles' => 'roles', 'timeZoneCode' => 'timeZoneCode', @@ -189,6 +193,7 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'setAccountGroups', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', 'email' => 'setEmail', + 'loginMethod' => 'setLoginMethod', 'name' => 'setName', 'roles' => 'setRoles', 'timeZoneCode' => 'setTimeZoneCode', @@ -204,6 +209,7 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'getAccountGroups', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', 'email' => 'getEmail', + 'loginMethod' => 'getLoginMethod', 'name' => 'getName', 'roles' => 'getRoles', 'timeZoneCode' => 'getTimeZoneCode', @@ -270,6 +276,7 @@ public function __construct(array $data = null) $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('loginMethod', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('timeZoneCode', $data ?? [], null); @@ -399,6 +406,30 @@ public function setEmail($email) return $this; } + /** + * Gets loginMethod + * + * @return string|null + */ + public function getLoginMethod() + { + return $this->container['loginMethod']; + } + + /** + * Sets loginMethod + * + * @param string|null $loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** + * + * @return self + */ + public function setLoginMethod($loginMethod) + { + $this->container['loginMethod'] = $loginMethod; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/Management/CreateMerchantUserRequest.php b/src/Adyen/Model/Management/CreateMerchantUserRequest.php index 7a84fee1..dced4ef9 100644 --- a/src/Adyen/Model/Management/CreateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantUserRequest.php @@ -46,6 +46,7 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPITypes = [ 'accountGroups' => 'string[]', 'email' => 'string', + 'loginMethod' => 'string', 'name' => '\Adyen\Model\Management\Name', 'roles' => 'string[]', 'timeZoneCode' => 'string', @@ -62,6 +63,7 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPIFormats = [ 'accountGroups' => null, 'email' => null, + 'loginMethod' => null, 'name' => null, 'roles' => null, 'timeZoneCode' => null, @@ -76,6 +78,7 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPINullables = [ 'accountGroups' => false, 'email' => false, + 'loginMethod' => false, 'name' => false, 'roles' => false, 'timeZoneCode' => false, @@ -170,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountGroups' => 'accountGroups', 'email' => 'email', + 'loginMethod' => 'loginMethod', 'name' => 'name', 'roles' => 'roles', 'timeZoneCode' => 'timeZoneCode', @@ -184,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountGroups' => 'setAccountGroups', 'email' => 'setEmail', + 'loginMethod' => 'setLoginMethod', 'name' => 'setName', 'roles' => 'setRoles', 'timeZoneCode' => 'setTimeZoneCode', @@ -198,6 +203,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountGroups' => 'getAccountGroups', 'email' => 'getEmail', + 'loginMethod' => 'getLoginMethod', 'name' => 'getName', 'roles' => 'getRoles', 'timeZoneCode' => 'getTimeZoneCode', @@ -263,6 +269,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('loginMethod', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('timeZoneCode', $data ?? [], null); @@ -368,6 +375,30 @@ public function setEmail($email) return $this; } + /** + * Gets loginMethod + * + * @return string|null + */ + public function getLoginMethod() + { + return $this->container['loginMethod']; + } + + /** + * Sets loginMethod + * + * @param string|null $loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** + * + * @return self + */ + public function setLoginMethod($loginMethod) + { + $this->container['loginMethod'] = $loginMethod; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php index 6dd7660e..d9ecc30f 100644 --- a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php @@ -48,6 +48,7 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'active' => 'bool', 'associatedMerchantAccounts' => 'string[]', 'email' => 'string', + 'loginMethod' => 'string', 'name' => '\Adyen\Model\Management\Name2', 'roles' => 'string[]', 'timeZoneCode' => 'string' @@ -65,6 +66,7 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'active' => null, 'associatedMerchantAccounts' => null, 'email' => null, + 'loginMethod' => null, 'name' => null, 'roles' => null, 'timeZoneCode' => null @@ -80,6 +82,7 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'active' => false, 'associatedMerchantAccounts' => false, 'email' => false, + 'loginMethod' => false, 'name' => false, 'roles' => false, 'timeZoneCode' => false @@ -175,6 +178,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'active', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', 'email' => 'email', + 'loginMethod' => 'loginMethod', 'name' => 'name', 'roles' => 'roles', 'timeZoneCode' => 'timeZoneCode' @@ -190,6 +194,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'setActive', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', 'email' => 'setEmail', + 'loginMethod' => 'setLoginMethod', 'name' => 'setName', 'roles' => 'setRoles', 'timeZoneCode' => 'setTimeZoneCode' @@ -205,6 +210,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'getActive', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', 'email' => 'getEmail', + 'loginMethod' => 'getLoginMethod', 'name' => 'getName', 'roles' => 'getRoles', 'timeZoneCode' => 'getTimeZoneCode' @@ -271,6 +277,7 @@ public function __construct(array $data = null) $this->setIfExists('active', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('loginMethod', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('timeZoneCode', $data ?? [], null); @@ -414,6 +421,30 @@ public function setEmail($email) return $this; } + /** + * Gets loginMethod + * + * @return string|null + */ + public function getLoginMethod() + { + return $this->container['loginMethod']; + } + + /** + * Sets loginMethod + * + * @param string|null $loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** + * + * @return self + */ + public function setLoginMethod($loginMethod) + { + $this->container['loginMethod'] = $loginMethod; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php index 33b8fd3f..d54e467a 100644 --- a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php @@ -47,6 +47,7 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer 'accountGroups' => 'string[]', 'active' => 'bool', 'email' => 'string', + 'loginMethod' => 'string', 'name' => '\Adyen\Model\Management\Name2', 'roles' => 'string[]', 'timeZoneCode' => 'string' @@ -63,6 +64,7 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer 'accountGroups' => null, 'active' => null, 'email' => null, + 'loginMethod' => null, 'name' => null, 'roles' => null, 'timeZoneCode' => null @@ -77,6 +79,7 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer 'accountGroups' => false, 'active' => false, 'email' => false, + 'loginMethod' => false, 'name' => false, 'roles' => false, 'timeZoneCode' => false @@ -171,6 +174,7 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'accountGroups', 'active' => 'active', 'email' => 'email', + 'loginMethod' => 'loginMethod', 'name' => 'name', 'roles' => 'roles', 'timeZoneCode' => 'timeZoneCode' @@ -185,6 +189,7 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', 'email' => 'setEmail', + 'loginMethod' => 'setLoginMethod', 'name' => 'setName', 'roles' => 'setRoles', 'timeZoneCode' => 'setTimeZoneCode' @@ -199,6 +204,7 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', 'email' => 'getEmail', + 'loginMethod' => 'getLoginMethod', 'name' => 'getName', 'roles' => 'getRoles', 'timeZoneCode' => 'getTimeZoneCode' @@ -264,6 +270,7 @@ public function __construct(array $data = null) $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('loginMethod', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('timeZoneCode', $data ?? [], null); @@ -383,6 +390,30 @@ public function setEmail($email) return $this; } + /** + * Gets loginMethod + * + * @return string|null + */ + public function getLoginMethod() + { + return $this->container['loginMethod']; + } + + /** + * Sets loginMethod + * + * @param string|null $loginMethod The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** + * + * @return self + */ + public function setLoginMethod($loginMethod) + { + $this->container['loginMethod'] = $loginMethod; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index b1b6b980..7c41ad68 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -50,6 +50,7 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'counterparty' => '\Adyen\Model\Transfers\CounterpartyInfoV3', 'description' => 'string', 'paymentInstrumentId' => 'string', + 'priorities' => 'string[]', 'priority' => 'string', 'reference' => 'string', 'referenceForBeneficiary' => 'string', @@ -71,6 +72,7 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'counterparty' => null, 'description' => null, 'paymentInstrumentId' => null, + 'priorities' => null, 'priority' => null, 'reference' => null, 'referenceForBeneficiary' => null, @@ -90,6 +92,7 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'counterparty' => false, 'description' => false, 'paymentInstrumentId' => false, + 'priorities' => false, 'priority' => false, 'reference' => false, 'referenceForBeneficiary' => false, @@ -189,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'counterparty' => 'counterparty', 'description' => 'description', 'paymentInstrumentId' => 'paymentInstrumentId', + 'priorities' => 'priorities', 'priority' => 'priority', 'reference' => 'reference', 'referenceForBeneficiary' => 'referenceForBeneficiary', @@ -208,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'counterparty' => 'setCounterparty', 'description' => 'setDescription', 'paymentInstrumentId' => 'setPaymentInstrumentId', + 'priorities' => 'setPriorities', 'priority' => 'setPriority', 'reference' => 'setReference', 'referenceForBeneficiary' => 'setReferenceForBeneficiary', @@ -227,6 +232,7 @@ public function isNullableSetToNull(string $property): bool 'counterparty' => 'getCounterparty', 'description' => 'getDescription', 'paymentInstrumentId' => 'getPaymentInstrumentId', + 'priorities' => 'getPriorities', 'priority' => 'getPriority', 'reference' => 'getReference', 'referenceForBeneficiary' => 'getReferenceForBeneficiary', @@ -280,6 +286,12 @@ public function getModelName() public const CATEGORY_ISSUED_CARD = 'issuedCard'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const CATEGORY_CARD = 'card'; + public const PRIORITIES_CROSS_BORDER = 'crossBorder'; + public const PRIORITIES_FAST = 'fast'; + public const PRIORITIES_INSTANT = 'instant'; + public const PRIORITIES_INTERNAL = 'internal'; + public const PRIORITIES_REGULAR = 'regular'; + public const PRIORITIES_WIRE = 'wire'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_FAST = 'fast'; public const PRIORITY_INSTANT = 'instant'; @@ -305,6 +317,22 @@ public function getCategoryAllowableValues() self::CATEGORY_CARD, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPrioritiesAllowableValues() + { + return [ + self::PRIORITIES_CROSS_BORDER, + self::PRIORITIES_FAST, + self::PRIORITIES_INSTANT, + self::PRIORITIES_INTERNAL, + self::PRIORITIES_REGULAR, + self::PRIORITIES_WIRE, + ]; + } /** * Gets allowable values of the enum * @@ -355,6 +383,7 @@ public function __construct(array $data = null) $this->setIfExists('counterparty', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('paymentInstrumentId', $data ?? [], null); + $this->setIfExists('priorities', $data ?? [], null); $this->setIfExists('priority', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('referenceForBeneficiary', $data ?? [], null); @@ -594,6 +623,39 @@ public function setPaymentInstrumentId($paymentInstrumentId) return $this; } + /** + * Gets priorities + * + * @return string[]|null + */ + public function getPriorities() + { + return $this->container['priorities']; + } + + /** + * Sets priorities + * + * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Required for transfers with `category` **bank**. For more details, see [fallback priorities](https://docs.adyen.com/payouts/payout-service/payout-to-users/#fallback-priorities). + * + * @return self + */ + public function setPriorities($priorities) + { + $allowedValues = $this->getPrioritiesAllowableValues(); + if (array_diff($priorities, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'priorities', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['priorities'] = $priorities; + + return $this; + } + /** * Gets priority *