From fe21585464210a8c2a5fe55281ab4ac8170c1e20 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:29:29 +0000 Subject: [PATCH 1/2] [adyen-sdk-automation] automated changes --- .../BalanceControl/BalanceTransferRequest.php | 6 +- .../BalanceTransferResponse.php | 12 +- .../Model/BalanceControl/ObjectSerializer.php | 6 +- src/Adyen/Model/Management/AccelInfo.php | 6 +- src/Adyen/Model/Management/AmexInfo.php | 6 +- src/Adyen/Model/Management/AndroidApp.php | 6 +- src/Adyen/Model/Management/Connectivity.php | 6 +- .../CreateCompanyWebhookRequest.php | 24 +- .../CreateMerchantWebhookRequest.php | 18 +- src/Adyen/Model/Management/DinersInfo.php | 6 +- .../Management/InstallAndroidAppDetails.php | 6 +- .../InstallAndroidCertificateDetails.php | 6 +- src/Adyen/Model/Management/JCBInfo.php | 6 +- src/Adyen/Model/Management/KlarnaInfo.php | 6 +- src/Adyen/Model/Management/Notification.php | 6 +- src/Adyen/Model/Management/NyceInfo.php | 6 +- .../Model/Management/ObjectSerializer.php | 6 +- src/Adyen/Model/Management/PayAtTable.php | 12 +- .../Model/Management/PayByBankPlaidInfo.php | 293 ++----------- src/Adyen/Model/Management/PaymentMethod.php | 6 +- .../Management/PaymentMethodSetupInfo.php | 12 +- src/Adyen/Model/Management/PayoutSettings.php | 12 +- src/Adyen/Model/Management/PulseInfo.php | 6 +- src/Adyen/Model/Management/Refunds.php | 43 +- .../Model/Management/ReleaseUpdateDetails.php | 6 +- .../Management/SplitConfigurationLogic.php | 84 ++-- .../Management/SplitConfigurationRule.php | 83 ++-- src/Adyen/Model/Management/StarInfo.php | 6 +- src/Adyen/Model/Management/Store.php | 6 +- .../Model/Management/TerminalAssignment.php | 6 +- .../TerminalConnectivityCellular.php | 6 +- .../Management/TransactionDescriptionInfo.php | 6 +- .../Management/UninstallAndroidAppDetails.php | 6 +- .../UninstallAndroidCertificateDetails.php | 6 +- src/Adyen/Model/Management/Unreferenced.php | 404 ++++++++++++++++++ .../UpdateCompanyWebhookRequest.php | 24 +- .../UpdateMerchantWebhookRequest.php | 18 +- .../UpdateSplitConfigurationLogicRequest.php | 84 ++-- .../UpdateSplitConfigurationRuleRequest.php | 71 +-- .../Model/Management/UpdateStoreRequest.php | 6 +- src/Adyen/Model/Management/Webhook.php | 24 +- src/Adyen/Service/BalanceControlApi.php | 2 +- .../AllowedOriginsCompanyLevelApi.php | 3 +- .../AllowedOriginsMerchantLevelApi.php | 3 +- .../Service/Management/MyAPICredentialApi.php | 3 +- .../PaymentMethodsMerchantLevelApi.php | 3 +- .../PayoutSettingsMerchantLevelApi.php | 3 +- .../Management/TerminalsTerminalLevelApi.php | 3 +- .../Management/WebhooksCompanyLevelApi.php | 3 +- .../Management/WebhooksMerchantLevelApi.php | 3 +- 50 files changed, 811 insertions(+), 583 deletions(-) create mode 100644 src/Adyen/Model/Management/Unreferenced.php diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php index 29bde8828..d3f03f31a 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php @@ -492,11 +492,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php index 206b168ab..e81b9afda 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php @@ -573,11 +573,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -631,11 +631,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index 770dc3955..f5c510cf4 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Management/AccelInfo.php b/src/Adyen/Model/Management/AccelInfo.php index d39caf506..1927355f5 100644 --- a/src/Adyen/Model/Management/AccelInfo.php +++ b/src/Adyen/Model/Management/AccelInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/AmexInfo.php b/src/Adyen/Model/Management/AmexInfo.php index 8f9caf890..187cce469 100644 --- a/src/Adyen/Model/Management/AmexInfo.php +++ b/src/Adyen/Model/Management/AmexInfo.php @@ -384,11 +384,11 @@ public function setServiceLevel($serviceLevel) { $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'serviceLevel', must be one of '%s'", + "serviceLevel: unexpected enum value '%s' - Supported values are [%s]", $serviceLevel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index ee146162d..efb643349 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -531,11 +531,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index c72fb3487..c9d904af9 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -324,11 +324,11 @@ public function setSimcardStatus($simcardStatus) { $allowedValues = $this->getSimcardStatusAllowableValues(); if (!in_array($simcardStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'simcardStatus', must be one of '%s'", + "simcardStatus: unexpected enum value '%s' - Supported values are [%s]", $simcardStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index 8bc0eaa60..d1f5fca7b 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -635,11 +635,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -693,11 +693,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -727,11 +727,11 @@ public function setFilterMerchantAccountType($filterMerchantAccountType) { $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'filterMerchantAccountType', must be one of '%s'", + "filterMerchantAccountType: unexpected enum value '%s' - Supported values are [%s]", $filterMerchantAccountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -785,11 +785,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index a29535b04..2ab80a788 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -590,11 +590,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -648,11 +648,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -682,11 +682,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/DinersInfo.php b/src/Adyen/Model/Management/DinersInfo.php index c84e83cfc..4f0ae6765 100644 --- a/src/Adyen/Model/Management/DinersInfo.php +++ b/src/Adyen/Model/Management/DinersInfo.php @@ -389,11 +389,11 @@ public function setServiceLevel($serviceLevel) { $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'serviceLevel', must be one of '%s'", + "serviceLevel: unexpected enum value '%s' - Supported values are [%s]", $serviceLevel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index f6524c1a4..2dd112e80 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index 4ebdbcba9..e35b981ca 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/JCBInfo.php b/src/Adyen/Model/Management/JCBInfo.php index a46491089..aeeb5d15f 100644 --- a/src/Adyen/Model/Management/JCBInfo.php +++ b/src/Adyen/Model/Management/JCBInfo.php @@ -388,11 +388,11 @@ public function setServiceLevel($serviceLevel) { $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'serviceLevel', must be one of '%s'", + "serviceLevel: unexpected enum value '%s' - Supported values are [%s]", $serviceLevel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/KlarnaInfo.php b/src/Adyen/Model/Management/KlarnaInfo.php index e3c2b097c..20250f531 100644 --- a/src/Adyen/Model/Management/KlarnaInfo.php +++ b/src/Adyen/Model/Management/KlarnaInfo.php @@ -399,11 +399,11 @@ public function setRegion($region) { $allowedValues = $this->getRegionAllowableValues(); if (!in_array($region, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'region', must be one of '%s'", + "region: unexpected enum value '%s' - Supported values are [%s]", $region, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php index 38aaeba32..148e75bc5 100644 --- a/src/Adyen/Model/Management/Notification.php +++ b/src/Adyen/Model/Management/Notification.php @@ -347,11 +347,11 @@ public function setCategory($category) { $allowedValues = $this->getCategoryAllowableValues(); if (!in_array($category, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'category', must be one of '%s'", + "category: unexpected enum value '%s' - Supported values are [%s]", $category, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/NyceInfo.php b/src/Adyen/Model/Management/NyceInfo.php index 156774b11..5e701ac69 100644 --- a/src/Adyen/Model/Management/NyceInfo.php +++ b/src/Adyen/Model/Management/NyceInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index 09e0b2fce..757cbcb0d 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,9 +118,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Management/PayAtTable.php b/src/Adyen/Model/Management/PayAtTable.php index 56cfdd044..a909b1fff 100644 --- a/src/Adyen/Model/Management/PayAtTable.php +++ b/src/Adyen/Model/Management/PayAtTable.php @@ -354,11 +354,11 @@ public function setAuthenticationMethod($authenticationMethod) { $allowedValues = $this->getAuthenticationMethodAllowableValues(); if (!in_array($authenticationMethod, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'authenticationMethod', must be one of '%s'", + "authenticationMethod: unexpected enum value '%s' - Supported values are [%s]", $authenticationMethod, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -422,11 +422,11 @@ public function setPaymentInstrument($paymentInstrument) } $allowedValues = $this->getPaymentInstrumentAllowableValues(); if (!is_null($paymentInstrument) && !in_array($paymentInstrument, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'paymentInstrument', must be one of '%s'", + "paymentInstrument: unexpected enum value '%s' - Supported values are [%s]", $paymentInstrument, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PayByBankPlaidInfo.php b/src/Adyen/Model/Management/PayByBankPlaidInfo.php index c9985ad57..310cc4831 100644 --- a/src/Adyen/Model/Management/PayByBankPlaidInfo.php +++ b/src/Adyen/Model/Management/PayByBankPlaidInfo.php @@ -29,70 +29,49 @@ 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', - 'merchantCity' => 'string', - 'merchantLegalName' => 'string', - 'merchantShopUrl' => 'string', - 'merchantStateProvince' => 'string', - 'merchantStreetAddress' => 'string', - 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo', - 'zipCode' => 'string' + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' ]; /** - * 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, - 'merchantCity' => null, - 'merchantLegalName' => null, - 'merchantShopUrl' => null, - 'merchantStateProvince' => null, - 'merchantStreetAddress' => null, - 'transactionDescription' => null, - 'zipCode' => null + 'transactionDescription' => null ]; /** - * 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, - 'merchantCity' => false, - 'merchantLegalName' => false, - 'merchantShopUrl' => false, - 'merchantStateProvince' => false, - 'merchantStreetAddress' => false, - 'transactionDescription' => false, - 'zipCode' => false + 'transactionDescription' => false ]; /** - * 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 = []; /** @@ -174,15 +153,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'countryCode' => 'countryCode', 'logo' => 'logo', - 'merchantCity' => 'merchantCity', - 'merchantLegalName' => 'merchantLegalName', - 'merchantShopUrl' => 'merchantShopUrl', - 'merchantStateProvince' => 'merchantStateProvince', - 'merchantStreetAddress' => 'merchantStreetAddress', - 'transactionDescription' => 'transactionDescription', - 'zipCode' => 'zipCode' + 'transactionDescription' => 'transactionDescription' ]; /** @@ -191,15 +163,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'countryCode' => 'setCountryCode', 'logo' => 'setLogo', - 'merchantCity' => 'setMerchantCity', - 'merchantLegalName' => 'setMerchantLegalName', - 'merchantShopUrl' => 'setMerchantShopUrl', - 'merchantStateProvince' => 'setMerchantStateProvince', - 'merchantStreetAddress' => 'setMerchantStreetAddress', - 'transactionDescription' => 'setTransactionDescription', - 'zipCode' => 'setZipCode' + 'transactionDescription' => 'setTransactionDescription' ]; /** @@ -208,15 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'countryCode' => 'getCountryCode', 'logo' => 'getLogo', - 'merchantCity' => 'getMerchantCity', - 'merchantLegalName' => 'getMerchantLegalName', - 'merchantShopUrl' => 'getMerchantShopUrl', - 'merchantStateProvince' => 'getMerchantStateProvince', - 'merchantStreetAddress' => 'getMerchantStreetAddress', - 'transactionDescription' => 'getTransactionDescription', - 'zipCode' => 'getZipCode' + 'transactionDescription' => 'getTransactionDescription' ]; /** @@ -276,26 +234,19 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('countryCode', $data ?? [], null); $this->setIfExists('logo', $data ?? [], null); - $this->setIfExists('merchantCity', $data ?? [], null); - $this->setIfExists('merchantLegalName', $data ?? [], null); - $this->setIfExists('merchantShopUrl', $data ?? [], null); - $this->setIfExists('merchantStateProvince', $data ?? [], null); - $this->setIfExists('merchantStreetAddress', $data ?? [], null); $this->setIfExists('transactionDescription', $data ?? [], null); - $this->setIfExists('zipCode', $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])) { @@ -329,30 +280,6 @@ public function valid() } - /** - * Gets countryCode - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['countryCode']; - } - - /** - * Sets countryCode - * - * @param string|null $countryCode Country Code. - * - * @return self - */ - public function setCountryCode($countryCode) - { - $this->container['countryCode'] = $countryCode; - - return $this; - } - /** * Gets logo * @@ -377,126 +304,6 @@ public function setLogo($logo) return $this; } - /** - * Gets merchantCity - * - * @return string|null - */ - public function getMerchantCity() - { - return $this->container['merchantCity']; - } - - /** - * Sets merchantCity - * - * @param string|null $merchantCity The city the merchant is doing business in. - * - * @return self - */ - public function setMerchantCity($merchantCity) - { - $this->container['merchantCity'] = $merchantCity; - - return $this; - } - - /** - * Gets merchantLegalName - * - * @return string|null - */ - public function getMerchantLegalName() - { - return $this->container['merchantLegalName']; - } - - /** - * Sets merchantLegalName - * - * @param string|null $merchantLegalName Legal Business Name of the Merchant. - * - * @return self - */ - public function setMerchantLegalName($merchantLegalName) - { - $this->container['merchantLegalName'] = $merchantLegalName; - - return $this; - } - - /** - * Gets merchantShopUrl - * - * @return string|null - */ - public function getMerchantShopUrl() - { - return $this->container['merchantShopUrl']; - } - - /** - * Sets merchantShopUrl - * - * @param string|null $merchantShopUrl Merchant shop url. - * - * @return self - */ - public function setMerchantShopUrl($merchantShopUrl) - { - $this->container['merchantShopUrl'] = $merchantShopUrl; - - return $this; - } - - /** - * Gets merchantStateProvince - * - * @return string|null - */ - public function getMerchantStateProvince() - { - return $this->container['merchantStateProvince']; - } - - /** - * Sets merchantStateProvince - * - * @param string|null $merchantStateProvince The state/province of the merchant. - * - * @return self - */ - public function setMerchantStateProvince($merchantStateProvince) - { - $this->container['merchantStateProvince'] = $merchantStateProvince; - - return $this; - } - - /** - * Gets merchantStreetAddress - * - * @return string|null - */ - public function getMerchantStreetAddress() - { - return $this->container['merchantStreetAddress']; - } - - /** - * Sets merchantStreetAddress - * - * @param string|null $merchantStreetAddress The street address of the merchant. - * - * @return self - */ - public function setMerchantStreetAddress($merchantStreetAddress) - { - $this->container['merchantStreetAddress'] = $merchantStreetAddress; - - return $this; - } - /** * Gets transactionDescription * @@ -520,30 +327,6 @@ public function setTransactionDescription($transactionDescription) return $this; } - - /** - * Gets zipCode - * - * @return string|null - */ - public function getZipCode() - { - return $this->container['zipCode']; - } - - /** - * Sets zipCode - * - * @param string|null $zipCode The zip code of the account. - * - * @return self - */ - public function setZipCode($zipCode) - { - $this->container['zipCode'] = $zipCode; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -620,10 +403,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 e3e2152a9..f8545822f 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -1840,11 +1840,11 @@ public function setVerificationStatus($verificationStatus) { $allowedValues = $this->getVerificationStatusAllowableValues(); if (!in_array($verificationStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + "verificationStatus: unexpected enum value '%s' - Supported values are [%s]", $verificationStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index c2ec6ebbc..4b874b1f1 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -1801,11 +1801,11 @@ public function setShopperInteraction($shopperInteraction) { $allowedValues = $this->getShopperInteractionAllowableValues(); if (!in_array($shopperInteraction, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'shopperInteraction', must be one of '%s'", + "shopperInteraction: unexpected enum value '%s' - Supported values are [%s]", $shopperInteraction, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -2003,11 +2003,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PayoutSettings.php b/src/Adyen/Model/Management/PayoutSettings.php index db4952c52..c327597b2 100644 --- a/src/Adyen/Model/Management/PayoutSettings.php +++ b/src/Adyen/Model/Management/PayoutSettings.php @@ -490,11 +490,11 @@ public function setPriority($priority) { $allowedValues = $this->getPriorityAllowableValues(); if (!in_array($priority, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'priority', must be one of '%s'", + "priority: unexpected enum value '%s' - Supported values are [%s]", $priority, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -548,11 +548,11 @@ public function setVerificationStatus($verificationStatus) { $allowedValues = $this->getVerificationStatusAllowableValues(); if (!in_array($verificationStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + "verificationStatus: unexpected enum value '%s' - Supported values are [%s]", $verificationStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PulseInfo.php b/src/Adyen/Model/Management/PulseInfo.php index 06a526dad..55e3d29b4 100644 --- a/src/Adyen/Model/Management/PulseInfo.php +++ b/src/Adyen/Model/Management/PulseInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Refunds.php b/src/Adyen/Model/Management/Refunds.php index b2961f402..5e6efdea7 100644 --- a/src/Adyen/Model/Management/Refunds.php +++ b/src/Adyen/Model/Management/Refunds.php @@ -41,7 +41,8 @@ class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'referenced' => '\Adyen\Model\Management\Referenced' + 'referenced' => '\Adyen\Model\Management\Referenced', + 'unreferenced' => '\Adyen\Model\Management\Unreferenced' ]; /** @@ -52,7 +53,8 @@ class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'referenced' => null + 'referenced' => null, + 'unreferenced' => null ]; /** @@ -61,7 +63,8 @@ class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'referenced' => false + 'referenced' => false, + 'unreferenced' => false ]; /** @@ -150,7 +153,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'referenced' => 'referenced' + 'referenced' => 'referenced', + 'unreferenced' => 'unreferenced' ]; /** @@ -159,7 +163,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'referenced' => 'setReferenced' + 'referenced' => 'setReferenced', + 'unreferenced' => 'setUnreferenced' ]; /** @@ -168,7 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'referenced' => 'getReferenced' + 'referenced' => 'getReferenced', + 'unreferenced' => 'getUnreferenced' ]; /** @@ -229,6 +235,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('referenced', $data ?? [], null); + $this->setIfExists('unreferenced', $data ?? [], null); } /** @@ -296,6 +303,30 @@ public function setReferenced($referenced) return $this; } + + /** + * Gets unreferenced + * + * @return \Adyen\Model\Management\Unreferenced|null + */ + public function getUnreferenced() + { + return $this->container['unreferenced']; + } + + /** + * Sets unreferenced + * + * @param \Adyen\Model\Management\Unreferenced|null $unreferenced unreferenced + * + * @return self + */ + public function setUnreferenced($unreferenced) + { + $this->container['unreferenced'] = $unreferenced; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index 90b0cee3f..918b1fd68 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -322,11 +322,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php index 1927cb47e..f0b90ccdc 100644 --- a/src/Adyen/Model/Management/SplitConfigurationLogic.php +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -735,11 +735,11 @@ public function setAcquiringFees($acquiringFees) { $allowedValues = $this->getAcquiringFeesAllowableValues(); if (!in_array($acquiringFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'acquiringFees', must be one of '%s'", + "acquiringFees: unexpected enum value '%s' - Supported values are [%s]", $acquiringFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -793,11 +793,11 @@ public function setAdyenCommission($adyenCommission) { $allowedValues = $this->getAdyenCommissionAllowableValues(); if (!in_array($adyenCommission, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenCommission', must be one of '%s'", + "adyenCommission: unexpected enum value '%s' - Supported values are [%s]", $adyenCommission, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -827,11 +827,11 @@ public function setAdyenFees($adyenFees) { $allowedValues = $this->getAdyenFeesAllowableValues(); if (!in_array($adyenFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenFees', must be one of '%s'", + "adyenFees: unexpected enum value '%s' - Supported values are [%s]", $adyenFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -861,11 +861,11 @@ public function setAdyenMarkup($adyenMarkup) { $allowedValues = $this->getAdyenMarkupAllowableValues(); if (!in_array($adyenMarkup, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenMarkup', must be one of '%s'", + "adyenMarkup: unexpected enum value '%s' - Supported values are [%s]", $adyenMarkup, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -895,11 +895,11 @@ public function setChargeback($chargeback) { $allowedValues = $this->getChargebackAllowableValues(); if (!in_array($chargeback, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargeback', must be one of '%s'", + "chargeback: unexpected enum value '%s' - Supported values are [%s]", $chargeback, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -929,11 +929,11 @@ public function setChargebackCostAllocation($chargebackCostAllocation) { $allowedValues = $this->getChargebackCostAllocationAllowableValues(); if (!in_array($chargebackCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + "chargebackCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $chargebackCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -987,11 +987,11 @@ public function setInterchange($interchange) { $allowedValues = $this->getInterchangeAllowableValues(); if (!in_array($interchange, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'interchange', must be one of '%s'", + "interchange: unexpected enum value '%s' - Supported values are [%s]", $interchange, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1021,11 +1021,11 @@ public function setPaymentFee($paymentFee) { $allowedValues = $this->getPaymentFeeAllowableValues(); if (!in_array($paymentFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'paymentFee', must be one of '%s'", + "paymentFee: unexpected enum value '%s' - Supported values are [%s]", $paymentFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1055,11 +1055,11 @@ public function setRefund($refund) { $allowedValues = $this->getRefundAllowableValues(); if (!in_array($refund, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refund', must be one of '%s'", + "refund: unexpected enum value '%s' - Supported values are [%s]", $refund, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1089,11 +1089,11 @@ public function setRefundCostAllocation($refundCostAllocation) { $allowedValues = $this->getRefundCostAllocationAllowableValues(); if (!in_array($refundCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refundCostAllocation', must be one of '%s'", + "refundCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $refundCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1123,11 +1123,11 @@ public function setRemainder($remainder) { $allowedValues = $this->getRemainderAllowableValues(); if (!in_array($remainder, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'remainder', must be one of '%s'", + "remainder: unexpected enum value '%s' - Supported values are [%s]", $remainder, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1157,11 +1157,11 @@ public function setSchemeFee($schemeFee) { $allowedValues = $this->getSchemeFeeAllowableValues(); if (!in_array($schemeFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'schemeFee', must be one of '%s'", + "schemeFee: unexpected enum value '%s' - Supported values are [%s]", $schemeFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1215,11 +1215,11 @@ public function setSurcharge($surcharge) { $allowedValues = $this->getSurchargeAllowableValues(); if (!in_array($surcharge, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'surcharge', must be one of '%s'", + "surcharge: unexpected enum value '%s' - Supported values are [%s]", $surcharge, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1249,11 +1249,11 @@ public function setTip($tip) { $allowedValues = $this->getTipAllowableValues(); if (!in_array($tip, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'tip', must be one of '%s'", + "tip: unexpected enum value '%s' - Supported values are [%s]", $tip, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index 35a0cdcab..3ad27602c 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])) { @@ -338,6 +338,9 @@ public function listInvalidProperties() if ($this->container['currency'] === null) { $invalidProperties[] = "'currency' can't be null"; } + if ($this->container['fundingSource'] === null) { + $invalidProperties[] = "'fundingSource' can't be null"; + } $allowedValues = $this->getFundingSourceAllowableValues(); if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -407,7 +410,7 @@ public function setCurrency($currency) /** * Gets fundingSource * - * @return string|null + * @return string */ public function getFundingSource() { @@ -417,7 +420,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** + * @param string $fundingSource The funding source of the payment method. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** * * @return self */ @@ -425,11 +428,11 @@ public function setFundingSource($fundingSource) { $allowedValues = $this->getFundingSourceAllowableValues(); if (!in_array($fundingSource, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'fundingSource', must be one of '%s'", + "fundingSource: unexpected enum value '%s' - Supported values are [%s]", $fundingSource, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -507,11 +510,11 @@ public function setShopperInteraction($shopperInteraction) { $allowedValues = $this->getShopperInteractionAllowableValues(); if (!in_array($shopperInteraction, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'shopperInteraction', must be one of '%s'", + "shopperInteraction: unexpected enum value '%s' - Supported values are [%s]", $shopperInteraction, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -619,10 +622,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/StarInfo.php b/src/Adyen/Model/Management/StarInfo.php index bbf43eacb..784491826 100644 --- a/src/Adyen/Model/Management/StarInfo.php +++ b/src/Adyen/Model/Management/StarInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Store.php b/src/Adyen/Model/Management/Store.php index c94f3e23c..4f8000e7f 100644 --- a/src/Adyen/Model/Management/Store.php +++ b/src/Adyen/Model/Management/Store.php @@ -667,11 +667,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index a8dc67a66..13ccac446 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -427,11 +427,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/TerminalConnectivityCellular.php b/src/Adyen/Model/Management/TerminalConnectivityCellular.php index 3ec7113c6..b9faac991 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityCellular.php +++ b/src/Adyen/Model/Management/TerminalConnectivityCellular.php @@ -385,11 +385,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index a6bc85f8d..783fe7d2c 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -350,11 +350,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index 1216b1efb..ef467f002 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index f3bf1c3c4..bb0a4db32 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Unreferenced.php b/src/Adyen/Model/Management/Unreferenced.php new file mode 100644 index 000000000..eed8fd899 --- /dev/null +++ b/src/Adyen/Model/Management/Unreferenced.php @@ -0,0 +1,404 @@ + + */ +class Unreferenced implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Unreferenced'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enableUnreferencedRefunds' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enableUnreferencedRefunds' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'enableUnreferencedRefunds' => 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 = [ + 'enableUnreferencedRefunds' => 'enableUnreferencedRefunds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enableUnreferencedRefunds' => 'setEnableUnreferencedRefunds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enableUnreferencedRefunds' => 'getEnableUnreferencedRefunds' + ]; + + /** + * 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('enableUnreferencedRefunds', $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 enableUnreferencedRefunds + * + * @return bool|null + */ + public function getEnableUnreferencedRefunds() + { + return $this->container['enableUnreferencedRefunds']; + } + + /** + * Sets enableUnreferencedRefunds + * + * @param bool|null $enableUnreferencedRefunds Indicates whether unreferenced refunds are enabled on the terminal. + * + * @return self + */ + public function setEnableUnreferencedRefunds($enableUnreferencedRefunds) + { + $this->container['enableUnreferencedRefunds'] = $enableUnreferencedRefunds; + + 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/UpdateCompanyWebhookRequest.php b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php index 156cf3b55..ce313f7b8 100644 --- a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php @@ -610,11 +610,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -668,11 +668,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -702,11 +702,11 @@ public function setFilterMerchantAccountType($filterMerchantAccountType) { $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'filterMerchantAccountType', must be one of '%s'", + "filterMerchantAccountType: unexpected enum value '%s' - Supported values are [%s]", $filterMerchantAccountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -760,11 +760,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php index 25a0e1a52..0eed0278a 100644 --- a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php @@ -571,11 +571,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -629,11 +629,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -663,11 +663,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php index 0aad886fd..1bfc59092 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -735,11 +735,11 @@ public function setAcquiringFees($acquiringFees) { $allowedValues = $this->getAcquiringFeesAllowableValues(); if (!in_array($acquiringFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'acquiringFees', must be one of '%s'", + "acquiringFees: unexpected enum value '%s' - Supported values are [%s]", $acquiringFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -793,11 +793,11 @@ public function setAdyenCommission($adyenCommission) { $allowedValues = $this->getAdyenCommissionAllowableValues(); if (!in_array($adyenCommission, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenCommission', must be one of '%s'", + "adyenCommission: unexpected enum value '%s' - Supported values are [%s]", $adyenCommission, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -827,11 +827,11 @@ public function setAdyenFees($adyenFees) { $allowedValues = $this->getAdyenFeesAllowableValues(); if (!in_array($adyenFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenFees', must be one of '%s'", + "adyenFees: unexpected enum value '%s' - Supported values are [%s]", $adyenFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -861,11 +861,11 @@ public function setAdyenMarkup($adyenMarkup) { $allowedValues = $this->getAdyenMarkupAllowableValues(); if (!in_array($adyenMarkup, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenMarkup', must be one of '%s'", + "adyenMarkup: unexpected enum value '%s' - Supported values are [%s]", $adyenMarkup, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -895,11 +895,11 @@ public function setChargeback($chargeback) { $allowedValues = $this->getChargebackAllowableValues(); if (!in_array($chargeback, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargeback', must be one of '%s'", + "chargeback: unexpected enum value '%s' - Supported values are [%s]", $chargeback, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -929,11 +929,11 @@ public function setChargebackCostAllocation($chargebackCostAllocation) { $allowedValues = $this->getChargebackCostAllocationAllowableValues(); if (!in_array($chargebackCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + "chargebackCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $chargebackCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -987,11 +987,11 @@ public function setInterchange($interchange) { $allowedValues = $this->getInterchangeAllowableValues(); if (!in_array($interchange, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'interchange', must be one of '%s'", + "interchange: unexpected enum value '%s' - Supported values are [%s]", $interchange, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1021,11 +1021,11 @@ public function setPaymentFee($paymentFee) { $allowedValues = $this->getPaymentFeeAllowableValues(); if (!in_array($paymentFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'paymentFee', must be one of '%s'", + "paymentFee: unexpected enum value '%s' - Supported values are [%s]", $paymentFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1055,11 +1055,11 @@ public function setRefund($refund) { $allowedValues = $this->getRefundAllowableValues(); if (!in_array($refund, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refund', must be one of '%s'", + "refund: unexpected enum value '%s' - Supported values are [%s]", $refund, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1089,11 +1089,11 @@ public function setRefundCostAllocation($refundCostAllocation) { $allowedValues = $this->getRefundCostAllocationAllowableValues(); if (!in_array($refundCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refundCostAllocation', must be one of '%s'", + "refundCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $refundCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1123,11 +1123,11 @@ public function setRemainder($remainder) { $allowedValues = $this->getRemainderAllowableValues(); if (!in_array($remainder, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'remainder', must be one of '%s'", + "remainder: unexpected enum value '%s' - Supported values are [%s]", $remainder, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1157,11 +1157,11 @@ public function setSchemeFee($schemeFee) { $allowedValues = $this->getSchemeFeeAllowableValues(); if (!in_array($schemeFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'schemeFee', must be one of '%s'", + "schemeFee: unexpected enum value '%s' - Supported values are [%s]", $schemeFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1215,11 +1215,11 @@ public function setSurcharge($surcharge) { $allowedValues = $this->getSurchargeAllowableValues(); if (!in_array($surcharge, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'surcharge', must be one of '%s'", + "surcharge: unexpected enum value '%s' - Supported values are [%s]", $surcharge, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1249,11 +1249,11 @@ public function setTip($tip) { $allowedValues = $this->getTipAllowableValues(); if (!in_array($tip, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'tip', must be one of '%s'", + "tip: unexpected enum value '%s' - Supported values are [%s]", $tip, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index 555d87508..e9d4c299c 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])) { @@ -282,6 +282,9 @@ public function listInvalidProperties() if ($this->container['currency'] === null) { $invalidProperties[] = "'currency' can't be null"; } + if ($this->container['fundingSource'] === null) { + $invalidProperties[] = "'fundingSource' can't be null"; + } if ($this->container['paymentMethod'] === null) { $invalidProperties[] = "'paymentMethod' can't be null"; } @@ -330,7 +333,7 @@ public function setCurrency($currency) /** * Gets fundingSource * - * @return string|null + * @return string */ public function getFundingSource() { @@ -340,7 +343,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** + * @param string $fundingSource The funding source of the payment method. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** * * @return self */ @@ -474,10 +477,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/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index 232ee6c0b..adf25b653 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -512,11 +512,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index 0f7ecb13c..7c3741443 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -743,11 +743,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -801,11 +801,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -835,11 +835,11 @@ public function setFilterMerchantAccountType($filterMerchantAccountType) { $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'filterMerchantAccountType', must be one of '%s'", + "filterMerchantAccountType: unexpected enum value '%s' - Supported values are [%s]", $filterMerchantAccountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -989,11 +989,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Service/BalanceControlApi.php b/src/Adyen/Service/BalanceControlApi.php index 8e9b2ac1d..054e9528a 100644 --- a/src/Adyen/Service/BalanceControlApi.php +++ b/src/Adyen/Service/BalanceControlApi.php @@ -42,7 +42,7 @@ public function __construct(Client $client) /** * Start a balance transfer * - * @deprecated since Adyen Balance Control API v1. + * @deprecated since Adyen Balance Control API v1. * @param \Adyen\Model\BalanceControl\BalanceTransferRequest $balanceTransferRequest * @param array|null $requestOptions * @return \Adyen\Model\BalanceControl\BalanceTransferResponse diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index b5bcb0363..72a1fcb62 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index 153d3c872..fe06b0700 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 7300d12ce..e6bc34c2a 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,12 +116,13 @@ public function getApiCredentialDetails(?array $requestOptions = null): \Adyen\M * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index 5c57f0e10..387f6ead3 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,13 +46,14 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index cd2c7a681..b1192762b 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,13 +61,14 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 66db0d719..71b64e329 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,12 +59,13 @@ public function listTerminals(?array $requestOptions = null): \Adyen\Model\Manag * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index 5453bff02..ed5e2e4ae 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $companyId, ?array $requestOptions = null * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index fb166e203..54ce59354 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $merchantId, ?array $requestOptions = nul * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** From 8eaf23fe63ed1e6c64c6f9c9b6b5d067df107d4c Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot Date: Fri, 29 Aug 2025 16:33:06 +0000 Subject: [PATCH 2/2] style(fmt): code formatted --- src/Adyen/Model/BalanceControl/ObjectSerializer.php | 6 ++++-- src/Adyen/Model/Management/ObjectSerializer.php | 6 ++++-- src/Adyen/Service/BalanceControlApi.php | 2 +- .../Service/Management/AllowedOriginsCompanyLevelApi.php | 3 +-- .../Service/Management/AllowedOriginsMerchantLevelApi.php | 3 +-- src/Adyen/Service/Management/MyAPICredentialApi.php | 3 +-- .../Service/Management/PaymentMethodsMerchantLevelApi.php | 3 +-- .../Service/Management/PayoutSettingsMerchantLevelApi.php | 3 +-- src/Adyen/Service/Management/TerminalsTerminalLevelApi.php | 3 +-- src/Adyen/Service/Management/WebhooksCompanyLevelApi.php | 3 +-- src/Adyen/Service/Management/WebhooksMerchantLevelApi.php | 3 +-- 11 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index f5c510cf4..770dc3955 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index 757cbcb0d..09e0b2fce 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -118,7 +118,9 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (!is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } diff --git a/src/Adyen/Service/BalanceControlApi.php b/src/Adyen/Service/BalanceControlApi.php index 054e9528a..8e9b2ac1d 100644 --- a/src/Adyen/Service/BalanceControlApi.php +++ b/src/Adyen/Service/BalanceControlApi.php @@ -42,7 +42,7 @@ public function __construct(Client $client) /** * Start a balance transfer * - * @deprecated since Adyen Balance Control API v1. + * @deprecated since Adyen Balance Control API v1. * @param \Adyen\Model\BalanceControl\BalanceTransferRequest $balanceTransferRequest * @param array|null $requestOptions * @return \Adyen\Model\BalanceControl\BalanceTransferResponse diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index 72a1fcb62..b5bcb0363 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,14 +63,13 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index fe06b0700..153d3c872 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,14 +63,13 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index e6bc34c2a..7300d12ce 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,13 +116,12 @@ public function getApiCredentialDetails(?array $requestOptions = null): \Adyen\M * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index 387f6ead3..5c57f0e10 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,14 +46,13 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index b1192762b..cd2c7a681 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,14 +61,13 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 71b64e329..66db0d719 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,13 +59,12 @@ public function listTerminals(?array $requestOptions = null): \Adyen\Model\Manag * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index ed5e2e4ae..5453bff02 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,14 +92,13 @@ public function listAllWebhooks(string $companyId, ?array $requestOptions = null * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 54ce59354..fb166e203 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,14 +92,13 @@ public function listAllWebhooks(string $merchantId, ?array $requestOptions = nul * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, ?array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /**