From e893223da74ced54e23affae0a94e25e35a768e3 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Fri, 28 Feb 2025 15:35:45 +0000 Subject: [PATCH 1/2] [reformat][adyen-sdk-automation] automated change --- .../Model/AcsWebhooks/ObjectSerializer.php | 9 +- .../Model/BalanceControl/ObjectSerializer.php | 9 +- .../BalancePlatform/CapabilitySettings.php | 8 +- .../BalancePlatform/ObjectSerializer.php | 9 +- .../Model/BinLookup/CostEstimateRequest.php | 2 +- .../Model/BinLookup/ObjectSerializer.php | 9 +- .../Model/Checkout/AdditionalData3DSecure.php | 2 +- .../Model/Checkout/BalanceCheckRequest.php | 2 +- .../Model/Checkout/CheckoutPaymentMethod.php | 35 +- .../Checkout/CreateCheckoutSessionRequest.php | 2 +- .../CreateCheckoutSessionResponse.php | 2 +- src/Adyen/Model/Checkout/FundRecipient.php | 2 +- src/Adyen/Model/Checkout/MbwayDetails.php | 4 +- src/Adyen/Model/Checkout/ObjectSerializer.php | 9 +- src/Adyen/Model/Checkout/PaymentDetails.php | 2 - .../Model/Checkout/PaymentLinkRequest.php | 2 +- .../Model/Checkout/PaymentLinkResponse.php | 2 +- .../Model/Checkout/PaymentMethodsRequest.php | 2 +- .../Model/Checkout/PaymentRefundResponse.php | 31 + src/Adyen/Model/Checkout/PixDetails.php | 564 ++++++++++++++ src/Adyen/Model/Checkout/PixRecurring.php | 694 ++++++++++++++++++ .../Checkout/ResponseAdditionalDataCommon.php | 134 +++- .../Checkout/StoredPaymentMethodResource.php | 2 +- src/Adyen/Model/Checkout/ThreeDSecureData.php | 4 +- src/Adyen/Model/Checkout/VippsDetails.php | 2 +- .../CapabilitySettings.php | 8 +- .../ObjectSerializer.php | 9 +- .../Model/DataProtection/ObjectSerializer.php | 9 +- .../DisputeWebhooks/ObjectSerializer.php | 9 +- src/Adyen/Model/Disputes/ObjectSerializer.php | 9 +- .../LegalEntityManagement/Attachment.php | 8 +- .../LegalEntityManagement/BankAccountInfo.php | 4 +- .../Model/LegalEntityManagement/Document.php | 12 +- .../IdentificationData.php | 4 +- .../ObjectSerializer.php | 9 +- src/Adyen/Model/Management/AffirmInfo.php | 410 +++++++++++ src/Adyen/Model/Management/AndroidApp.php | 39 + .../Model/Management/MeApiCredential.php | 31 - .../Model/Management/ObjectSerializer.php | 9 +- src/Adyen/Model/Management/PayToInfo.php | 444 +++++++++++ src/Adyen/Model/Management/PaymentMethod.php | 93 +++ .../Management/PaymentMethodResponse.php | 8 + .../Management/PaymentMethodSetupInfo.php | 101 +++ .../Management/SplitConfigurationRule.php | 2 +- src/Adyen/Model/Management/Surcharge.php | 43 +- .../Management/UpdatePaymentMethodInfo.php | 31 + .../UpdateSplitConfigurationRuleRequest.php | 2 +- .../ManagementWebhooks/ObjectSerializer.php | 9 +- ...ethodRequestRemovedNotificationRequest.php | 2 +- ...ScheduledForRemovalNotificationRequest.php | 2 +- .../ObjectSerializer.php | 9 +- .../ObjectSerializer.php | 9 +- .../Model/Payments/AdditionalData3DSecure.php | 2 +- src/Adyen/Model/Payments/FundDestination.php | 2 +- src/Adyen/Model/Payments/ObjectSerializer.php | 9 +- src/Adyen/Model/Payments/PaymentRequest.php | 2 +- src/Adyen/Model/Payments/PaymentRequest3d.php | 2 +- .../Model/Payments/PaymentRequest3ds2.php | 2 +- .../Payments/ResponseAdditionalDataCommon.php | 130 +++- src/Adyen/Model/Payments/ThreeDSecureData.php | 4 +- .../Model/PaymentsApp/ObjectSerializer.php | 9 +- src/Adyen/Model/Payout/ObjectSerializer.php | 9 +- src/Adyen/Model/Payout/PayoutRequest.php | 2 +- .../Payout/ResponseAdditionalDataCommon.php | 134 +++- .../Model/PosMobile/ObjectSerializer.php | 9 +- src/Adyen/Model/Recurring/Address.php | 2 +- src/Adyen/Model/Recurring/Amount.php | 2 +- src/Adyen/Model/Recurring/BankAccount.php | 2 +- src/Adyen/Model/Recurring/Card.php | 2 +- .../Model/Recurring/CreatePermitRequest.php | 2 +- .../Model/Recurring/CreatePermitResult.php | 2 +- .../Model/Recurring/DisablePermitRequest.php | 2 +- .../Model/Recurring/DisablePermitResult.php | 2 +- src/Adyen/Model/Recurring/DisableRequest.php | 2 +- src/Adyen/Model/Recurring/DisableResult.php | 2 +- src/Adyen/Model/Recurring/ModelInterface.php | 2 +- src/Adyen/Model/Recurring/Name.php | 2 +- .../Model/Recurring/NotifyShopperRequest.php | 2 +- .../Model/Recurring/NotifyShopperResult.php | 2 +- .../Model/Recurring/ObjectSerializer.php | 11 +- src/Adyen/Model/Recurring/Permit.php | 2 +- .../Model/Recurring/PermitRestriction.php | 2 +- src/Adyen/Model/Recurring/PermitResult.php | 2 +- src/Adyen/Model/Recurring/Recurring.php | 2 +- src/Adyen/Model/Recurring/RecurringDetail.php | 2 +- .../Recurring/RecurringDetailWrapper.php | 2 +- .../Recurring/RecurringDetailsRequest.php | 2 +- .../Recurring/RecurringDetailsResult.php | 2 +- .../ScheduleAccountUpdaterRequest.php | 2 +- .../ScheduleAccountUpdaterResult.php | 2 +- src/Adyen/Model/Recurring/ServiceError.php | 2 +- src/Adyen/Model/Recurring/TokenDetails.php | 2 +- .../Model/ReportWebhooks/ObjectSerializer.php | 9 +- .../Model/StoredValue/ObjectSerializer.php | 9 +- .../TransactionWebhooks/ObjectSerializer.php | 9 +- .../TransferWebhooks/ObjectSerializer.php | 9 +- .../Model/Transfers/ObjectSerializer.php | 9 +- .../BalancePlatform/BalanceAccountsApi.php | 3 +- .../BankAccountValidationApi.php | 3 +- .../BalancePlatform/ManageSCADevicesApi.php | 3 +- .../BalancePlatform/NetworkTokensApi.php | 3 +- src/Adyen/Service/Checkout/RecurringApi.php | 3 +- src/Adyen/Service/Checkout/UtilityApi.php | 2 +- .../BusinessLinesApi.php | 3 +- .../LegalEntityManagement/DocumentsApi.php | 3 +- .../TaxEDeliveryConsentApi.php | 3 +- .../TransferInstrumentsApi.php | 3 +- .../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 +- src/Adyen/Service/RecurringApi.php | 2 +- src/Adyen/Service/Transfers/TransfersApi.php | 6 +- 117 files changed, 3092 insertions(+), 261 deletions(-) create mode 100644 src/Adyen/Model/Checkout/PixDetails.php create mode 100644 src/Adyen/Model/Checkout/PixRecurring.php create mode 100644 src/Adyen/Model/Management/AffirmInfo.php create mode 100644 src/Adyen/Model/Management/PayToInfo.php diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce8..e14421342 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index b5ae3313d..2ed0eb3a0 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index 67e88b5f9..ada0db0b3 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index 141ec623e..fa9af7e82 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BinLookup/CostEstimateRequest.php b/src/Adyen/Model/BinLookup/CostEstimateRequest.php index b3b0d40dd..b303f025f 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateRequest.php +++ b/src/Adyen/Model/BinLookup/CostEstimateRequest.php @@ -611,7 +611,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceeda..09437b7d8 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index de25cee5e..7940bd117 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -487,7 +487,7 @@ public function getThreeDSVersion() /** * Sets threeDSVersion * - * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. + * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. * * @return self */ diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index a8e61d286..533b4a852 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -1487,7 +1487,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 970aae68a..a6e424c18 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -106,6 +106,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'payerSelected' => 'string', 'shopperAccountIdentifier' => 'string', 'virtualPaymentAddress' => 'string', + 'pixRecurring' => '\Adyen\Model\Checkout\PixRecurring', 'bank' => 'string', 'clientType' => 'string', 'identification' => 'string', @@ -189,6 +190,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'payerSelected' => null, 'shopperAccountIdentifier' => null, 'virtualPaymentAddress' => null, + 'pixRecurring' => null, 'bank' => null, 'clientType' => null, 'identification' => null, @@ -270,6 +272,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'payerSelected' => false, 'shopperAccountIdentifier' => false, 'virtualPaymentAddress' => false, + 'pixRecurring' => false, 'bank' => false, 'clientType' => false, 'identification' => false, @@ -431,6 +434,7 @@ public function isNullableSetToNull(string $property): bool 'payerSelected' => 'payerSelected', 'shopperAccountIdentifier' => 'shopperAccountIdentifier', 'virtualPaymentAddress' => 'virtualPaymentAddress', + 'pixRecurring' => 'pixRecurring', 'bank' => 'bank', 'clientType' => 'clientType', 'identification' => 'identification', @@ -512,6 +516,7 @@ public function isNullableSetToNull(string $property): bool 'payerSelected' => 'setPayerSelected', 'shopperAccountIdentifier' => 'setShopperAccountIdentifier', 'virtualPaymentAddress' => 'setVirtualPaymentAddress', + 'pixRecurring' => 'setPixRecurring', 'bank' => 'setBank', 'clientType' => 'setClientType', 'identification' => 'setIdentification', @@ -593,6 +598,7 @@ public function isNullableSetToNull(string $property): bool 'payerSelected' => 'getPayerSelected', 'shopperAccountIdentifier' => 'getShopperAccountIdentifier', 'virtualPaymentAddress' => 'getVirtualPaymentAddress', + 'pixRecurring' => 'getPixRecurring', 'bank' => 'getBank', 'clientType' => 'getClientType', 'identification' => 'getIdentification', @@ -724,6 +730,7 @@ public function __construct(array $data = null) $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('shopperAccountIdentifier', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); + $this->setIfExists('pixRecurring', $data ?? [], null); $this->setIfExists('bank', $data ?? [], null); $this->setIfExists('clientType', $data ?? [], null); $this->setIfExists('identification', $data ?? [], null); @@ -2033,7 +2040,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -2057,7 +2064,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ @@ -2308,6 +2315,30 @@ public function setVirtualPaymentAddress($virtualPaymentAddress) return $this; } + /** + * Gets pixRecurring + * + * @return \Adyen\Model\Checkout\PixRecurring|null + */ + public function getPixRecurring() + { + return $this->container['pixRecurring']; + } + + /** + * Sets pixRecurring + * + * @param \Adyen\Model\Checkout\PixRecurring|null $pixRecurring pixRecurring + * + * @return self + */ + public function setPixRecurring($pixRecurring) + { + $this->container['pixRecurring'] = $pixRecurring; + + return $this; + } + /** * Gets bank * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index 6df952259..ee2540b43 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -1991,7 +1991,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index b30cae2d6..f657c412e 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -2066,7 +2066,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/FundRecipient.php b/src/Adyen/Model/Checkout/FundRecipient.php index 5a9ca982e..981e65aee 100644 --- a/src/Adyen/Model/Checkout/FundRecipient.php +++ b/src/Adyen/Model/Checkout/FundRecipient.php @@ -515,7 +515,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index dc73d3c30..becc716f0 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18f..628f63adc 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index e8a9b81c7..d0eb9e183 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -253,7 +253,6 @@ public function getModelName() public const TYPE_MOLPAY_EBANKING_MY = 'molpay_ebanking_MY'; public const TYPE_MOLPAY_EBANKING_DIRECT_MY = 'molpay_ebanking_direct_MY'; public const TYPE_SWISH = 'swish'; - public const TYPE_PIX = 'pix'; public const TYPE_BIZUM = 'bizum'; public const TYPE_WALLEY = 'walley'; public const TYPE_WALLEY_B2B = 'walley_b2b'; @@ -351,7 +350,6 @@ public function getTypeAllowableValues() self::TYPE_MOLPAY_EBANKING_MY, self::TYPE_MOLPAY_EBANKING_DIRECT_MY, self::TYPE_SWISH, - self::TYPE_PIX, self::TYPE_BIZUM, self::TYPE_WALLEY, self::TYPE_WALLEY_B2B, diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index 97567b6bd..4c1a688e6 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -1418,7 +1418,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index 9b45c173d..0f7fcf1d0 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -1508,7 +1508,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index 0089c1ad8..bdd761522 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -683,7 +683,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentRefundResponse.php b/src/Adyen/Model/Checkout/PaymentRefundResponse.php index 55ce4a54a..fb1b3d502 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundResponse.php +++ b/src/Adyen/Model/Checkout/PaymentRefundResponse.php @@ -45,6 +45,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', + 'capturePspReference' => 'string', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', @@ -65,6 +66,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'amount' => null, + 'capturePspReference' => null, 'lineItems' => null, 'merchantAccount' => null, 'merchantRefundReason' => null, @@ -83,6 +85,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPINullables = [ 'amount' => false, + 'capturePspReference' => false, 'lineItems' => false, 'merchantAccount' => false, 'merchantRefundReason' => true, @@ -181,6 +184,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'amount' => 'amount', + 'capturePspReference' => 'capturePspReference', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', @@ -199,6 +203,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'amount' => 'setAmount', + 'capturePspReference' => 'setCapturePspReference', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', @@ -217,6 +222,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'amount' => 'getAmount', + 'capturePspReference' => 'getCapturePspReference', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', @@ -318,6 +324,7 @@ public function getStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('capturePspReference', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantRefundReason', $data ?? [], null); @@ -428,6 +435,30 @@ public function setAmount($amount) return $this; } + /** + * Gets capturePspReference + * + * @return string|null + */ + public function getCapturePspReference() + { + return $this->container['capturePspReference']; + } + + /** + * Sets capturePspReference + * + * @param string|null $capturePspReference This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. + * + * @return self + */ + public function setCapturePspReference($capturePspReference) + { + $this->container['capturePspReference'] = $capturePspReference; + + return $this; + } + /** * Gets lineItems * diff --git a/src/Adyen/Model/Checkout/PixDetails.php b/src/Adyen/Model/Checkout/PixDetails.php new file mode 100644 index 000000000..752d1a843 --- /dev/null +++ b/src/Adyen/Model/Checkout/PixDetails.php @@ -0,0 +1,564 @@ + + */ +class PixDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PixDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'pixRecurring' => '\Adyen\Model\Checkout\PixRecurring', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'pixRecurring' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'pixRecurring' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'pixRecurring' => 'pixRecurring', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'pixRecurring' => 'setPixRecurring', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'pixRecurring' => 'getPixRecurring', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_PIX = 'pix'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PIX, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('pixRecurring', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets pixRecurring + * + * @return \Adyen\Model\Checkout\PixRecurring|null + */ + public function getPixRecurring() + { + return $this->container['pixRecurring']; + } + + /** + * Sets pixRecurring + * + * @param \Adyen\Model\Checkout\PixRecurring|null $pixRecurring pixRecurring + * + * @return self + */ + public function setPixRecurring($pixRecurring) + { + $this->container['pixRecurring'] = $pixRecurring; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The payment method type. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/PixRecurring.php b/src/Adyen/Model/Checkout/PixRecurring.php new file mode 100644 index 000000000..1e2044a7e --- /dev/null +++ b/src/Adyen/Model/Checkout/PixRecurring.php @@ -0,0 +1,694 @@ + + */ +class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PixRecurring'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'billingDate' => 'string', + 'endsAt' => 'string', + 'frequency' => 'string', + 'minAmount' => '\Adyen\Model\Checkout\Amount', + 'originalPspReference' => 'string', + 'recurringAmount' => '\Adyen\Model\Checkout\Amount', + 'recurringStatement' => 'string', + 'retryPolicy' => 'bool', + 'startsAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'billingDate' => null, + 'endsAt' => null, + 'frequency' => null, + 'minAmount' => null, + 'originalPspReference' => null, + 'recurringAmount' => null, + 'recurringStatement' => null, + 'retryPolicy' => null, + 'startsAt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'billingDate' => false, + 'endsAt' => false, + 'frequency' => false, + 'minAmount' => false, + 'originalPspReference' => false, + 'recurringAmount' => false, + 'recurringStatement' => false, + 'retryPolicy' => false, + 'startsAt' => 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 = [ + 'billingDate' => 'billingDate', + 'endsAt' => 'endsAt', + 'frequency' => 'frequency', + 'minAmount' => 'minAmount', + 'originalPspReference' => 'originalPspReference', + 'recurringAmount' => 'recurringAmount', + 'recurringStatement' => 'recurringStatement', + 'retryPolicy' => 'retryPolicy', + 'startsAt' => 'startsAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'billingDate' => 'setBillingDate', + 'endsAt' => 'setEndsAt', + 'frequency' => 'setFrequency', + 'minAmount' => 'setMinAmount', + 'originalPspReference' => 'setOriginalPspReference', + 'recurringAmount' => 'setRecurringAmount', + 'recurringStatement' => 'setRecurringStatement', + 'retryPolicy' => 'setRetryPolicy', + 'startsAt' => 'setStartsAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'billingDate' => 'getBillingDate', + 'endsAt' => 'getEndsAt', + 'frequency' => 'getFrequency', + 'minAmount' => 'getMinAmount', + 'originalPspReference' => 'getOriginalPspReference', + 'recurringAmount' => 'getRecurringAmount', + 'recurringStatement' => 'getRecurringStatement', + 'retryPolicy' => 'getRetryPolicy', + 'startsAt' => 'getStartsAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FREQUENCY_WEEKLY = 'weekly'; + public const FREQUENCY_MONTHLY = 'monthly'; + public const FREQUENCY_QUARTERLY = 'quarterly'; + public const FREQUENCY_HALF_YEARLY = 'half-yearly'; + public const FREQUENCY_YEARLY = 'yearly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFrequencyAllowableValues() + { + return [ + self::FREQUENCY_WEEKLY, + self::FREQUENCY_MONTHLY, + self::FREQUENCY_QUARTERLY, + self::FREQUENCY_HALF_YEARLY, + self::FREQUENCY_YEARLY, + ]; + } + /** + * 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('billingDate', $data ?? [], null); + $this->setIfExists('endsAt', $data ?? [], null); + $this->setIfExists('frequency', $data ?? [], null); + $this->setIfExists('minAmount', $data ?? [], null); + $this->setIfExists('originalPspReference', $data ?? [], null); + $this->setIfExists('recurringAmount', $data ?? [], null); + $this->setIfExists('recurringStatement', $data ?? [], null); + $this->setIfExists('retryPolicy', $data ?? [], null); + $this->setIfExists('startsAt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFrequencyAllowableValues(); + if (!is_null($this->container['frequency']) && !in_array($this->container['frequency'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'frequency', must be one of '%s'", + $this->container['frequency'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets billingDate + * + * @return string|null + */ + public function getBillingDate() + { + return $this->container['billingDate']; + } + + /** + * Sets billingDate + * + * @param string|null $billingDate The date on which the shopper's payment method will be charged, in YYYY-MM-DD format. + * + * @return self + */ + public function setBillingDate($billingDate) + { + $this->container['billingDate'] = $billingDate; + + return $this; + } + + /** + * Gets endsAt + * + * @return string|null + */ + public function getEndsAt() + { + return $this->container['endsAt']; + } + + /** + * Sets endsAt + * + * @param string|null $endsAt End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper. + * + * @return self + */ + public function setEndsAt($endsAt) + { + $this->container['endsAt'] = $endsAt; + + return $this; + } + + /** + * Gets frequency + * + * @return string|null + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string|null $frequency The frequency at which the shopper will be charged. + * + * @return self + */ + public function setFrequency($frequency) + { + $allowedValues = $this->getFrequencyAllowableValues(); + if (!in_array($frequency, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'frequency', must be one of '%s'", + $frequency, + implode("', '", $allowedValues) + ) + ); + } + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets minAmount + * + * @return \Adyen\Model\Checkout\Amount|null + */ + public function getMinAmount() + { + return $this->container['minAmount']; + } + + /** + * Sets minAmount + * + * @param \Adyen\Model\Checkout\Amount|null $minAmount minAmount + * + * @return self + */ + public function setMinAmount($minAmount) + { + $this->container['minAmount'] = $minAmount; + + return $this; + } + + /** + * Gets originalPspReference + * + * @return string|null + */ + public function getOriginalPspReference() + { + return $this->container['originalPspReference']; + } + + /** + * Sets originalPspReference + * + * @param string|null $originalPspReference The pspReference for the failed recurring payment. Find this in AUTHORISATION webhook you received after the billing date. + * + * @return self + */ + public function setOriginalPspReference($originalPspReference) + { + $this->container['originalPspReference'] = $originalPspReference; + + return $this; + } + + /** + * Gets recurringAmount + * + * @return \Adyen\Model\Checkout\Amount|null + */ + public function getRecurringAmount() + { + return $this->container['recurringAmount']; + } + + /** + * Sets recurringAmount + * + * @param \Adyen\Model\Checkout\Amount|null $recurringAmount recurringAmount + * + * @return self + */ + public function setRecurringAmount($recurringAmount) + { + $this->container['recurringAmount'] = $recurringAmount; + + return $this; + } + + /** + * Gets recurringStatement + * + * @return string|null + */ + public function getRecurringStatement() + { + return $this->container['recurringStatement']; + } + + /** + * Sets recurringStatement + * + * @param string|null $recurringStatement The text that that will be shown on the shopper's bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. Maximum length: 35 characters. + * + * @return self + */ + public function setRecurringStatement($recurringStatement) + { + $this->container['recurringStatement'] = $recurringStatement; + + return $this; + } + + /** + * Gets retryPolicy + * + * @return bool|null + */ + public function getRetryPolicy() + { + return $this->container['retryPolicy']; + } + + /** + * Sets retryPolicy + * + * @param bool|null $retryPolicy When set to true, you can retry for failed recurring payments. The default value is true. + * + * @return self + */ + public function setRetryPolicy($retryPolicy) + { + $this->container['retryPolicy'] = $retryPolicy; + + return $this; + } + + /** + * Gets startsAt + * + * @return string|null + */ + public function getStartsAt() + { + return $this->container['startsAt']; + } + + /** + * Sets startsAt + * + * @param string|null $startsAt Start date of the billing plan, in YYYY-MM-DD format. The default value is the transaction date. + * + * @return self + */ + public function setStartsAt($startsAt) + { + $this->container['startsAt'] = $startsAt; + + 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/Checkout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index 92cd71d47..c0cd9de8f 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -101,6 +101,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => 'string', 'threeDOfferedResponse' => 'string', 'threeDSVersion' => 'string', + 'tokenizationShopperReference' => 'string', + 'tokenizationStoreOperationType' => 'string', + 'tokenizationStoredPaymentMethodId' => 'string', 'visaTransactionId' => 'string', 'xid' => 'string' ]; @@ -170,6 +173,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => null, 'threeDOfferedResponse' => null, 'threeDSVersion' => null, + 'tokenizationShopperReference' => null, + 'tokenizationStoreOperationType' => null, + 'tokenizationStoredPaymentMethodId' => null, 'visaTransactionId' => null, 'xid' => null ]; @@ -237,6 +243,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => false, 'threeDOfferedResponse' => false, 'threeDSVersion' => false, + 'tokenizationShopperReference' => false, + 'tokenizationStoreOperationType' => false, + 'tokenizationStoredPaymentMethodId' => false, 'visaTransactionId' => false, 'xid' => false ]; @@ -384,6 +393,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'threeDOffered', 'threeDOfferedResponse' => 'threeDOfferedResponse', 'threeDSVersion' => 'threeDSVersion', + 'tokenizationShopperReference' => 'tokenization.shopperReference', + 'tokenizationStoreOperationType' => 'tokenization.store.operationType', + 'tokenizationStoredPaymentMethodId' => 'tokenization.storedPaymentMethodId', 'visaTransactionId' => 'visaTransactionId', 'xid' => 'xid' ]; @@ -451,6 +463,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'setThreeDOffered', 'threeDOfferedResponse' => 'setThreeDOfferedResponse', 'threeDSVersion' => 'setThreeDSVersion', + 'tokenizationShopperReference' => 'setTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'setTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'setTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'setVisaTransactionId', 'xid' => 'setXid' ]; @@ -518,6 +533,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'getThreeDOffered', 'threeDOfferedResponse' => 'getThreeDOfferedResponse', 'threeDSVersion' => 'getThreeDSVersion', + 'tokenizationShopperReference' => 'getTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'getTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'getTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'getVisaTransactionId', 'xid' => 'getXid' ]; @@ -568,6 +586,9 @@ public function getModelName() public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + public const TOKENIZATION_STORE_OPERATION_TYPE_CREATED = 'created'; + public const TOKENIZATION_STORE_OPERATION_TYPE_UPDATED = 'updated'; + public const TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING = 'alreadyExisting'; /** * Gets allowable values of the enum @@ -594,6 +615,19 @@ public function getRecurringProcessingModelAllowableValues() self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenizationStoreOperationTypeAllowableValues() + { + return [ + self::TOKENIZATION_STORE_OPERATION_TYPE_CREATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_UPDATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING, + ]; + } /** * Associative array for storing property values * @@ -666,6 +700,9 @@ public function __construct(array $data = null) $this->setIfExists('threeDOffered', $data ?? [], null); $this->setIfExists('threeDOfferedResponse', $data ?? [], null); $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenizationShopperReference', $data ?? [], null); + $this->setIfExists('tokenizationStoreOperationType', $data ?? [], null); + $this->setIfExists('tokenizationStoredPaymentMethodId', $data ?? [], null); $this->setIfExists('visaTransactionId', $data ?? [], null); $this->setIfExists('xid', $data ?? [], null); } @@ -715,6 +752,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!is_null($this->container['tokenizationStoreOperationType']) && !in_array($this->container['tokenizationStoreOperationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $this->container['tokenizationStoreOperationType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1752,6 +1798,7 @@ public function setRecurringFirstPspReference($recurringFirstPspReference) * Gets recurringRecurringDetailReference * * @return string|null + * @deprecated since Adyen Checkout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function getRecurringRecurringDetailReference() { @@ -1764,6 +1811,7 @@ public function getRecurringRecurringDetailReference() * @param string|null $recurringRecurringDetailReference The reference that uniquely identifies the recurring transaction. * * @return self + * @deprecated since Adyen Checkout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) { @@ -1776,6 +1824,7 @@ public function setRecurringRecurringDetailReference($recurringRecurringDetailRe * Gets recurringShopperReference * * @return string|null + * @deprecated since Adyen Checkout API v68. "Use tokenization.shopperReference instead." */ public function getRecurringShopperReference() { @@ -1788,6 +1837,7 @@ public function getRecurringShopperReference() * @param string|null $recurringShopperReference The provided reference of the shopper for a recurring transaction. * * @return self + * @deprecated since Adyen Checkout API v68. "Use tokenization.shopperReference instead." */ public function setRecurringShopperReference($recurringShopperReference) { @@ -2118,6 +2168,88 @@ public function setThreeDSVersion($threeDSVersion) return $this; } + /** + * Gets tokenizationShopperReference + * + * @return string|null + */ + public function getTokenizationShopperReference() + { + return $this->container['tokenizationShopperReference']; + } + + /** + * Sets tokenizationShopperReference + * + * @param string|null $tokenizationShopperReference The reference for the shopper that you sent when tokenizing the payment details. + * + * @return self + */ + public function setTokenizationShopperReference($tokenizationShopperReference) + { + $this->container['tokenizationShopperReference'] = $tokenizationShopperReference; + + return $this; + } + + /** + * Gets tokenizationStoreOperationType + * + * @return string|null + */ + public function getTokenizationStoreOperationType() + { + return $this->container['tokenizationStoreOperationType']; + } + + /** + * Sets tokenizationStoreOperationType + * + * @param string|null $tokenizationStoreOperationType The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. + * + * @return self + */ + public function setTokenizationStoreOperationType($tokenizationStoreOperationType) + { + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!in_array($tokenizationStoreOperationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $tokenizationStoreOperationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenizationStoreOperationType'] = $tokenizationStoreOperationType; + + return $this; + } + + /** + * Gets tokenizationStoredPaymentMethodId + * + * @return string|null + */ + public function getTokenizationStoredPaymentMethodId() + { + return $this->container['tokenizationStoredPaymentMethodId']; + } + + /** + * Sets tokenizationStoredPaymentMethodId + * + * @param string|null $tokenizationStoredPaymentMethodId The reference that uniquely identifies tokenized payment details. + * + * @return self + */ + public function setTokenizationStoredPaymentMethodId($tokenizationStoredPaymentMethodId) + { + $this->container['tokenizationStoredPaymentMethodId'] = $tokenizationStoredPaymentMethodId; + + return $this; + } + /** * Gets visaTransactionId * @@ -2155,7 +2287,7 @@ public function getXid() /** * Sets xid * - * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= * * @return self */ diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php index 73425d162..54d0fb23d 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php @@ -737,7 +737,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Checkout/ThreeDSecureData.php b/src/Adyen/Model/Checkout/ThreeDSecureData.php index 949d0c20a..9dc5f6b56 100644 --- a/src/Adyen/Model/Checkout/ThreeDSecureData.php +++ b/src/Adyen/Model/Checkout/ThreeDSecureData.php @@ -461,7 +461,7 @@ public function getAuthenticationResponse() /** * Sets authenticationResponse * - * @param string|null $authenticationResponse In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. + * @param string|null $authenticationResponse In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. * * @return self */ @@ -577,7 +577,7 @@ public function getDirectoryResponse() /** * Sets directoryResponse * - * @param string|null $directoryResponse In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. + * @param string|null $directoryResponse In 3D Secure 2, this is the `transStatus` from the `ARes`. * * @return self */ diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index a47f75bce..76b60fbfc 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 77bba385d..478ff8914 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 6629bee4b..2d912cd58 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733ae..fe8491817 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php b/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php index 40a36f745..a431ce10c 100644 --- a/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index 5ef9f66af..d363f9e2a 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/Attachment.php b/src/Adyen/Model/LegalEntityManagement/Attachment.php index 8a8db33dd..f16ea2d14 100644 --- a/src/Adyen/Model/LegalEntityManagement/Attachment.php +++ b/src/Adyen/Model/LegalEntityManagement/Attachment.php @@ -335,7 +335,7 @@ public function setContent($content) * Gets contentType * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getContentType() { @@ -348,7 +348,7 @@ public function getContentType() * @param string|null $contentType The file format. Possible values: **application/pdf**, **image/jpg**, **image/jpeg**, **image/png**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setContentType($contentType) { @@ -361,7 +361,7 @@ public function setContentType($contentType) * Gets filename * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getFilename() { @@ -374,7 +374,7 @@ public function getFilename() * @param string|null $filename The name of the file including the file extension. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setFilename($filename) { diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 66471833f..607f10c1c 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -332,7 +332,7 @@ public function setAccountIdentification($accountIdentification) * Gets accountType * * @return string|null - * @deprecated since Legal Entity Management API v2. + * @deprecated since Legal Entity Management API v2. */ public function getAccountType() { @@ -345,7 +345,7 @@ public function getAccountType() * @param string|null $accountType The type of bank account. * * @return self - * @deprecated since Legal Entity Management API v2. + * @deprecated since Legal Entity Management API v2. */ public function setAccountType($accountType) { diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 46d18998f..5b845357f 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -523,7 +523,7 @@ public function setDescription($description) * Gets expiryDate * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getExpiryDate() { @@ -536,7 +536,7 @@ public function getExpiryDate() * @param string|null $expiryDate The expiry date of the document, in YYYY-MM-DD format. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setExpiryDate($expiryDate) { @@ -597,7 +597,7 @@ public function setId($id) * Gets issuerCountry * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerCountry() { @@ -610,7 +610,7 @@ public function getIssuerCountry() * @param string|null $issuerCountry The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { @@ -623,7 +623,7 @@ public function setIssuerCountry($issuerCountry) * Gets issuerState * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerState() { @@ -636,7 +636,7 @@ public function getIssuerState() * @param string|null $issuerState The state or province where the document was issued (AU only). * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerState($issuerState) { diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 4993dc186..8798087c1 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -400,7 +400,7 @@ public function setExpiryDate($expiryDate) * Gets issuerCountry * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerCountry() { @@ -413,7 +413,7 @@ public function getIssuerCountry() * @param string|null $issuerCountry The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d7..66642b915 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/AffirmInfo.php b/src/Adyen/Model/Management/AffirmInfo.php new file mode 100644 index 000000000..d0b069911 --- /dev/null +++ b/src/Adyen/Model/Management/AffirmInfo.php @@ -0,0 +1,410 @@ + + */ +class AffirmInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AffirmInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'supportEmail' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'supportEmail' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'supportEmail' => 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 = [ + 'supportEmail' => 'supportEmail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'supportEmail' => 'setSupportEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'supportEmail' => 'getSupportEmail' + ]; + + /** + * 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('supportEmail', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['supportEmail'] === null) { + $invalidProperties[] = "'supportEmail' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets supportEmail + * + * @return string + */ + public function getSupportEmail() + { + return $this->container['supportEmail']; + } + + /** + * Sets supportEmail + * + * @param string $supportEmail Merchant support email + * + * @return self + */ + public function setSupportEmail($supportEmail) + { + $this->container['supportEmail'] = $supportEmail; + + 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/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index 838aec4bb..ce05433bc 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -263,7 +263,27 @@ public function getModelName() return self::$openAPIModelName; } + public const STATUS_ARCHIVED = 'archived'; + public const STATUS_ERROR = 'error'; + public const STATUS_INVALID = 'invalid'; + public const STATUS_PROCESSING = 'processing'; + public const STATUS_READY = 'ready'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ARCHIVED, + self::STATUS_ERROR, + self::STATUS_INVALID, + self::STATUS_PROCESSING, + self::STATUS_READY, + ]; + } /** * Associative array for storing property values * @@ -323,6 +343,15 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -503,6 +532,16 @@ public function getStatus() */ public function setStatus($status) { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Management/MeApiCredential.php b/src/Adyen/Model/Management/MeApiCredential.php index 430d88944..e1cfe2199 100644 --- a/src/Adyen/Model/Management/MeApiCredential.php +++ b/src/Adyen/Model/Management/MeApiCredential.php @@ -48,7 +48,6 @@ class MeApiCredential implements ModelInterface, ArrayAccess, \JsonSerializable 'active' => 'bool', 'allowedIpAddresses' => 'string[]', 'allowedOrigins' => '\Adyen\Model\Management\AllowedOrigin[]', - 'associatedMerchantAccounts' => 'string[]', 'clientKey' => 'string', 'companyName' => 'string', 'description' => 'string', @@ -69,7 +68,6 @@ class MeApiCredential implements ModelInterface, ArrayAccess, \JsonSerializable 'active' => null, 'allowedIpAddresses' => null, 'allowedOrigins' => null, - 'associatedMerchantAccounts' => null, 'clientKey' => null, 'companyName' => null, 'description' => null, @@ -88,7 +86,6 @@ class MeApiCredential implements ModelInterface, ArrayAccess, \JsonSerializable 'active' => false, 'allowedIpAddresses' => false, 'allowedOrigins' => false, - 'associatedMerchantAccounts' => false, 'clientKey' => false, 'companyName' => false, 'description' => false, @@ -187,7 +184,6 @@ public function isNullableSetToNull(string $property): bool 'active' => 'active', 'allowedIpAddresses' => 'allowedIpAddresses', 'allowedOrigins' => 'allowedOrigins', - 'associatedMerchantAccounts' => 'associatedMerchantAccounts', 'clientKey' => 'clientKey', 'companyName' => 'companyName', 'description' => 'description', @@ -206,7 +202,6 @@ public function isNullableSetToNull(string $property): bool 'active' => 'setActive', 'allowedIpAddresses' => 'setAllowedIpAddresses', 'allowedOrigins' => 'setAllowedOrigins', - 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', 'clientKey' => 'setClientKey', 'companyName' => 'setCompanyName', 'description' => 'setDescription', @@ -225,7 +220,6 @@ public function isNullableSetToNull(string $property): bool 'active' => 'getActive', 'allowedIpAddresses' => 'getAllowedIpAddresses', 'allowedOrigins' => 'getAllowedOrigins', - 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', 'clientKey' => 'getClientKey', 'companyName' => 'getCompanyName', 'description' => 'getDescription', @@ -295,7 +289,6 @@ public function __construct(array $data = null) $this->setIfExists('active', $data ?? [], null); $this->setIfExists('allowedIpAddresses', $data ?? [], null); $this->setIfExists('allowedOrigins', $data ?? [], null); - $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); $this->setIfExists('clientKey', $data ?? [], null); $this->setIfExists('companyName', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); @@ -460,30 +453,6 @@ public function setAllowedOrigins($allowedOrigins) return $this; } - /** - * Gets associatedMerchantAccounts - * - * @return string[]|null - */ - public function getAssociatedMerchantAccounts() - { - return $this->container['associatedMerchantAccounts']; - } - - /** - * Sets associatedMerchantAccounts - * - * @param string[]|null $associatedMerchantAccounts List of merchant accounts that the API credential has explicit access to. If the credential has access to a company, this implies access to all merchant accounts and no merchants for that company will be included. - * - * @return self - */ - public function setAssociatedMerchantAccounts($associatedMerchantAccounts) - { - $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; - - return $this; - } - /** * Gets clientKey * diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf9..2ff0b7ef6 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/PayToInfo.php b/src/Adyen/Model/Management/PayToInfo.php new file mode 100644 index 000000000..4629696fc --- /dev/null +++ b/src/Adyen/Model/Management/PayToInfo.php @@ -0,0 +1,444 @@ + + */ +class PayToInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PayToInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantName' => 'string', + 'payToPurpose' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantName' => null, + 'payToPurpose' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantName' => false, + 'payToPurpose' => 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 = [ + 'merchantName' => 'merchantName', + 'payToPurpose' => 'payToPurpose' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantName' => 'setMerchantName', + 'payToPurpose' => 'setPayToPurpose' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantName' => 'getMerchantName', + 'payToPurpose' => 'getPayToPurpose' + ]; + + /** + * 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('merchantName', $data ?? [], null); + $this->setIfExists('payToPurpose', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['merchantName'] === null) { + $invalidProperties[] = "'merchantName' can't be null"; + } + if ($this->container['payToPurpose'] === null) { + $invalidProperties[] = "'payToPurpose' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets merchantName + * + * @return string + */ + public function getMerchantName() + { + return $this->container['merchantName']; + } + + /** + * Sets merchantName + * + * @param string $merchantName Merchant name displayed to the shopper in the Agreements + * + * @return self + */ + public function setMerchantName($merchantName) + { + $this->container['merchantName'] = $merchantName; + + return $this; + } + + /** + * Gets payToPurpose + * + * @return string + */ + public function getPayToPurpose() + { + return $this->container['payToPurpose']; + } + + /** + * Sets payToPurpose + * + * @param string $payToPurpose Represents the purpose of the Agreements created, it relates to the business type **Allowed values**: mortgage, utility, loan, gambling, retail, salary, personal, government, pension, tax, other + * + * @return self + */ + public function setPayToPurpose($payToPurpose) + { + $this->container['payToPurpose'] = $payToPurpose; + + 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/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 4779da28a..4252077af 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -45,6 +45,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'accel' => '\Adyen\Model\Management\AccelInfo', + 'affirm' => '\Adyen\Model\Management\AffirmInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'allowed' => 'bool', 'amex' => '\Adyen\Model\Management\AmexInfo', @@ -59,6 +60,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'customRoutingFlags' => 'string[]', 'diners' => '\Adyen\Model\Management\DinersInfo', 'discover' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'enabled' => 'bool', 'giroPay' => '\Adyen\Model\Management\GiroPayInfo', @@ -75,6 +77,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'nyce' => '\Adyen\Model\Management\NyceInfo', 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'payto' => '\Adyen\Model\Management\PayToInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', @@ -102,6 +105,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'accel' => null, + 'affirm' => null, 'afterpayTouch' => null, 'allowed' => null, 'amex' => null, @@ -116,6 +120,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'customRoutingFlags' => null, 'diners' => null, 'discover' => null, + 'eftDirectdebitCA' => null, 'eftposAustralia' => null, 'enabled' => null, 'giroPay' => null, @@ -132,6 +137,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'nyce' => null, 'payme' => null, 'paypal' => null, + 'payto' => null, 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, @@ -157,6 +163,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'accel' => false, + 'affirm' => false, 'afterpayTouch' => false, 'allowed' => false, 'amex' => false, @@ -171,6 +178,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'customRoutingFlags' => false, 'diners' => false, 'discover' => false, + 'eftDirectdebitCA' => false, 'eftposAustralia' => false, 'enabled' => false, 'giroPay' => false, @@ -187,6 +195,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'nyce' => false, 'payme' => false, 'paypal' => false, + 'payto' => false, 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, @@ -292,6 +301,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accel' => 'accel', + 'affirm' => 'affirm', 'afterpayTouch' => 'afterpayTouch', 'allowed' => 'allowed', 'amex' => 'amex', @@ -306,6 +316,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'customRoutingFlags', 'diners' => 'diners', 'discover' => 'discover', + 'eftDirectdebitCA' => 'eft_directdebit_CA', 'eftposAustralia' => 'eftpos_australia', 'enabled' => 'enabled', 'giroPay' => 'giroPay', @@ -322,6 +333,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'nyce', 'payme' => 'payme', 'paypal' => 'paypal', + 'payto' => 'payto', 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', @@ -347,6 +359,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accel' => 'setAccel', + 'affirm' => 'setAffirm', 'afterpayTouch' => 'setAfterpayTouch', 'allowed' => 'setAllowed', 'amex' => 'setAmex', @@ -361,6 +374,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'setCustomRoutingFlags', 'diners' => 'setDiners', 'discover' => 'setDiscover', + 'eftDirectdebitCA' => 'setEftDirectdebitCA', 'eftposAustralia' => 'setEftposAustralia', 'enabled' => 'setEnabled', 'giroPay' => 'setGiroPay', @@ -377,6 +391,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'setNyce', 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'payto' => 'setPayto', 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', @@ -402,6 +417,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accel' => 'getAccel', + 'affirm' => 'getAffirm', 'afterpayTouch' => 'getAfterpayTouch', 'allowed' => 'getAllowed', 'amex' => 'getAmex', @@ -416,6 +432,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'getCustomRoutingFlags', 'diners' => 'getDiners', 'discover' => 'getDiscover', + 'eftDirectdebitCA' => 'getEftDirectdebitCA', 'eftposAustralia' => 'getEftposAustralia', 'enabled' => 'getEnabled', 'giroPay' => 'getGiroPay', @@ -432,6 +449,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'getNyce', 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'payto' => 'getPayto', 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', @@ -526,6 +544,7 @@ public function getVerificationStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accel', $data ?? [], null); + $this->setIfExists('affirm', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('allowed', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); @@ -540,6 +559,7 @@ public function __construct(array $data = null) $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('diners', $data ?? [], null); $this->setIfExists('discover', $data ?? [], null); + $this->setIfExists('eftDirectdebitCA', $data ?? [], null); $this->setIfExists('eftposAustralia', $data ?? [], null); $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('giroPay', $data ?? [], null); @@ -556,6 +576,7 @@ public function __construct(array $data = null) $this->setIfExists('nyce', $data ?? [], null); $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('payto', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); @@ -652,6 +673,30 @@ public function setAccel($accel) return $this; } + /** + * Gets affirm + * + * @return \Adyen\Model\Management\AffirmInfo|null + */ + public function getAffirm() + { + return $this->container['affirm']; + } + + /** + * Sets affirm + * + * @param \Adyen\Model\Management\AffirmInfo|null $affirm affirm + * + * @return self + */ + public function setAffirm($affirm) + { + $this->container['affirm'] = $affirm; + + return $this; + } + /** * Gets afterpayTouch * @@ -988,6 +1033,30 @@ public function setDiscover($discover) return $this; } + /** + * Gets eftDirectdebitCA + * + * @return \Adyen\Model\Management\GenericPmWithTdiInfo|null + */ + public function getEftDirectdebitCA() + { + return $this->container['eftDirectdebitCA']; + } + + /** + * Sets eftDirectdebitCA + * + * @param \Adyen\Model\Management\GenericPmWithTdiInfo|null $eftDirectdebitCA eftDirectdebitCA + * + * @return self + */ + public function setEftDirectdebitCA($eftDirectdebitCA) + { + $this->container['eftDirectdebitCA'] = $eftDirectdebitCA; + + return $this; + } + /** * Gets eftposAustralia * @@ -1372,6 +1441,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets payto + * + * @return \Adyen\Model\Management\PayToInfo|null + */ + public function getPayto() + { + return $this->container['payto']; + } + + /** + * Sets payto + * + * @param \Adyen\Model\Management\PayToInfo|null $payto payto + * + * @return self + */ + public function setPayto($payto) + { + $this->container['payto'] = $payto; + + return $this; + } + /** * Gets pulse * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index bd4b5a82e..6bcc0acc9 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -240,11 +240,13 @@ public function getModelName() } public const TYPES_WITH_ERRORS_ACCEL = 'accel'; + public const TYPES_WITH_ERRORS_ACH = 'ach'; public const TYPES_WITH_ERRORS_AFFIRM = 'affirm'; public const TYPES_WITH_ERRORS_AFTERPAYTOUCH = 'afterpaytouch'; public const TYPES_WITH_ERRORS_ALELO = 'alelo'; public const TYPES_WITH_ERRORS_ALIPAY = 'alipay'; public const TYPES_WITH_ERRORS_ALIPAY_HK = 'alipay_hk'; + public const TYPES_WITH_ERRORS_ALIPAY_WAP = 'alipay_wap'; public const TYPES_WITH_ERRORS_AMEX = 'amex'; public const TYPES_WITH_ERRORS_APPLEPAY = 'applepay'; public const TYPES_WITH_ERRORS_BANESE_CARD = 'banese_card'; @@ -264,6 +266,7 @@ public function getModelName() public const TYPES_WITH_ERRORS_DIRECTDEBIT_GB = 'directdebit_GB'; public const TYPES_WITH_ERRORS_DISCOVER = 'discover'; public const TYPES_WITH_ERRORS_EBANKING_FI = 'ebanking_FI'; + public const TYPES_WITH_ERRORS_EFT_DIRECTDEBIT_CA = 'eft_directdebit_CA'; public const TYPES_WITH_ERRORS_EFTPOS_AUSTRALIA = 'eftpos_australia'; public const TYPES_WITH_ERRORS_ELO = 'elo'; public const TYPES_WITH_ERRORS_ELOCREDIT = 'elocredit'; @@ -294,6 +297,7 @@ public function getModelName() public const TYPES_WITH_ERRORS_PAYNOW_POS = 'paynow_pos'; public const TYPES_WITH_ERRORS_PAYPAL = 'paypal'; public const TYPES_WITH_ERRORS_PAYSHOP = 'payshop'; + public const TYPES_WITH_ERRORS_PAYTO = 'payto'; public const TYPES_WITH_ERRORS_PULSE = 'pulse'; public const TYPES_WITH_ERRORS_SODEXO = 'sodexo'; public const TYPES_WITH_ERRORS_STAR = 'star'; @@ -322,11 +326,13 @@ public function getTypesWithErrorsAllowableValues() { return [ self::TYPES_WITH_ERRORS_ACCEL, + self::TYPES_WITH_ERRORS_ACH, self::TYPES_WITH_ERRORS_AFFIRM, self::TYPES_WITH_ERRORS_AFTERPAYTOUCH, self::TYPES_WITH_ERRORS_ALELO, self::TYPES_WITH_ERRORS_ALIPAY, self::TYPES_WITH_ERRORS_ALIPAY_HK, + self::TYPES_WITH_ERRORS_ALIPAY_WAP, self::TYPES_WITH_ERRORS_AMEX, self::TYPES_WITH_ERRORS_APPLEPAY, self::TYPES_WITH_ERRORS_BANESE_CARD, @@ -346,6 +352,7 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_DIRECTDEBIT_GB, self::TYPES_WITH_ERRORS_DISCOVER, self::TYPES_WITH_ERRORS_EBANKING_FI, + self::TYPES_WITH_ERRORS_EFT_DIRECTDEBIT_CA, self::TYPES_WITH_ERRORS_EFTPOS_AUSTRALIA, self::TYPES_WITH_ERRORS_ELO, self::TYPES_WITH_ERRORS_ELOCREDIT, @@ -376,6 +383,7 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_PAYNOW_POS, self::TYPES_WITH_ERRORS_PAYPAL, self::TYPES_WITH_ERRORS_PAYSHOP, + self::TYPES_WITH_ERRORS_PAYTO, self::TYPES_WITH_ERRORS_PULSE, self::TYPES_WITH_ERRORS_SODEXO, self::TYPES_WITH_ERRORS_STAR, diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index f8e264955..d78f964c7 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -45,6 +45,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'accel' => '\Adyen\Model\Management\AccelInfo', + 'affirm' => '\Adyen\Model\Management\AffirmInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'amex' => '\Adyen\Model\Management\AmexInfo', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', @@ -58,6 +59,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'customRoutingFlags' => 'string[]', 'diners' => '\Adyen\Model\Management\DinersInfo', 'discover' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'giroPay' => '\Adyen\Model\Management\GiroPayInfo', 'girocard' => '\Adyen\Model\Management\GenericPmWithTdiInfo', @@ -72,6 +74,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'nyce' => '\Adyen\Model\Management\NyceInfo', 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'payto' => '\Adyen\Model\Management\PayToInfo', 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', @@ -98,6 +101,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'accel' => null, + 'affirm' => null, 'afterpayTouch' => null, 'amex' => null, 'applePay' => null, @@ -111,6 +115,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'customRoutingFlags' => null, 'diners' => null, 'discover' => null, + 'eftDirectdebitCA' => null, 'eftposAustralia' => null, 'giroPay' => null, 'girocard' => null, @@ -125,6 +130,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'nyce' => null, 'payme' => null, 'paypal' => null, + 'payto' => null, 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, @@ -149,6 +155,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPINullables = [ 'accel' => false, + 'affirm' => false, 'afterpayTouch' => false, 'amex' => false, 'applePay' => false, @@ -162,6 +169,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'customRoutingFlags' => false, 'diners' => false, 'discover' => false, + 'eftDirectdebitCA' => false, 'eftposAustralia' => false, 'giroPay' => false, 'girocard' => false, @@ -176,6 +184,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'nyce' => false, 'payme' => false, 'paypal' => false, + 'payto' => false, 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, @@ -280,6 +289,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accel' => 'accel', + 'affirm' => 'affirm', 'afterpayTouch' => 'afterpayTouch', 'amex' => 'amex', 'applePay' => 'applePay', @@ -293,6 +303,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'customRoutingFlags', 'diners' => 'diners', 'discover' => 'discover', + 'eftDirectdebitCA' => 'eft_directdebit_CA', 'eftposAustralia' => 'eftpos_australia', 'giroPay' => 'giroPay', 'girocard' => 'girocard', @@ -307,6 +318,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'nyce', 'payme' => 'payme', 'paypal' => 'paypal', + 'payto' => 'payto', 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', @@ -331,6 +343,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accel' => 'setAccel', + 'affirm' => 'setAffirm', 'afterpayTouch' => 'setAfterpayTouch', 'amex' => 'setAmex', 'applePay' => 'setApplePay', @@ -344,6 +357,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'setCustomRoutingFlags', 'diners' => 'setDiners', 'discover' => 'setDiscover', + 'eftDirectdebitCA' => 'setEftDirectdebitCA', 'eftposAustralia' => 'setEftposAustralia', 'giroPay' => 'setGiroPay', 'girocard' => 'setGirocard', @@ -358,6 +372,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'setNyce', 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'payto' => 'setPayto', 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', @@ -382,6 +397,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accel' => 'getAccel', + 'affirm' => 'getAffirm', 'afterpayTouch' => 'getAfterpayTouch', 'amex' => 'getAmex', 'applePay' => 'getApplePay', @@ -395,6 +411,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'getCustomRoutingFlags', 'diners' => 'getDiners', 'discover' => 'getDiscover', + 'eftDirectdebitCA' => 'getEftDirectdebitCA', 'eftposAustralia' => 'getEftposAustralia', 'giroPay' => 'getGiroPay', 'girocard' => 'getGirocard', @@ -409,6 +426,7 @@ public function isNullableSetToNull(string $property): bool 'nyce' => 'getNyce', 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'payto' => 'getPayto', 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', @@ -472,11 +490,13 @@ public function getModelName() public const SHOPPER_INTERACTION_MOTO = 'moto'; public const SHOPPER_INTERACTION_CONT_AUTH = 'contAuth'; public const TYPE_ACCEL = 'accel'; + public const TYPE_ACH = 'ach'; public const TYPE_AFFIRM = 'affirm'; public const TYPE_AFTERPAYTOUCH = 'afterpaytouch'; public const TYPE_ALELO = 'alelo'; public const TYPE_ALIPAY = 'alipay'; public const TYPE_ALIPAY_HK = 'alipay_hk'; + public const TYPE_ALIPAY_WAP = 'alipay_wap'; public const TYPE_AMEX = 'amex'; public const TYPE_APPLEPAY = 'applepay'; public const TYPE_BANESE_CARD = 'banese_card'; @@ -496,6 +516,7 @@ public function getModelName() public const TYPE_DIRECTDEBIT_GB = 'directdebit_GB'; public const TYPE_DISCOVER = 'discover'; public const TYPE_EBANKING_FI = 'ebanking_FI'; + public const TYPE_EFT_DIRECTDEBIT_CA = 'eft_directdebit_CA'; public const TYPE_EFTPOS_AUSTRALIA = 'eftpos_australia'; public const TYPE_ELO = 'elo'; public const TYPE_ELOCREDIT = 'elocredit'; @@ -526,6 +547,7 @@ public function getModelName() public const TYPE_PAYNOW_POS = 'paynow_pos'; public const TYPE_PAYPAL = 'paypal'; public const TYPE_PAYSHOP = 'payshop'; + public const TYPE_PAYTO = 'payto'; public const TYPE_PULSE = 'pulse'; public const TYPE_SODEXO = 'sodexo'; public const TYPE_STAR = 'star'; @@ -568,11 +590,13 @@ public function getTypeAllowableValues() { return [ self::TYPE_ACCEL, + self::TYPE_ACH, self::TYPE_AFFIRM, self::TYPE_AFTERPAYTOUCH, self::TYPE_ALELO, self::TYPE_ALIPAY, self::TYPE_ALIPAY_HK, + self::TYPE_ALIPAY_WAP, self::TYPE_AMEX, self::TYPE_APPLEPAY, self::TYPE_BANESE_CARD, @@ -592,6 +616,7 @@ public function getTypeAllowableValues() self::TYPE_DIRECTDEBIT_GB, self::TYPE_DISCOVER, self::TYPE_EBANKING_FI, + self::TYPE_EFT_DIRECTDEBIT_CA, self::TYPE_EFTPOS_AUSTRALIA, self::TYPE_ELO, self::TYPE_ELOCREDIT, @@ -622,6 +647,7 @@ public function getTypeAllowableValues() self::TYPE_PAYNOW_POS, self::TYPE_PAYPAL, self::TYPE_PAYSHOP, + self::TYPE_PAYTO, self::TYPE_PULSE, self::TYPE_SODEXO, self::TYPE_STAR, @@ -658,6 +684,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accel', $data ?? [], null); + $this->setIfExists('affirm', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); @@ -671,6 +698,7 @@ public function __construct(array $data = null) $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('diners', $data ?? [], null); $this->setIfExists('discover', $data ?? [], null); + $this->setIfExists('eftDirectdebitCA', $data ?? [], null); $this->setIfExists('eftposAustralia', $data ?? [], null); $this->setIfExists('giroPay', $data ?? [], null); $this->setIfExists('girocard', $data ?? [], null); @@ -685,6 +713,7 @@ public function __construct(array $data = null) $this->setIfExists('nyce', $data ?? [], null); $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('payto', $data ?? [], null); $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); @@ -789,6 +818,30 @@ public function setAccel($accel) return $this; } + /** + * Gets affirm + * + * @return \Adyen\Model\Management\AffirmInfo|null + */ + public function getAffirm() + { + return $this->container['affirm']; + } + + /** + * Sets affirm + * + * @param \Adyen\Model\Management\AffirmInfo|null $affirm affirm + * + * @return self + */ + public function setAffirm($affirm) + { + $this->container['affirm'] = $affirm; + + return $this; + } + /** * Gets afterpayTouch * @@ -1101,6 +1154,30 @@ public function setDiscover($discover) return $this; } + /** + * Gets eftDirectdebitCA + * + * @return \Adyen\Model\Management\GenericPmWithTdiInfo|null + */ + public function getEftDirectdebitCA() + { + return $this->container['eftDirectdebitCA']; + } + + /** + * Sets eftDirectdebitCA + * + * @param \Adyen\Model\Management\GenericPmWithTdiInfo|null $eftDirectdebitCA eftDirectdebitCA + * + * @return self + */ + public function setEftDirectdebitCA($eftDirectdebitCA) + { + $this->container['eftDirectdebitCA'] = $eftDirectdebitCA; + + return $this; + } + /** * Gets eftposAustralia * @@ -1437,6 +1514,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets payto + * + * @return \Adyen\Model\Management\PayToInfo|null + */ + public function getPayto() + { + return $this->container['payto']; + } + + /** + * Sets payto + * + * @param \Adyen\Model\Management\PayToInfo|null $payto payto + * + * @return self + */ + public function setPayto($payto) + { + $this->container['payto'] = $payto; + + return $this; + } + /** * Gets pulse * diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index 3968180b2..5bb7234ee 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -414,7 +414,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + * @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** * * @return self */ diff --git a/src/Adyen/Model/Management/Surcharge.php b/src/Adyen/Model/Management/Surcharge.php index 3c7edb019..f5ea9593e 100644 --- a/src/Adyen/Model/Management/Surcharge.php +++ b/src/Adyen/Model/Management/Surcharge.php @@ -45,7 +45,8 @@ class Surcharge implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'askConfirmation' => 'bool', - 'configurations' => '\Adyen\Model\Management\Configuration[]' + 'configurations' => '\Adyen\Model\Management\Configuration[]', + 'excludeGratuityFromSurcharge' => 'bool' ]; /** @@ -57,7 +58,8 @@ class Surcharge implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'askConfirmation' => null, - 'configurations' => null + 'configurations' => null, + 'excludeGratuityFromSurcharge' => null ]; /** @@ -67,7 +69,8 @@ class Surcharge implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'askConfirmation' => false, - 'configurations' => false + 'configurations' => false, + 'excludeGratuityFromSurcharge' => false ]; /** @@ -157,7 +160,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'askConfirmation' => 'askConfirmation', - 'configurations' => 'configurations' + 'configurations' => 'configurations', + 'excludeGratuityFromSurcharge' => 'excludeGratuityFromSurcharge' ]; /** @@ -167,7 +171,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'askConfirmation' => 'setAskConfirmation', - 'configurations' => 'setConfigurations' + 'configurations' => 'setConfigurations', + 'excludeGratuityFromSurcharge' => 'setExcludeGratuityFromSurcharge' ]; /** @@ -177,7 +182,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'askConfirmation' => 'getAskConfirmation', - 'configurations' => 'getConfigurations' + 'configurations' => 'getConfigurations', + 'excludeGratuityFromSurcharge' => 'getExcludeGratuityFromSurcharge' ]; /** @@ -239,6 +245,7 @@ public function __construct(array $data = null) { $this->setIfExists('askConfirmation', $data ?? [], null); $this->setIfExists('configurations', $data ?? [], null); + $this->setIfExists('excludeGratuityFromSurcharge', $data ?? [], null); } /** @@ -330,6 +337,30 @@ public function setConfigurations($configurations) return $this; } + + /** + * Gets excludeGratuityFromSurcharge + * + * @return bool|null + */ + public function getExcludeGratuityFromSurcharge() + { + return $this->container['excludeGratuityFromSurcharge']; + } + + /** + * Sets excludeGratuityFromSurcharge + * + * @param bool|null $excludeGratuityFromSurcharge Exclude the tip amount from the surcharge calculation. + * + * @return self + */ + public function setExcludeGratuityFromSurcharge($excludeGratuityFromSurcharge) + { + $this->container['excludeGratuityFromSurcharge'] = $excludeGratuityFromSurcharge; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index ec08dea91..f22cda8b9 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -53,6 +53,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'customRoutingFlags' => 'string[]', 'diners' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'discover' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'enabled' => 'bool', 'girocard' => '\Adyen\Model\Management\GenericPmWithTdiInfo', @@ -86,6 +87,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'customRoutingFlags' => null, 'diners' => null, 'discover' => null, + 'eftDirectdebitCA' => null, 'eftposAustralia' => null, 'enabled' => null, 'girocard' => null, @@ -117,6 +119,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'customRoutingFlags' => false, 'diners' => false, 'discover' => false, + 'eftDirectdebitCA' => false, 'eftposAustralia' => false, 'enabled' => false, 'girocard' => false, @@ -228,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'customRoutingFlags', 'diners' => 'diners', 'discover' => 'discover', + 'eftDirectdebitCA' => 'eft_directdebit_CA', 'eftposAustralia' => 'eftpos_australia', 'enabled' => 'enabled', 'girocard' => 'girocard', @@ -259,6 +263,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'setCustomRoutingFlags', 'diners' => 'setDiners', 'discover' => 'setDiscover', + 'eftDirectdebitCA' => 'setEftDirectdebitCA', 'eftposAustralia' => 'setEftposAustralia', 'enabled' => 'setEnabled', 'girocard' => 'setGirocard', @@ -290,6 +295,7 @@ public function isNullableSetToNull(string $property): bool 'customRoutingFlags' => 'getCustomRoutingFlags', 'diners' => 'getDiners', 'discover' => 'getDiscover', + 'eftDirectdebitCA' => 'getEftDirectdebitCA', 'eftposAustralia' => 'getEftposAustralia', 'enabled' => 'getEnabled', 'girocard' => 'getGirocard', @@ -372,6 +378,7 @@ public function __construct(array $data = null) $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('diners', $data ?? [], null); $this->setIfExists('discover', $data ?? [], null); + $this->setIfExists('eftDirectdebitCA', $data ?? [], null); $this->setIfExists('eftposAustralia', $data ?? [], null); $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('girocard', $data ?? [], null); @@ -646,6 +653,30 @@ public function setDiscover($discover) return $this; } + /** + * Gets eftDirectdebitCA + * + * @return \Adyen\Model\Management\GenericPmWithTdiInfo|null + */ + public function getEftDirectdebitCA() + { + return $this->container['eftDirectdebitCA']; + } + + /** + * Sets eftDirectdebitCA + * + * @param \Adyen\Model\Management\GenericPmWithTdiInfo|null $eftDirectdebitCA eftDirectdebitCA + * + * @return self + */ + public function setEftDirectdebitCA($eftDirectdebitCA) + { + $this->container['eftDirectdebitCA'] = $eftDirectdebitCA; + + return $this; + } + /** * Gets eftposAustralia * diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index ef5715562..399c545b5 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -343,7 +343,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + * @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** * * @return self */ diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b9..a3626e45d 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php index 207999375..eed5c5c9f 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php @@ -233,7 +233,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PAYMENT_METHOD_REQUEST_REMOVED = 'paymentMethod.requestRemoved'; + public const TYPE_PAYMENT_METHOD_REQUEST_REMOVED = 'paymentMethodRequest.removed'; /** * Gets allowable values of the enum diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php index 50aa4d769..d916cff67 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php @@ -233,7 +233,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL = 'paymentMethod.requestScheduledForRemoval'; + public const TYPE_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL = 'paymentMethodRequest.scheduledForRemoval'; /** * Gets allowable values of the enum diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php index 4d0e78876..a7a46550b 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 8032f208b..b6a5027ee 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/AdditionalData3DSecure.php b/src/Adyen/Model/Payments/AdditionalData3DSecure.php index a00918223..fbe64c058 100644 --- a/src/Adyen/Model/Payments/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/AdditionalData3DSecure.php @@ -483,7 +483,7 @@ public function getThreeDSVersion() /** * Sets threeDSVersion * - * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. + * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. * * @return self */ diff --git a/src/Adyen/Model/Payments/FundDestination.php b/src/Adyen/Model/Payments/FundDestination.php index e1125b27d..d2f9218cb 100644 --- a/src/Adyen/Model/Payments/FundDestination.php +++ b/src/Adyen/Model/Payments/FundDestination.php @@ -527,7 +527,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461d..ae7a870cb 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index ea72302ab..17db88d66 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -1863,7 +1863,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index 8c8ed8440..adeea3ce3 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -1518,7 +1518,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index 92df5e30b..266d33e70 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -1470,7 +1470,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php index fa74b35fc..b720a11d1 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php @@ -101,6 +101,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => 'string', 'threeDOfferedResponse' => 'string', 'threeDSVersion' => 'string', + 'tokenizationShopperReference' => 'string', + 'tokenizationStoreOperationType' => 'string', + 'tokenizationStoredPaymentMethodId' => 'string', 'visaTransactionId' => 'string', 'xid' => 'string' ]; @@ -170,6 +173,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => null, 'threeDOfferedResponse' => null, 'threeDSVersion' => null, + 'tokenizationShopperReference' => null, + 'tokenizationStoreOperationType' => null, + 'tokenizationStoredPaymentMethodId' => null, 'visaTransactionId' => null, 'xid' => null ]; @@ -237,6 +243,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => false, 'threeDOfferedResponse' => false, 'threeDSVersion' => false, + 'tokenizationShopperReference' => false, + 'tokenizationStoreOperationType' => false, + 'tokenizationStoredPaymentMethodId' => false, 'visaTransactionId' => false, 'xid' => false ]; @@ -384,6 +393,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'threeDOffered', 'threeDOfferedResponse' => 'threeDOfferedResponse', 'threeDSVersion' => 'threeDSVersion', + 'tokenizationShopperReference' => 'tokenization.shopperReference', + 'tokenizationStoreOperationType' => 'tokenization.store.operationType', + 'tokenizationStoredPaymentMethodId' => 'tokenization.storedPaymentMethodId', 'visaTransactionId' => 'visaTransactionId', 'xid' => 'xid' ]; @@ -451,6 +463,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'setThreeDOffered', 'threeDOfferedResponse' => 'setThreeDOfferedResponse', 'threeDSVersion' => 'setThreeDSVersion', + 'tokenizationShopperReference' => 'setTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'setTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'setTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'setVisaTransactionId', 'xid' => 'setXid' ]; @@ -518,6 +533,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'getThreeDOffered', 'threeDOfferedResponse' => 'getThreeDOfferedResponse', 'threeDSVersion' => 'getThreeDSVersion', + 'tokenizationShopperReference' => 'getTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'getTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'getTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'getVisaTransactionId', 'xid' => 'getXid' ]; @@ -568,6 +586,9 @@ public function getModelName() public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + public const TOKENIZATION_STORE_OPERATION_TYPE_CREATED = 'created'; + public const TOKENIZATION_STORE_OPERATION_TYPE_UPDATED = 'updated'; + public const TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_STORED = 'alreadyStored'; /** * Gets allowable values of the enum @@ -594,6 +615,19 @@ public function getRecurringProcessingModelAllowableValues() self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenizationStoreOperationTypeAllowableValues() + { + return [ + self::TOKENIZATION_STORE_OPERATION_TYPE_CREATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_UPDATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_STORED, + ]; + } /** * Associative array for storing property values * @@ -666,6 +700,9 @@ public function __construct(array $data = null) $this->setIfExists('threeDOffered', $data ?? [], null); $this->setIfExists('threeDOfferedResponse', $data ?? [], null); $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenizationShopperReference', $data ?? [], null); + $this->setIfExists('tokenizationStoreOperationType', $data ?? [], null); + $this->setIfExists('tokenizationStoredPaymentMethodId', $data ?? [], null); $this->setIfExists('visaTransactionId', $data ?? [], null); $this->setIfExists('xid', $data ?? [], null); } @@ -715,6 +752,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!is_null($this->container['tokenizationStoreOperationType']) && !in_array($this->container['tokenizationStoreOperationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $this->container['tokenizationStoreOperationType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -2118,6 +2164,88 @@ public function setThreeDSVersion($threeDSVersion) return $this; } + /** + * Gets tokenizationShopperReference + * + * @return string|null + */ + public function getTokenizationShopperReference() + { + return $this->container['tokenizationShopperReference']; + } + + /** + * Sets tokenizationShopperReference + * + * @param string|null $tokenizationShopperReference The provided reference of the shopper. + * + * @return self + */ + public function setTokenizationShopperReference($tokenizationShopperReference) + { + $this->container['tokenizationShopperReference'] = $tokenizationShopperReference; + + return $this; + } + + /** + * Gets tokenizationStoreOperationType + * + * @return string|null + */ + public function getTokenizationStoreOperationType() + { + return $this->container['tokenizationStoreOperationType']; + } + + /** + * Sets tokenizationStoreOperationType + * + * @param string|null $tokenizationStoreOperationType The store operation performed on the token. + * + * @return self + */ + public function setTokenizationStoreOperationType($tokenizationStoreOperationType) + { + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!in_array($tokenizationStoreOperationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $tokenizationStoreOperationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenizationStoreOperationType'] = $tokenizationStoreOperationType; + + return $this; + } + + /** + * Gets tokenizationStoredPaymentMethodId + * + * @return string|null + */ + public function getTokenizationStoredPaymentMethodId() + { + return $this->container['tokenizationStoredPaymentMethodId']; + } + + /** + * Sets tokenizationStoredPaymentMethodId + * + * @param string|null $tokenizationStoredPaymentMethodId The reference that uniquely identifies tokenized payment details. + * + * @return self + */ + public function setTokenizationStoredPaymentMethodId($tokenizationStoredPaymentMethodId) + { + $this->container['tokenizationStoredPaymentMethodId'] = $tokenizationStoredPaymentMethodId; + + return $this; + } + /** * Gets visaTransactionId * @@ -2155,7 +2283,7 @@ public function getXid() /** * Sets xid * - * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= * * @return self */ diff --git a/src/Adyen/Model/Payments/ThreeDSecureData.php b/src/Adyen/Model/Payments/ThreeDSecureData.php index cc1247315..fcb986fc9 100644 --- a/src/Adyen/Model/Payments/ThreeDSecureData.php +++ b/src/Adyen/Model/Payments/ThreeDSecureData.php @@ -461,7 +461,7 @@ public function getAuthenticationResponse() /** * Sets authenticationResponse * - * @param string|null $authenticationResponse In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. + * @param string|null $authenticationResponse In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. * * @return self */ @@ -577,7 +577,7 @@ public function getDirectoryResponse() /** * Sets directoryResponse * - * @param string|null $directoryResponse In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. + * @param string|null $directoryResponse In 3D Secure 2, this is the `transStatus` from the `ARes`. * * @return self */ diff --git a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index b900dc2bd..56c51256a 100644 --- a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php +++ b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index ad1c991ab..0d50f4363 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payout/PayoutRequest.php b/src/Adyen/Model/Payout/PayoutRequest.php index 90bb1c1d0..d8a28e9e8 100644 --- a/src/Adyen/Model/Payout/PayoutRequest.php +++ b/src/Adyen/Model/Payout/PayoutRequest.php @@ -714,7 +714,7 @@ public function getShopperReference() /** * Sets shopperReference * - * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. * * @return self */ diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php index ec660c499..d9d3fdd17 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php @@ -101,6 +101,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => 'string', 'threeDOfferedResponse' => 'string', 'threeDSVersion' => 'string', + 'tokenizationShopperReference' => 'string', + 'tokenizationStoreOperationType' => 'string', + 'tokenizationStoredPaymentMethodId' => 'string', 'visaTransactionId' => 'string', 'xid' => 'string' ]; @@ -170,6 +173,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => null, 'threeDOfferedResponse' => null, 'threeDSVersion' => null, + 'tokenizationShopperReference' => null, + 'tokenizationStoreOperationType' => null, + 'tokenizationStoredPaymentMethodId' => null, 'visaTransactionId' => null, 'xid' => null ]; @@ -237,6 +243,9 @@ class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \Json 'threeDOffered' => false, 'threeDOfferedResponse' => false, 'threeDSVersion' => false, + 'tokenizationShopperReference' => false, + 'tokenizationStoreOperationType' => false, + 'tokenizationStoredPaymentMethodId' => false, 'visaTransactionId' => false, 'xid' => false ]; @@ -384,6 +393,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'threeDOffered', 'threeDOfferedResponse' => 'threeDOfferedResponse', 'threeDSVersion' => 'threeDSVersion', + 'tokenizationShopperReference' => 'tokenization.shopperReference', + 'tokenizationStoreOperationType' => 'tokenization.store.operationType', + 'tokenizationStoredPaymentMethodId' => 'tokenization.storedPaymentMethodId', 'visaTransactionId' => 'visaTransactionId', 'xid' => 'xid' ]; @@ -451,6 +463,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'setThreeDOffered', 'threeDOfferedResponse' => 'setThreeDOfferedResponse', 'threeDSVersion' => 'setThreeDSVersion', + 'tokenizationShopperReference' => 'setTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'setTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'setTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'setVisaTransactionId', 'xid' => 'setXid' ]; @@ -518,6 +533,9 @@ public function isNullableSetToNull(string $property): bool 'threeDOffered' => 'getThreeDOffered', 'threeDOfferedResponse' => 'getThreeDOfferedResponse', 'threeDSVersion' => 'getThreeDSVersion', + 'tokenizationShopperReference' => 'getTokenizationShopperReference', + 'tokenizationStoreOperationType' => 'getTokenizationStoreOperationType', + 'tokenizationStoredPaymentMethodId' => 'getTokenizationStoredPaymentMethodId', 'visaTransactionId' => 'getVisaTransactionId', 'xid' => 'getXid' ]; @@ -568,6 +586,9 @@ public function getModelName() public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + public const TOKENIZATION_STORE_OPERATION_TYPE_CREATED = 'created'; + public const TOKENIZATION_STORE_OPERATION_TYPE_UPDATED = 'updated'; + public const TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING = 'alreadyExisting'; /** * Gets allowable values of the enum @@ -594,6 +615,19 @@ public function getRecurringProcessingModelAllowableValues() self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenizationStoreOperationTypeAllowableValues() + { + return [ + self::TOKENIZATION_STORE_OPERATION_TYPE_CREATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_UPDATED, + self::TOKENIZATION_STORE_OPERATION_TYPE_ALREADY_EXISTING, + ]; + } /** * Associative array for storing property values * @@ -666,6 +700,9 @@ public function __construct(array $data = null) $this->setIfExists('threeDOffered', $data ?? [], null); $this->setIfExists('threeDOfferedResponse', $data ?? [], null); $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenizationShopperReference', $data ?? [], null); + $this->setIfExists('tokenizationStoreOperationType', $data ?? [], null); + $this->setIfExists('tokenizationStoredPaymentMethodId', $data ?? [], null); $this->setIfExists('visaTransactionId', $data ?? [], null); $this->setIfExists('xid', $data ?? [], null); } @@ -715,6 +752,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!is_null($this->container['tokenizationStoreOperationType']) && !in_array($this->container['tokenizationStoreOperationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $this->container['tokenizationStoreOperationType'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1752,6 +1798,7 @@ public function setRecurringFirstPspReference($recurringFirstPspReference) * Gets recurringRecurringDetailReference * * @return string|null + * @deprecated since Adyen Payout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function getRecurringRecurringDetailReference() { @@ -1764,6 +1811,7 @@ public function getRecurringRecurringDetailReference() * @param string|null $recurringRecurringDetailReference The reference that uniquely identifies the recurring transaction. * * @return self + * @deprecated since Adyen Payout API v68. "Use tokenization.storedPaymentMethodId instead." */ public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) { @@ -1776,6 +1824,7 @@ public function setRecurringRecurringDetailReference($recurringRecurringDetailRe * Gets recurringShopperReference * * @return string|null + * @deprecated since Adyen Payout API v68. "Use tokenization.shopperReference instead." */ public function getRecurringShopperReference() { @@ -1788,6 +1837,7 @@ public function getRecurringShopperReference() * @param string|null $recurringShopperReference The provided reference of the shopper for a recurring transaction. * * @return self + * @deprecated since Adyen Payout API v68. "Use tokenization.shopperReference instead." */ public function setRecurringShopperReference($recurringShopperReference) { @@ -2118,6 +2168,88 @@ public function setThreeDSVersion($threeDSVersion) return $this; } + /** + * Gets tokenizationShopperReference + * + * @return string|null + */ + public function getTokenizationShopperReference() + { + return $this->container['tokenizationShopperReference']; + } + + /** + * Sets tokenizationShopperReference + * + * @param string|null $tokenizationShopperReference The reference for the shopper that you sent when tokenizing the payment details. + * + * @return self + */ + public function setTokenizationShopperReference($tokenizationShopperReference) + { + $this->container['tokenizationShopperReference'] = $tokenizationShopperReference; + + return $this; + } + + /** + * Gets tokenizationStoreOperationType + * + * @return string|null + */ + public function getTokenizationStoreOperationType() + { + return $this->container['tokenizationStoreOperationType']; + } + + /** + * Sets tokenizationStoreOperationType + * + * @param string|null $tokenizationStoreOperationType The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. + * + * @return self + */ + public function setTokenizationStoreOperationType($tokenizationStoreOperationType) + { + $allowedValues = $this->getTokenizationStoreOperationTypeAllowableValues(); + if (!in_array($tokenizationStoreOperationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenizationStoreOperationType', must be one of '%s'", + $tokenizationStoreOperationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenizationStoreOperationType'] = $tokenizationStoreOperationType; + + return $this; + } + + /** + * Gets tokenizationStoredPaymentMethodId + * + * @return string|null + */ + public function getTokenizationStoredPaymentMethodId() + { + return $this->container['tokenizationStoredPaymentMethodId']; + } + + /** + * Sets tokenizationStoredPaymentMethodId + * + * @param string|null $tokenizationStoredPaymentMethodId The reference that uniquely identifies tokenized payment details. + * + * @return self + */ + public function setTokenizationStoredPaymentMethodId($tokenizationStoredPaymentMethodId) + { + $this->container['tokenizationStoredPaymentMethodId'] = $tokenizationStoredPaymentMethodId; + + return $this; + } + /** * Gets visaTransactionId * @@ -2155,7 +2287,7 @@ public function getXid() /** * Sets xid * - * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= * * @return self */ diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ae87baef9..ba0e91ceb 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/Address.php b/src/Adyen/Model/Recurring/Address.php index 8babd3633..9e61b2d0c 100644 --- a/src/Adyen/Model/Recurring/Address.php +++ b/src/Adyen/Model/Recurring/Address.php @@ -1,7 +1,7 @@ $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/Permit.php b/src/Adyen/Model/Recurring/Permit.php index ac17a19d7..23cf61183 100644 --- a/src/Adyen/Model/Recurring/Permit.php +++ b/src/Adyen/Model/Recurring/Permit.php @@ -1,7 +1,7 @@ $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index ed3372fb3..934975452 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 6592bf84d..9ccc67586 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index 01b25bf23..d05b26906 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index b9cbe36bf..349b367b3 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,9 +117,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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 7592a1286..6bb797d7d 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,13 +76,14 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c61143563..99bc3b6bd 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,12 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index a0f18f360..04419fc14 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -76,13 +76,14 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index ad86f1206..2e704599b 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,12 +60,13 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 233c09180..72b257fdc 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index ff2192d26..a762185bb 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -57,7 +57,7 @@ public function getApplePaySession(\Adyen\Model\Checkout\ApplePaySessionRequest /** * Create originKey values for domains * - * @deprecated since Adyen Checkout API v67. + * @deprecated since Adyen Checkout API v67. * @param \Adyen\Model\Checkout\UtilityRequest $utilityRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\UtilityResponse diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed9..2551bbc54 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,13 +59,14 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index d834bf550..9a6ea1756 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php b/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php index b61d2b239..714550af5 100644 --- a/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php @@ -60,12 +60,13 @@ public function checkStatusOfConsentForElectronicDeliveryOfTaxForms(string $id, * @param string $id * @param \Adyen\Model\LegalEntityManagement\SetTaxElectronicDeliveryConsentRequest $setTaxElectronicDeliveryConsentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function setConsentStatusForElectronicDeliveryOfTaxForms(string $id, \Adyen\Model\LegalEntityManagement\SetTaxElectronicDeliveryConsentRequest $setTaxElectronicDeliveryConsentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/setTaxElectronicDeliveryConsent"); $this->requestHttp($endpoint, strtolower('POST'), (array) $setTaxElectronicDeliveryConsentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 70c2e0769..3bf8aeaa4 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,13 +59,14 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index c2557d39d..608130253 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 1b40d271f..ec0d042af 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 54005b35b..65cdadc59 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\Mo * * @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 f8b7cc0b0..4f955b8ba 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 efff80b67..499e78957 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 8a7c5e731..8b6d78c7f 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\Manage * @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 cfe85a383..6caa292a6 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 968e9c614..7113c9c39 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 = null * @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); + } /** diff --git a/src/Adyen/Service/RecurringApi.php b/src/Adyen/Service/RecurringApi.php index e10d4ee32..2407c30cc 100644 --- a/src/Adyen/Service/RecurringApi.php +++ b/src/Adyen/Service/RecurringApi.php @@ -1,6 +1,6 @@ baseURL . "/transfers/approve"; $this->requestHttp($endpoint, strtolower('POST'), (array) $approveTransfersRequest->jsonSerialize(), $requestOptions); + } /** @@ -58,13 +59,14 @@ public function approveInitiatedTransfers(\Adyen\Model\Transfers\ApproveTransfer * * @param \Adyen\Model\Transfers\CancelTransfersRequest $cancelTransfersRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function cancelInitiatedTransfers(\Adyen\Model\Transfers\CancelTransfersRequest $cancelTransfersRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/transfers/cancel"; $this->requestHttp($endpoint, strtolower('POST'), (array) $cancelTransfersRequest->jsonSerialize(), $requestOptions); + } /** From 13c9a5882102a6df3ab83b9bf0989e866cdb0f82 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot Date: Fri, 28 Feb 2025 15:39:57 +0000 Subject: [PATCH 2/2] style(fmt): code formatted --- src/Adyen/Model/AcsWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/BalanceControl/ObjectSerializer.php | 9 +++++---- .../Model/BalancePlatform/CapabilitySettings.php | 8 ++++---- src/Adyen/Model/BalancePlatform/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/BinLookup/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Checkout/CheckoutPaymentMethod.php | 4 ++-- src/Adyen/Model/Checkout/MbwayDetails.php | 4 ++-- src/Adyen/Model/Checkout/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Checkout/VippsDetails.php | 2 +- .../ConfigurationWebhooks/CapabilitySettings.php | 8 ++++---- .../Model/ConfigurationWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/DataProtection/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Disputes/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/LegalEntityManagement/Attachment.php | 8 ++++---- .../Model/LegalEntityManagement/BankAccountInfo.php | 4 ++-- src/Adyen/Model/LegalEntityManagement/Document.php | 12 ++++++------ .../LegalEntityManagement/IdentificationData.php | 4 ++-- .../Model/LegalEntityManagement/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Management/ObjectSerializer.php | 9 +++++---- .../Model/ManagementWebhooks/ObjectSerializer.php | 9 +++++---- .../ObjectSerializer.php | 9 +++++---- .../Model/POSTerminalManagement/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Payments/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/PaymentsApp/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Payout/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/PosMobile/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Recurring/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/ReportWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/StoredValue/ObjectSerializer.php | 9 +++++---- .../Model/TransactionWebhooks/ObjectSerializer.php | 9 +++++---- .../Model/TransferWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Transfers/ObjectSerializer.php | 9 +++++---- .../Service/BalancePlatform/BalanceAccountsApi.php | 3 +-- .../BalancePlatform/BankAccountValidationApi.php | 3 +-- .../Service/BalancePlatform/ManageSCADevicesApi.php | 3 +-- .../Service/BalancePlatform/NetworkTokensApi.php | 3 +-- src/Adyen/Service/Checkout/RecurringApi.php | 3 +-- src/Adyen/Service/Checkout/UtilityApi.php | 2 +- .../LegalEntityManagement/BusinessLinesApi.php | 3 +-- .../Service/LegalEntityManagement/DocumentsApi.php | 3 +-- .../LegalEntityManagement/TaxEDeliveryConsentApi.php | 3 +-- .../LegalEntityManagement/TransferInstrumentsApi.php | 3 +-- .../Management/AllowedOriginsCompanyLevelApi.php | 3 +-- .../Management/AllowedOriginsMerchantLevelApi.php | 3 +-- src/Adyen/Service/Management/MyAPICredentialApi.php | 3 +-- .../Management/PaymentMethodsMerchantLevelApi.php | 3 +-- .../Management/PayoutSettingsMerchantLevelApi.php | 3 +-- .../Service/Management/TerminalsTerminalLevelApi.php | 3 +-- .../Service/Management/WebhooksCompanyLevelApi.php | 3 +-- .../Service/Management/WebhooksMerchantLevelApi.php | 3 +-- src/Adyen/Service/Transfers/TransfersApi.php | 6 ++---- 52 files changed, 167 insertions(+), 162 deletions(-) diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index e14421342..755ed1ce8 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index 2ed0eb3a0..b5ae3313d 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index ada0db0b3..67e88b5f9 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index fa9af7e82..141ec623e 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 09437b7d8..4bdfceeda 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index a6e424c18..83ed0d276 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -2040,7 +2040,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -2064,7 +2064,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index becc716f0..dc73d3c30 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 628f63adc..2b682c18f 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 76b60fbfc..a47f75bce 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 478ff8914..77bba385d 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 2d912cd58..6629bee4b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index fe8491817..1b86733ae 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php b/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php index a431ce10c..40a36f745 100644 --- a/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index d363f9e2a..5ef9f66af 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/Attachment.php b/src/Adyen/Model/LegalEntityManagement/Attachment.php index f16ea2d14..8a8db33dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/Attachment.php +++ b/src/Adyen/Model/LegalEntityManagement/Attachment.php @@ -335,7 +335,7 @@ public function setContent($content) * Gets contentType * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getContentType() { @@ -348,7 +348,7 @@ public function getContentType() * @param string|null $contentType The file format. Possible values: **application/pdf**, **image/jpg**, **image/jpeg**, **image/png**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setContentType($contentType) { @@ -361,7 +361,7 @@ public function setContentType($contentType) * Gets filename * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getFilename() { @@ -374,7 +374,7 @@ public function getFilename() * @param string|null $filename The name of the file including the file extension. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setFilename($filename) { diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 607f10c1c..66471833f 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -332,7 +332,7 @@ public function setAccountIdentification($accountIdentification) * Gets accountType * * @return string|null - * @deprecated since Legal Entity Management API v2. + * @deprecated since Legal Entity Management API v2. */ public function getAccountType() { @@ -345,7 +345,7 @@ public function getAccountType() * @param string|null $accountType The type of bank account. * * @return self - * @deprecated since Legal Entity Management API v2. + * @deprecated since Legal Entity Management API v2. */ public function setAccountType($accountType) { diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 5b845357f..46d18998f 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -523,7 +523,7 @@ public function setDescription($description) * Gets expiryDate * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getExpiryDate() { @@ -536,7 +536,7 @@ public function getExpiryDate() * @param string|null $expiryDate The expiry date of the document, in YYYY-MM-DD format. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setExpiryDate($expiryDate) { @@ -597,7 +597,7 @@ public function setId($id) * Gets issuerCountry * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerCountry() { @@ -610,7 +610,7 @@ public function getIssuerCountry() * @param string|null $issuerCountry The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { @@ -623,7 +623,7 @@ public function setIssuerCountry($issuerCountry) * Gets issuerState * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerState() { @@ -636,7 +636,7 @@ public function getIssuerState() * @param string|null $issuerState The state or province where the document was issued (AU only). * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerState($issuerState) { diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 8798087c1..4993dc186 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -400,7 +400,7 @@ public function setExpiryDate($expiryDate) * Gets issuerCountry * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerCountry() { @@ -413,7 +413,7 @@ public function getIssuerCountry() * @param string|null $issuerCountry The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index 66642b915..d25ad19d7 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index 2ff0b7ef6..cc5272bf9 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index a3626e45d..9c73e94b9 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php index a7a46550b..4d0e78876 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index b6a5027ee..8032f208b 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index ae7a870cb..4e217461d 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index 56c51256a..b900dc2bd 100644 --- a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php +++ b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index 0d50f4363..ad1c991ab 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ba0e91ceb..ae87baef9 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 5a0ae182a..b5886bc0d 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index a8a265ce9..97f670389 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index 934975452..ed3372fb3 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 9ccc67586..6592bf84d 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index d05b26906..01b25bf23 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index 349b367b3..b9cbe36bf 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,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); } } @@ -117,7 +117,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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 6bb797d7d..7592a1286 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,14 +76,13 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index 99bc3b6bd..c61143563 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,13 +44,12 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index 04419fc14..a0f18f360 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -76,14 +76,13 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index 2e704599b..ad86f1206 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,13 +60,12 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 72b257fdc..233c09180 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,14 +44,13 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index a762185bb..ff2192d26 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -57,7 +57,7 @@ public function getApplePaySession(\Adyen\Model\Checkout\ApplePaySessionRequest /** * Create originKey values for domains * - * @deprecated since Adyen Checkout API v67. + * @deprecated since Adyen Checkout API v67. * @param \Adyen\Model\Checkout\UtilityRequest $utilityRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\UtilityResponse diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index 2551bbc54..f94b39ed9 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,14 +59,13 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index 9a6ea1756..d834bf550 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,14 +44,13 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php b/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php index 714550af5..b61d2b239 100644 --- a/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php @@ -60,13 +60,12 @@ public function checkStatusOfConsentForElectronicDeliveryOfTaxForms(string $id, * @param string $id * @param \Adyen\Model\LegalEntityManagement\SetTaxElectronicDeliveryConsentRequest $setTaxElectronicDeliveryConsentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function setConsentStatusForElectronicDeliveryOfTaxForms(string $id, \Adyen\Model\LegalEntityManagement\SetTaxElectronicDeliveryConsentRequest $setTaxElectronicDeliveryConsentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/setTaxElectronicDeliveryConsent"); $this->requestHttp($endpoint, strtolower('POST'), (array) $setTaxElectronicDeliveryConsentRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 3bf8aeaa4..70c2e0769 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,14 +59,13 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index 608130253..c2557d39d 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 ec0d042af..1b40d271f 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 65cdadc59..54005b35b 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\Mo * * @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 4f955b8ba..f8b7cc0b0 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 499e78957..efff80b67 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 8b6d78c7f..8a7c5e731 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\Manage * @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 6caa292a6..cfe85a383 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 7113c9c39..968e9c614 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 = null * @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); - } /** diff --git a/src/Adyen/Service/Transfers/TransfersApi.php b/src/Adyen/Service/Transfers/TransfersApi.php index 7b62cec32..869e9d604 100644 --- a/src/Adyen/Service/Transfers/TransfersApi.php +++ b/src/Adyen/Service/Transfers/TransfersApi.php @@ -44,14 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\Transfers\ApproveTransfersRequest $approveTransfersRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function approveInitiatedTransfers(\Adyen\Model\Transfers\ApproveTransfersRequest $approveTransfersRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/transfers/approve"; $this->requestHttp($endpoint, strtolower('POST'), (array) $approveTransfersRequest->jsonSerialize(), $requestOptions); - } /** @@ -59,14 +58,13 @@ public function approveInitiatedTransfers(\Adyen\Model\Transfers\ApproveTransfer * * @param \Adyen\Model\Transfers\CancelTransfersRequest $cancelTransfersRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function cancelInitiatedTransfers(\Adyen\Model\Transfers\CancelTransfersRequest $cancelTransfersRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/transfers/cancel"; $this->requestHttp($endpoint, strtolower('POST'), (array) $cancelTransfersRequest->jsonSerialize(), $requestOptions); - } /**