diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce..e1442134 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 b5ae3313..2ed0eb3a 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/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index aa990b8d..0fdb7409 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -443,8 +443,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\BalancePlatform\ContactDetails|null - * @deprecated - */ + * @deprecated */ public function getContactDetails() { return $this->container['contactDetails']; @@ -456,8 +455,7 @@ public function getContactDetails() * @param \Adyen\Model\BalancePlatform\ContactDetails|null $contactDetails contactDetails * * @return self - * @deprecated - */ + * @deprecated */ public function setContactDetails($contactDetails) { $this->container['contactDetails'] = $contactDetails; diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php index 03ff71bf..d230326e 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php @@ -387,8 +387,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\BalancePlatform\ContactDetails|null - * @deprecated - */ + * @deprecated */ public function getContactDetails() { return $this->container['contactDetails']; @@ -400,8 +399,7 @@ public function getContactDetails() * @param \Adyen\Model\BalancePlatform\ContactDetails|null $contactDetails contactDetails * * @return self - * @deprecated - */ + * @deprecated */ public function setContactDetails($contactDetails) { $this->container['contactDetails'] = $contactDetails; diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php index 6f306b28..321b69d3 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php @@ -423,8 +423,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\BalancePlatform\ContactDetails|null - * @deprecated - */ + * @deprecated */ public function getContactDetails() { return $this->container['contactDetails']; @@ -436,8 +435,7 @@ public function getContactDetails() * @param \Adyen\Model\BalancePlatform\ContactDetails|null $contactDetails contactDetails * * @return self - * @deprecated - */ + * @deprecated */ public function setContactDetails($contactDetails) { $this->container['contactDetails'] = $contactDetails; diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index 67e88b5f..ada0db0b 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 141ec623..fa9af7e8 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/BalancePlatform/PaymentInstrument.php b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php index 659e2fac..e3992210 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php @@ -463,7 +463,7 @@ public function valid() * Gets additionalBankAccountIdentifications * * @return \Adyen\Model\BalancePlatform\PaymentInstrumentAdditionalBankAccountIdentificationsInner[]|null - * @deprecated + * @deprecated since Configuration API v2. "Please use `bankAccount` object instead" */ public function getAdditionalBankAccountIdentifications() { @@ -476,7 +476,7 @@ public function getAdditionalBankAccountIdentifications() * @param \Adyen\Model\BalancePlatform\PaymentInstrumentAdditionalBankAccountIdentificationsInner[]|null $additionalBankAccountIdentifications Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. * * @return self - * @deprecated + * @deprecated since Configuration API v2. "Please use `bankAccount` object instead" */ public function setAdditionalBankAccountIdentifications($additionalBankAccountIdentifications) { diff --git a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php index 7a84f7cb..e9edc18e 100644 --- a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php @@ -463,7 +463,7 @@ public function valid() * Gets additionalBankAccountIdentifications * * @return \Adyen\Model\BalancePlatform\PaymentInstrumentAdditionalBankAccountIdentificationsInner[]|null - * @deprecated + * @deprecated since Configuration API v2. "Please use `bankAccount` object instead" */ public function getAdditionalBankAccountIdentifications() { @@ -476,7 +476,7 @@ public function getAdditionalBankAccountIdentifications() * @param \Adyen\Model\BalancePlatform\PaymentInstrumentAdditionalBankAccountIdentificationsInner[]|null $additionalBankAccountIdentifications Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. * * @return self - * @deprecated + * @deprecated since Configuration API v2. "Please use `bankAccount` object instead" */ public function setAdditionalBankAccountIdentifications($additionalBankAccountIdentifications) { diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceed..09437b7d 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/AccountInfo.php b/src/Adyen/Model/Checkout/AccountInfo.php index 71ee76ae..1b5dcdfe 100644 --- a/src/Adyen/Model/Checkout/AccountInfo.php +++ b/src/Adyen/Model/Checkout/AccountInfo.php @@ -804,7 +804,7 @@ public function setDeliveryAddressUsageIndicator($deliveryAddressUsageIndicator) * Gets homePhone * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `ThreeDS2RequestData.homePhone` instead." */ public function getHomePhone() { @@ -817,7 +817,7 @@ public function getHomePhone() * @param string|null $homePhone Shopper's home phone number (including the country code). * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `ThreeDS2RequestData.homePhone` instead." */ public function setHomePhone($homePhone) { @@ -830,7 +830,7 @@ public function setHomePhone($homePhone) * Gets mobilePhone * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `ThreeDS2RequestData.mobilePhone` instead." */ public function getMobilePhone() { @@ -843,7 +843,7 @@ public function getMobilePhone() * @param string|null $mobilePhone Shopper's mobile phone number (including the country code). * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `ThreeDS2RequestData.mobilePhone` instead." */ public function setMobilePhone($mobilePhone) { @@ -1068,7 +1068,7 @@ public function setSuspiciousActivity($suspiciousActivity) * Gets workPhone * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `ThreeDS2RequestData.workPhone` instead." */ public function getWorkPhone() { @@ -1081,7 +1081,7 @@ public function getWorkPhone() * @param string|null $workPhone Shopper's work phone number (including the country code). * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `ThreeDS2RequestData.workPhone` instead." */ public function setWorkPhone($workPhone) { diff --git a/src/Adyen/Model/Checkout/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index f30743c4..694030ec 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -584,7 +584,7 @@ public function setOwnerName($ownerName) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -597,7 +597,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index 4c8886ae..44b6baf5 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -344,7 +344,7 @@ public function valid() * Gets allow3DS2 * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.threeDSRequestData.nativeThreeDS` instead." */ public function getAllow3DS2() { @@ -357,7 +357,7 @@ public function getAllow3DS2() * @param string|null $allow3DS2 Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen selects redirect or native authentication based on your configuration to optimize authorization rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen offers redirect 3D Secure 2 authentication instead, based on your configuration. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.threeDSRequestData.nativeThreeDS` instead." */ public function setAllow3DS2($allow3DS2) { @@ -404,7 +404,7 @@ public function setChallengeWindowSize($challengeWindowSize) * Gets executeThreeD * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use [`authenticationData.attemptAuthentication`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments?target=_blank#request-authenticationData-attemptAuthentication) instead" */ public function getExecuteThreeD() { @@ -417,7 +417,7 @@ public function getExecuteThreeD() * @param string|null $executeThreeD Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don't perform 3D Secure authentication. Note that this setting results in refusals if the issuer mandates 3D Secure because of the PSD2 directive or other, national regulations. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use [`authenticationData.attemptAuthentication`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments?target=_blank#request-authenticationData-attemptAuthentication) instead" */ public function setExecuteThreeD($executeThreeD) { diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index ed015de4..58cf43a0 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -448,7 +448,7 @@ public function setPersonalDetails($personalDetails) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -461,7 +461,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/AncvDetails.php b/src/Adyen/Model/Checkout/AncvDetails.php index bb83e70c..3f891f2b 100644 --- a/src/Adyen/Model/Checkout/AncvDetails.php +++ b/src/Adyen/Model/Checkout/AncvDetails.php @@ -377,7 +377,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -390,7 +390,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index a1214180..87a1b011 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -444,7 +444,7 @@ public function setFundingSource($fundingSource) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -457,7 +457,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/ApplePayDonations.php b/src/Adyen/Model/Checkout/ApplePayDonations.php index 149d287c..2b120612 100644 --- a/src/Adyen/Model/Checkout/ApplePayDonations.php +++ b/src/Adyen/Model/Checkout/ApplePayDonations.php @@ -444,7 +444,7 @@ public function setFundingSource($fundingSource) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -457,7 +457,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index b29e7f51..21d8c435 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -446,7 +446,7 @@ public function setHolderName($holderName) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -459,7 +459,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index ed5490c4..24cd2694 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -1646,7 +1646,7 @@ public function setThreeDS2RequestData($threeDS2RequestData) * Gets threeDSAuthenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function getThreeDSAuthenticationOnly() { @@ -1659,7 +1659,7 @@ public function getThreeDSAuthenticationOnly() * @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { diff --git a/src/Adyen/Model/Checkout/BlikDetails.php b/src/Adyen/Model/Checkout/BlikDetails.php index dbe6ec56..8d6febcb 100644 --- a/src/Adyen/Model/Checkout/BlikDetails.php +++ b/src/Adyen/Model/Checkout/BlikDetails.php @@ -377,7 +377,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -390,7 +390,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 65a2cadf..67a4feaa 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -543,8 +543,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets cupsecureplusSmscode * * @return string|null - * @deprecated - */ + * @deprecated */ public function getCupsecureplusSmscode() { return $this->container['cupsecureplusSmscode']; @@ -556,8 +555,7 @@ public function getCupsecureplusSmscode() * @param string|null $cupsecureplusSmscode cupsecureplusSmscode * * @return self - * @deprecated - */ + * @deprecated */ public function setCupsecureplusSmscode($cupsecureplusSmscode) { $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; @@ -867,7 +865,7 @@ public function setNumber($number) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -880,7 +878,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index c0a65084..d87f558b 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -543,8 +543,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets cupsecureplusSmscode * * @return string|null - * @deprecated - */ + * @deprecated */ public function getCupsecureplusSmscode() { return $this->container['cupsecureplusSmscode']; @@ -556,8 +555,7 @@ public function getCupsecureplusSmscode() * @param string|null $cupsecureplusSmscode cupsecureplusSmscode * * @return self - * @deprecated - */ + * @deprecated */ public function setCupsecureplusSmscode($cupsecureplusSmscode) { $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; @@ -867,7 +865,7 @@ public function setNumber($number) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -880,7 +878,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/CashAppDetails.php b/src/Adyen/Model/Checkout/CashAppDetails.php index ca75a336..08796ec0 100644 --- a/src/Adyen/Model/Checkout/CashAppDetails.php +++ b/src/Adyen/Model/Checkout/CashAppDetails.php @@ -484,7 +484,7 @@ public function setOnFileGrantId($onFileGrantId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -497,7 +497,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 132b328e..4c8db50f 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -1002,7 +1002,7 @@ public function setOwnerName($ownerName) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -1015,7 +1015,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { @@ -1388,8 +1388,7 @@ public function setBrand($brand) * Gets cupsecureplusSmscode * * @return string|null - * @deprecated - */ + * @deprecated */ public function getCupsecureplusSmscode() { return $this->container['cupsecureplusSmscode']; @@ -1401,8 +1400,7 @@ public function getCupsecureplusSmscode() * @param string|null $cupsecureplusSmscode cupsecureplusSmscode * * @return self - * @deprecated - */ + * @deprecated */ public function setCupsecureplusSmscode($cupsecureplusSmscode) { $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; @@ -1999,7 +1997,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -2023,7 +2021,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index f9c97f1a..7020eec5 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -2338,7 +2338,7 @@ public function setThreeDS2RequestData($threeDS2RequestData) * Gets threeDSAuthenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function getThreeDSAuthenticationOnly() { @@ -2351,7 +2351,7 @@ public function getThreeDSAuthenticationOnly() * @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 9014160f..655c918c 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -2413,7 +2413,7 @@ public function setThreeDS2RequestData($threeDS2RequestData) * Gets threeDSAuthenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function getThreeDSAuthenticationOnly() { @@ -2426,7 +2426,7 @@ public function getThreeDSAuthenticationOnly() * @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index bb077483..1571a938 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -549,7 +549,7 @@ public function setFundingSource($fundingSource) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -562,7 +562,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { @@ -647,8 +647,7 @@ public function setBrand($brand) * Gets cupsecureplusSmscode * * @return string|null - * @deprecated - */ + * @deprecated */ public function getCupsecureplusSmscode() { return $this->container['cupsecureplusSmscode']; @@ -660,8 +659,7 @@ public function getCupsecureplusSmscode() * @param string|null $cupsecureplusSmscode cupsecureplusSmscode * * @return self - * @deprecated - */ + * @deprecated */ public function setCupsecureplusSmscode($cupsecureplusSmscode) { $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index dadd8261..350ff2cf 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -885,7 +885,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets conversionId * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `checkoutAttemptId` instead" */ public function getConversionId() { @@ -898,7 +898,7 @@ public function getConversionId() * @param string|null $conversionId Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `checkoutAttemptId` instead" */ public function setConversionId($conversionId) { @@ -1675,7 +1675,7 @@ public function setThreeDS2RequestData($threeDS2RequestData) * Gets threeDSAuthenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function getThreeDSAuthenticationOnly() { @@ -1688,7 +1688,7 @@ public function getThreeDSAuthenticationOnly() * @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { diff --git a/src/Adyen/Model/Checkout/EftDetails.php b/src/Adyen/Model/Checkout/EftDetails.php index 2e7d8b27..d02223b3 100644 --- a/src/Adyen/Model/Checkout/EftDetails.php +++ b/src/Adyen/Model/Checkout/EftDetails.php @@ -470,7 +470,7 @@ public function setOwnerName($ownerName) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -483,7 +483,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php index 2e0dd1de..907ff7bf 100644 --- a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php @@ -389,7 +389,7 @@ public function setIssuer($issuer) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -402,7 +402,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/GiropayDetails.php b/src/Adyen/Model/Checkout/GiropayDetails.php index 5002f78a..f1584dc3 100644 --- a/src/Adyen/Model/Checkout/GiropayDetails.php +++ b/src/Adyen/Model/Checkout/GiropayDetails.php @@ -346,7 +346,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -359,7 +359,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index 66c78853..0ea94fd9 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -482,7 +482,7 @@ public function setGooglePayToken($googlePayToken) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -495,7 +495,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/GooglePayDonations.php b/src/Adyen/Model/Checkout/GooglePayDonations.php index 6d9a80cc..385c8031 100644 --- a/src/Adyen/Model/Checkout/GooglePayDonations.php +++ b/src/Adyen/Model/Checkout/GooglePayDonations.php @@ -482,7 +482,7 @@ public function setGooglePayToken($googlePayToken) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -495,7 +495,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index fb4d056b..9c553e99 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -377,7 +377,7 @@ public function setIssuer($issuer) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -390,7 +390,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php index 5376c781..1fb219a1 100644 --- a/src/Adyen/Model/Checkout/IdealDonations.php +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -377,7 +377,7 @@ public function setIssuer($issuer) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -390,7 +390,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/InputDetail.php b/src/Adyen/Model/Checkout/InputDetail.php index c7774793..0e9082bc 100644 --- a/src/Adyen/Model/Checkout/InputDetail.php +++ b/src/Adyen/Model/Checkout/InputDetail.php @@ -384,8 +384,7 @@ public function setDetails($details) * Gets inputDetails * * @return \Adyen\Model\Checkout\SubInputDetail[]|null - * @deprecated - */ + * @deprecated */ public function getInputDetails() { return $this->container['inputDetails']; @@ -397,8 +396,7 @@ public function getInputDetails() * @param \Adyen\Model\Checkout\SubInputDetail[]|null $inputDetails Input details can also be provided recursively (deprecated). * * @return self - * @deprecated - */ + * @deprecated */ public function setInputDetails($inputDetails) { $this->container['inputDetails'] = $inputDetails; diff --git a/src/Adyen/Model/Checkout/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 7b9f670d..8dc12363 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -461,7 +461,7 @@ public function setPersonalDetails($personalDetails) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -474,7 +474,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index dc73d3c3..becc716f 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/MerchantRiskIndicator.php b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php index 43cc2d31..a8032f2b 100644 --- a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php @@ -489,7 +489,7 @@ public function setDeliveryAddressIndicator($deliveryAddressIndicator) * Gets deliveryEmail * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `deliveryEmailAddress` instead." */ public function getDeliveryEmail() { @@ -502,7 +502,7 @@ public function getDeliveryEmail() * @param string|null $deliveryEmail The delivery email address (for digital goods). * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `deliveryEmailAddress` instead." */ public function setDeliveryEmail($deliveryEmail) { diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18..628f63ad 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/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index d445cd43..31c6e331 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -443,7 +443,7 @@ public function setPersonalDetails($personalDetails) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -456,7 +456,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php b/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php index 98637c16..1b79c421 100644 --- a/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.php @@ -349,7 +349,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -362,7 +362,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index cf32d8f2..247958be 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -505,7 +505,7 @@ public function setPayerSelected($payerSelected) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -518,7 +518,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayPayDetails.php b/src/Adyen/Model/Checkout/PayPayDetails.php index dd63f12d..9c8ac85a 100644 --- a/src/Adyen/Model/Checkout/PayPayDetails.php +++ b/src/Adyen/Model/Checkout/PayPayDetails.php @@ -346,7 +346,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -359,7 +359,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayToDetails.php b/src/Adyen/Model/Checkout/PayToDetails.php index 378919bc..c0cb1c5f 100644 --- a/src/Adyen/Model/Checkout/PayToDetails.php +++ b/src/Adyen/Model/Checkout/PayToDetails.php @@ -353,7 +353,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -366,7 +366,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index e291d418..7b2e0804 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -363,7 +363,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -376,7 +376,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index b2a48cd4..b6b03558 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -451,7 +451,7 @@ public function setGooglePayToken($googlePayToken) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -464,7 +464,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php index a6a02f30..fca8951c 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php @@ -451,7 +451,7 @@ public function setGooglePayToken($googlePayToken) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -464,7 +464,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php index bd8d4d04..65d11991 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php @@ -376,7 +376,7 @@ public function setPaymentData($paymentData) * Gets threeDSAuthenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function getThreeDSAuthenticationOnly() { @@ -389,7 +389,7 @@ public function getThreeDSAuthenticationOnly() * @param bool|null $threeDSAuthenticationOnly Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { diff --git a/src/Adyen/Model/Checkout/PaymentMethod.php b/src/Adyen/Model/Checkout/PaymentMethod.php index b6513d54..0c6842cf 100644 --- a/src/Adyen/Model/Checkout/PaymentMethod.php +++ b/src/Adyen/Model/Checkout/PaymentMethod.php @@ -520,8 +520,7 @@ public function setGroup($group) * Gets inputDetails * * @return \Adyen\Model\Checkout\InputDetail[]|null - * @deprecated - */ + * @deprecated */ public function getInputDetails() { return $this->container['inputDetails']; @@ -533,8 +532,7 @@ public function getInputDetails() * @param \Adyen\Model\Checkout\InputDetail[]|null $inputDetails All input details to be provided to complete the payment with this payment method. * * @return self - * @deprecated - */ + * @deprecated */ public function setInputDetails($inputDetails) { $this->container['inputDetails'] = $inputDetails; diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 921cb0a8..e5150071 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -1225,7 +1225,7 @@ public function setCompany($company) * Gets conversionId * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `checkoutAttemptId` instead" */ public function getConversionId() { @@ -1238,7 +1238,7 @@ public function getConversionId() * @param string|null $conversionId Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `checkoutAttemptId` instead" */ public function setConversionId($conversionId) { @@ -1371,7 +1371,7 @@ public function setDeliveryAddress($deliveryAddress) * Gets deliveryDate * * @return \DateTime|null - * @deprecated + * @deprecated since Adyen Checkout API v70. "Use `deliverAt` instead." */ public function getDeliveryDate() { @@ -1384,7 +1384,7 @@ public function getDeliveryDate() * @param \DateTime|null $deliveryDate The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v70. "Use `deliverAt` instead." */ public function setDeliveryDate($deliveryDate) { @@ -2589,7 +2589,7 @@ public function setThreeDS2RequestData($threeDS2RequestData) * Gets threeDSAuthenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function getThreeDSAuthenticationOnly() { @@ -2602,7 +2602,7 @@ public function getThreeDSAuthenticationOnly() * @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v69. "Use `authenticationData.authenticationOnly` instead." */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index 4ed81ef7..6594921d 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -444,7 +444,7 @@ public function setPersonalDetails($personalDetails) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -457,7 +457,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/RivertyDetails.php b/src/Adyen/Model/Checkout/RivertyDetails.php index c787b5dd..b5a1ba57 100644 --- a/src/Adyen/Model/Checkout/RivertyDetails.php +++ b/src/Adyen/Model/Checkout/RivertyDetails.php @@ -508,7 +508,7 @@ public function setPersonalDetails($personalDetails) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -521,7 +521,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index 28cbf39b..fbfbbb4f 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -420,7 +420,7 @@ public function setFundingSource($fundingSource) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -433,7 +433,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index 1cdab04d..03d00318 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -423,7 +423,7 @@ public function setOwnerName($ownerName) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -436,7 +436,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/Split.php b/src/Adyen/Model/Checkout/Split.php index cb8a04d2..7b98342a 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -253,6 +253,7 @@ public function getModelName() public const TYPE_SCHEME_FEE = 'SchemeFee'; public const TYPE_SURCHARGE = 'Surcharge'; public const TYPE_TIP = 'Tip'; + public const TYPE_TOP_UP = 'TopUp'; public const TYPE_VAT = 'VAT'; /** @@ -277,6 +278,7 @@ public function getTypeAllowableValues() self::TYPE_SCHEME_FEE, self::TYPE_SURCHARGE, self::TYPE_TIP, + self::TYPE_TOP_UP, self::TYPE_VAT, ]; } diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index 39abd649..a53797fa 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -378,7 +378,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -391,7 +391,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index ec31bc20..a2e5aea9 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -853,7 +853,7 @@ public function setAddrMatch($addrMatch) * Gets authenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v50. "Use `threeDSAuthenticationOnly` instead." */ public function getAuthenticationOnly() { @@ -866,7 +866,7 @@ public function getAuthenticationOnly() * @param bool|null $authenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v50. "Use `threeDSAuthenticationOnly` instead." */ public function setAuthenticationOnly($authenticationOnly) { @@ -879,7 +879,7 @@ public function setAuthenticationOnly($authenticationOnly) * Gets challengeIndicator * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `threeDSRequestorChallengeInd` instead." */ public function getChallengeIndicator() { @@ -892,7 +892,7 @@ public function getChallengeIndicator() * @param string|null $challengeIndicator Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `threeDSRequestorChallengeInd` instead." */ public function setChallengeIndicator($challengeIndicator) { diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php index 822a43c1..282bc3ed 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php @@ -829,7 +829,7 @@ public function setAddrMatch($addrMatch) * Gets authenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Checkout API v50. "Use `threeDSAuthenticationOnly` instead." */ public function getAuthenticationOnly() { @@ -842,7 +842,7 @@ public function getAuthenticationOnly() * @param bool|null $authenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v50. "Use `threeDSAuthenticationOnly` instead." */ public function setAuthenticationOnly($authenticationOnly) { @@ -855,7 +855,7 @@ public function setAuthenticationOnly($authenticationOnly) * Gets challengeIndicator * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `threeDSRequestorChallengeInd` instead." */ public function getChallengeIndicator() { @@ -868,7 +868,7 @@ public function getChallengeIndicator() * @param string|null $challengeIndicator Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v68. "Use `threeDSRequestorChallengeInd` instead." */ public function setChallengeIndicator($challengeIndicator) { diff --git a/src/Adyen/Model/Checkout/TwintDetails.php b/src/Adyen/Model/Checkout/TwintDetails.php index 9617fb73..b69b1244 100644 --- a/src/Adyen/Model/Checkout/TwintDetails.php +++ b/src/Adyen/Model/Checkout/TwintDetails.php @@ -353,7 +353,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -366,7 +366,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index 7ed7419e..1c6d8736 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -397,7 +397,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -410,7 +410,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index 43587b4a..d84800f9 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -387,7 +387,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -400,7 +400,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 6787fd03..e502c090 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -356,7 +356,7 @@ public function setCheckoutAttemptId($checkoutAttemptId) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -369,7 +369,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index 50533e47..d628d6f0 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -379,7 +379,7 @@ public function setClickAndCollect($clickAndCollect) * Gets recurringDetailReference * * @return string|null - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function getRecurringDetailReference() { @@ -392,7 +392,7 @@ public function getRecurringDetailReference() * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. * * @return self - * @deprecated + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." */ public function setRecurringDetailReference($recurringDetailReference) { diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php index 6dd33f19..ad406186 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php @@ -443,8 +443,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\ConfigurationWebhooks\ContactDetails|null - * @deprecated - */ + * @deprecated */ public function getContactDetails() { return $this->container['contactDetails']; @@ -456,8 +455,7 @@ public function getContactDetails() * @param \Adyen\Model\ConfigurationWebhooks\ContactDetails|null $contactDetails contactDetails * * @return self - * @deprecated - */ + * @deprecated */ public function setContactDetails($contactDetails) { $this->container['contactDetails'] = $contactDetails; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 77bba385..478ff891 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 6629bee4..2d912cd5 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/ConfigurationWebhooks/PaymentInstrument.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php index 84553fe2..b3ed1abb 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php @@ -463,7 +463,7 @@ public function valid() * Gets additionalBankAccountIdentifications * * @return \Adyen\Model\ConfigurationWebhooks\PaymentInstrumentAdditionalBankAccountIdentificationsInner[]|null - * @deprecated + * @deprecated since Configuration webhooks v2. "Please use `bankAccount` object instead" */ public function getAdditionalBankAccountIdentifications() { @@ -476,7 +476,7 @@ public function getAdditionalBankAccountIdentifications() * @param \Adyen\Model\ConfigurationWebhooks\PaymentInstrumentAdditionalBankAccountIdentificationsInner[]|null $additionalBankAccountIdentifications Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. * * @return self - * @deprecated + * @deprecated since Configuration webhooks v2. "Please use `bankAccount` object instead" */ public function setAdditionalBankAccountIdentifications($additionalBankAccountIdentifications) { diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733a..fe849181 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 40a36f74..a431ce10 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 5ef9f66a..d363f9e2 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 798fddff..1998ae3b 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 + * @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 + * @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 + * @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 + * @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 f5a727d3..3715161d 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 + * @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 + * @deprecated since Legal Entity Management API v2. */ public function setAccountType($accountType) { diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 8491b4d7..954ce883 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -403,7 +403,7 @@ public function valid() * Gets capability * * @return string|null - * @deprecated + * @deprecated since Legal Entity Management API v3. "Use `service` instead." */ public function getCapability() { @@ -416,7 +416,7 @@ public function getCapability() * @param string|null $capability The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** * * @return self - * @deprecated + * @deprecated since Legal Entity Management API v3. "Use `service` instead." */ public function setCapability($capability) { diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index 6334b3ec..74ccda1d 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -386,7 +386,7 @@ public function valid() * Gets capability * * @return string|null - * @deprecated + * @deprecated since Legal Entity Management API v3. "Use `service` instead." */ public function getCapability() { @@ -399,7 +399,7 @@ public function getCapability() * @param string|null $capability The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** * * @return self - * @deprecated + * @deprecated since Legal Entity Management API v3. "Use `service` instead." */ public function setCapability($capability) { diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 6c05e3a2..1db94400 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 + * @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 + * @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 + * @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 + * @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 + * @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 + * @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 cc41558c..4d245b12 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 + * @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 + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 3b05f00b..534ca062 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -465,7 +465,7 @@ public function setDocumentDetails($documentDetails) * Gets documents * * @return \Adyen\Model\LegalEntityManagement\EntityReference[]|null - * @deprecated + * @deprecated since Legal Entity Management API v1. "Use the `documentDetails` array instead." */ public function getDocuments() { @@ -478,7 +478,7 @@ public function getDocuments() * @param \Adyen\Model\LegalEntityManagement\EntityReference[]|null $documents List of documents uploaded for the legal entity. * * @return self - * @deprecated + * @deprecated since Legal Entity Management API v1. "Use the `documentDetails` array instead." */ public function setDocuments($documents) { diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index a6881fee..90db63d9 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -567,7 +567,7 @@ public function getType() /** * Sets type * - * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** + * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d..66642b91 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/LegalEntityManagement/SourceOfFunds.php b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php index 42b4b4fa..0405de0e 100644 --- a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php +++ b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php @@ -322,7 +322,7 @@ public function valid() * Gets acquiringBusinessLineId * * @return string|null - * @deprecated + * @deprecated since Legal Entity Management API v3. "This field will be removed in v4." */ public function getAcquiringBusinessLineId() { @@ -335,7 +335,7 @@ public function getAcquiringBusinessLineId() * @param string|null $acquiringBusinessLineId The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. * * @return self - * @deprecated + * @deprecated since Legal Entity Management API v3. "This field will be removed in v4." */ public function setAcquiringBusinessLineId($acquiringBusinessLineId) { diff --git a/src/Adyen/Model/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index 27f70689..aebf8cf3 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -366,7 +366,7 @@ public function setDescription($description) * Gets errorCode * * @return string|null - * @deprecated + * @deprecated since Management API v3. "Use `errors` instead." */ public function getErrorCode() { @@ -379,7 +379,7 @@ public function getErrorCode() * @param string|null $errorCode The error code of the Android app with the `status` of either **error** or **invalid**. * * @return self - * @deprecated + * @deprecated since Management API v3. "Use `errors` instead." */ public function setErrorCode($errorCode) { diff --git a/src/Adyen/Model/Management/Nexo.php b/src/Adyen/Model/Management/Nexo.php index a93ae2ba..d1519023 100644 --- a/src/Adyen/Model/Management/Nexo.php +++ b/src/Adyen/Model/Management/Nexo.php @@ -380,7 +380,7 @@ public function setEventUrls($eventUrls) * Gets nexoEventUrls * * @return string[]|null - * @deprecated + * @deprecated since Management API v1. "Use `eventUrls` instead." */ public function getNexoEventUrls() { @@ -393,7 +393,7 @@ public function getNexoEventUrls() * @param string[]|null $nexoEventUrls One or more URLs to send event messages to when using Terminal API. * * @return self - * @deprecated + * @deprecated since Management API v1. "Use `eventUrls` instead." */ public function setNexoEventUrls($nexoEventUrls) { diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf..2ff0b7ef 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/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index d4d7949d..460f8ad7 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -938,7 +938,7 @@ public function setStoreId($storeId) * Gets storeIds * * @return string[]|null - * @deprecated + * @deprecated since Management API v3. "Use `storeId` instead. Only one store per payment method is allowed." */ public function getStoreIds() { @@ -951,7 +951,7 @@ public function getStoreIds() * @param string[]|null $storeIds The list of stores for this payment method * * @return self - * @deprecated + * @deprecated since Management API v3. "Use `storeId` instead. Only one store per payment method is allowed." */ public function setStoreIds($storeIds) { diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b..a3626e45 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/NegativeBalanceWarningWebhooks/Amount.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.php new file mode 100644 index 00000000..fc0a5495 --- /dev/null +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.php @@ -0,0 +1,444 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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 = [ + 'currency' => 'currency', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('currency', $data ?? [], null); + $this->setIfExists('value', $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['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' 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 currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + * + * @return self + */ + public function setCurrency($currency) + { + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + 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/NegativeBalanceWarningWebhooks/ModelInterface.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ModelInterface.php new file mode 100644 index 00000000..98e0ea9b --- /dev/null +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ModelInterface.php @@ -0,0 +1,92 @@ + + */ +class NegativeBalanceCompensationWarningNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NegativeBalanceCompensationWarningNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\NegativeBalanceWarningWebhooks\ResourceReference', + 'amount' => '\Adyen\Model\NegativeBalanceWarningWebhooks\Amount', + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string', + 'liableBalanceAccountId' => 'string', + 'negativeBalanceSince' => '\DateTime', + 'scheduledCompensationAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'amount' => null, + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null, + 'liableBalanceAccountId' => null, + 'negativeBalanceSince' => 'date-time', + 'scheduledCompensationAt' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'amount' => false, + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false, + 'liableBalanceAccountId' => false, + 'negativeBalanceSince' => false, + 'scheduledCompensationAt' => 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 = [ + 'accountHolder' => 'accountHolder', + 'amount' => 'amount', + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id', + 'liableBalanceAccountId' => 'liableBalanceAccountId', + 'negativeBalanceSince' => 'negativeBalanceSince', + 'scheduledCompensationAt' => 'scheduledCompensationAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'amount' => 'setAmount', + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId', + 'liableBalanceAccountId' => 'setLiableBalanceAccountId', + 'negativeBalanceSince' => 'setNegativeBalanceSince', + 'scheduledCompensationAt' => 'setScheduledCompensationAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'amount' => 'getAmount', + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId', + 'liableBalanceAccountId' => 'getLiableBalanceAccountId', + 'negativeBalanceSince' => 'getNegativeBalanceSince', + 'scheduledCompensationAt' => 'getScheduledCompensationAt' + ]; + + /** + * 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('accountHolder', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('liableBalanceAccountId', $data ?? [], null); + $this->setIfExists('negativeBalanceSince', $data ?? [], null); + $this->setIfExists('scheduledCompensationAt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets accountHolder + * + * @return \Adyen\Model\NegativeBalanceWarningWebhooks\ResourceReference|null + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\NegativeBalanceWarningWebhooks\ResourceReference|null $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\NegativeBalanceWarningWebhooks\Amount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\NegativeBalanceWarningWebhooks\Amount|null $amount amount + * + * @return self + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets liableBalanceAccountId + * + * @return string|null + */ + public function getLiableBalanceAccountId() + { + return $this->container['liableBalanceAccountId']; + } + + /** + * Sets liableBalanceAccountId + * + * @param string|null $liableBalanceAccountId The balance account ID of the account that will be used to compensate the balance account whose balance is negative. + * + * @return self + */ + public function setLiableBalanceAccountId($liableBalanceAccountId) + { + $this->container['liableBalanceAccountId'] = $liableBalanceAccountId; + + return $this; + } + + /** + * Gets negativeBalanceSince + * + * @return \DateTime|null + */ + public function getNegativeBalanceSince() + { + return $this->container['negativeBalanceSince']; + } + + /** + * Sets negativeBalanceSince + * + * @param \DateTime|null $negativeBalanceSince The date the balance for the account became negative. + * + * @return self + */ + public function setNegativeBalanceSince($negativeBalanceSince) + { + $this->container['negativeBalanceSince'] = $negativeBalanceSince; + + return $this; + } + + /** + * Gets scheduledCompensationAt + * + * @return \DateTime|null + */ + public function getScheduledCompensationAt() + { + return $this->container['scheduledCompensationAt']; + } + + /** + * Sets scheduledCompensationAt + * + * @param \DateTime|null $scheduledCompensationAt The date when a compensation transfer to the account is scheduled to happen. + * + * @return self + */ + public function setScheduledCompensationAt($scheduledCompensationAt) + { + $this->container['scheduledCompensationAt'] = $scheduledCompensationAt; + + 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/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php new file mode 100644 index 00000000..a05c5850 --- /dev/null +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.php @@ -0,0 +1,540 @@ + + */ +class NegativeBalanceCompensationWarningNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NegativeBalanceCompensationWarningNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\NegativeBalanceWarningWebhooks\NegativeBalanceCompensationWarningNotificationData', + 'environment' => 'string', + 'timestamp' => '\DateTime', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'timestamp' => 'date-time', + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => false, + 'timestamp' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'timestamp' => 'timestamp', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'timestamp' => 'setTimestamp', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + 'timestamp' => 'getTimestamp', + '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_BALANCE_PLATFORM_NEGATIVE_BALANCE_COMPENSATION_WARNING_SCHEDULED = 'balancePlatform.negativeBalanceCompensationWarning.scheduled'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_PLATFORM_NEGATIVE_BALANCE_COMPENSATION_WARNING_SCHEDULED, + ]; + } + /** + * 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('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Adyen\Model\NegativeBalanceWarningWebhooks\NegativeBalanceCompensationWarningNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\NegativeBalanceWarningWebhooks\NegativeBalanceCompensationWarningNotificationData $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp When the event was queued. + * + * @return self + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/NegativeBalanceWarningWebhooks/ObjectSerializer.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php new file mode 100644 index 00000000..a7a46550 --- /dev/null +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php @@ -0,0 +1,316 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php new file mode 100644 index 00000000..35b40543 --- /dev/null +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.php @@ -0,0 +1,469 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => 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 = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * 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('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + 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/NegativeBalanceWarningWebhooks/ResourceReference.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.php new file mode 100644 index 00000000..536772c1 --- /dev/null +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.php @@ -0,0 +1,469 @@ + + */ +class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResourceReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'reference' => 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 = [ + 'description' => 'description', + 'id' => 'id', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'reference' => 'getReference' + ]; + + /** + * 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('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + $this->container['reference'] = $reference; + + 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/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 8032f208..b6a5027e 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/AccountInfo.php b/src/Adyen/Model/Payments/AccountInfo.php index d1632a52..d13248c8 100644 --- a/src/Adyen/Model/Payments/AccountInfo.php +++ b/src/Adyen/Model/Payments/AccountInfo.php @@ -804,7 +804,7 @@ public function setDeliveryAddressUsageIndicator($deliveryAddressUsageIndicator) * Gets homePhone * * @return string|null - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `ThreeDS2RequestData.homePhone` instead." */ public function getHomePhone() { @@ -817,7 +817,7 @@ public function getHomePhone() * @param string|null $homePhone Shopper's home phone number (including the country code). * * @return self - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `ThreeDS2RequestData.homePhone` instead." */ public function setHomePhone($homePhone) { @@ -830,7 +830,7 @@ public function setHomePhone($homePhone) * Gets mobilePhone * * @return string|null - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `ThreeDS2RequestData.mobilePhone` instead." */ public function getMobilePhone() { @@ -843,7 +843,7 @@ public function getMobilePhone() * @param string|null $mobilePhone Shopper's mobile phone number (including the country code). * * @return self - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `ThreeDS2RequestData.mobilePhone` instead." */ public function setMobilePhone($mobilePhone) { @@ -1068,7 +1068,7 @@ public function setSuspiciousActivity($suspiciousActivity) * Gets workPhone * * @return string|null - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `ThreeDS2RequestData.workPhone` instead." */ public function getWorkPhone() { @@ -1081,7 +1081,7 @@ public function getWorkPhone() * @param string|null $workPhone Shopper's work phone number (including the country code). * * @return self - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `ThreeDS2RequestData.workPhone` instead." */ public function setWorkPhone($workPhone) { diff --git a/src/Adyen/Model/Payments/AdditionalDataAirline.php b/src/Adyen/Model/Payments/AdditionalDataAirline.php index ce286b26..13d6cf97 100644 --- a/src/Adyen/Model/Payments/AdditionalDataAirline.php +++ b/src/Adyen/Model/Payments/AdditionalDataAirline.php @@ -66,7 +66,7 @@ class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSeriali 'airlinePassengerDateOfBirth' => 'string', 'airlinePassengerFirstName' => 'string', 'airlinePassengerLastName' => 'string', - 'airlinePassengerTelephoneNumber' => 'string', + 'airlinePassengerPhoneNumber' => 'string', 'airlinePassengerTravellerType' => 'string', 'airlinePassengerName' => 'string', 'airlineTicketIssueAddress' => 'string', @@ -105,7 +105,7 @@ class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSeriali 'airlinePassengerDateOfBirth' => null, 'airlinePassengerFirstName' => null, 'airlinePassengerLastName' => null, - 'airlinePassengerTelephoneNumber' => null, + 'airlinePassengerPhoneNumber' => null, 'airlinePassengerTravellerType' => null, 'airlinePassengerName' => null, 'airlineTicketIssueAddress' => null, @@ -142,7 +142,7 @@ class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSeriali 'airlinePassengerDateOfBirth' => false, 'airlinePassengerFirstName' => false, 'airlinePassengerLastName' => false, - 'airlinePassengerTelephoneNumber' => false, + 'airlinePassengerPhoneNumber' => false, 'airlinePassengerTravellerType' => false, 'airlinePassengerName' => false, 'airlineTicketIssueAddress' => false, @@ -259,7 +259,7 @@ public function isNullableSetToNull(string $property): bool 'airlinePassengerDateOfBirth' => 'airline.passenger.date_of_birth', 'airlinePassengerFirstName' => 'airline.passenger.first_name', 'airlinePassengerLastName' => 'airline.passenger.last_name', - 'airlinePassengerTelephoneNumber' => 'airline.passenger.telephone_number', + 'airlinePassengerPhoneNumber' => 'airline.passenger.phone_number', 'airlinePassengerTravellerType' => 'airline.passenger.traveller_type', 'airlinePassengerName' => 'airline.passenger_name', 'airlineTicketIssueAddress' => 'airline.ticket_issue_address', @@ -296,7 +296,7 @@ public function isNullableSetToNull(string $property): bool 'airlinePassengerDateOfBirth' => 'setAirlinePassengerDateOfBirth', 'airlinePassengerFirstName' => 'setAirlinePassengerFirstName', 'airlinePassengerLastName' => 'setAirlinePassengerLastName', - 'airlinePassengerTelephoneNumber' => 'setAirlinePassengerTelephoneNumber', + 'airlinePassengerPhoneNumber' => 'setAirlinePassengerPhoneNumber', 'airlinePassengerTravellerType' => 'setAirlinePassengerTravellerType', 'airlinePassengerName' => 'setAirlinePassengerName', 'airlineTicketIssueAddress' => 'setAirlineTicketIssueAddress', @@ -333,7 +333,7 @@ public function isNullableSetToNull(string $property): bool 'airlinePassengerDateOfBirth' => 'getAirlinePassengerDateOfBirth', 'airlinePassengerFirstName' => 'getAirlinePassengerFirstName', 'airlinePassengerLastName' => 'getAirlinePassengerLastName', - 'airlinePassengerTelephoneNumber' => 'getAirlinePassengerTelephoneNumber', + 'airlinePassengerPhoneNumber' => 'getAirlinePassengerPhoneNumber', 'airlinePassengerTravellerType' => 'getAirlinePassengerTravellerType', 'airlinePassengerName' => 'getAirlinePassengerName', 'airlineTicketIssueAddress' => 'getAirlineTicketIssueAddress', @@ -421,7 +421,7 @@ public function __construct(array $data = null) $this->setIfExists('airlinePassengerDateOfBirth', $data ?? [], null); $this->setIfExists('airlinePassengerFirstName', $data ?? [], null); $this->setIfExists('airlinePassengerLastName', $data ?? [], null); - $this->setIfExists('airlinePassengerTelephoneNumber', $data ?? [], null); + $this->setIfExists('airlinePassengerPhoneNumber', $data ?? [], null); $this->setIfExists('airlinePassengerTravellerType', $data ?? [], null); $this->setIfExists('airlinePassengerName', $data ?? [], null); $this->setIfExists('airlineTicketIssueAddress', $data ?? [], null); @@ -1004,25 +1004,25 @@ public function setAirlinePassengerLastName($airlinePassengerLastName) } /** - * Gets airlinePassengerTelephoneNumber + * Gets airlinePassengerPhoneNumber * * @return string|null */ - public function getAirlinePassengerTelephoneNumber() + public function getAirlinePassengerPhoneNumber() { - return $this->container['airlinePassengerTelephoneNumber']; + return $this->container['airlinePassengerPhoneNumber']; } /** - * Sets airlinePassengerTelephoneNumber + * Sets airlinePassengerPhoneNumber * - * @param string|null $airlinePassengerTelephoneNumber The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters + * @param string|null $airlinePassengerPhoneNumber The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * * @return self */ - public function setAirlinePassengerTelephoneNumber($airlinePassengerTelephoneNumber) + public function setAirlinePassengerPhoneNumber($airlinePassengerPhoneNumber) { - $this->container['airlinePassengerTelephoneNumber'] = $airlinePassengerTelephoneNumber; + $this->container['airlinePassengerPhoneNumber'] = $airlinePassengerPhoneNumber; return $this; } diff --git a/src/Adyen/Model/Payments/MerchantRiskIndicator.php b/src/Adyen/Model/Payments/MerchantRiskIndicator.php index 69a92753..e798e29a 100644 --- a/src/Adyen/Model/Payments/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Payments/MerchantRiskIndicator.php @@ -489,7 +489,7 @@ public function setDeliveryAddressIndicator($deliveryAddressIndicator) * Gets deliveryEmail * * @return string|null - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `deliveryEmailAddress` instead." */ public function getDeliveryEmail() { @@ -502,7 +502,7 @@ public function getDeliveryEmail() * @param string|null $deliveryEmail The delivery email address (for digital goods). * * @return self - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `deliveryEmailAddress` instead." */ public function setDeliveryEmail($deliveryEmail) { diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461..ae7a870c 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/Split.php b/src/Adyen/Model/Payments/Split.php index 13c6b6c5..ffc4590d 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -253,6 +253,7 @@ public function getModelName() public const TYPE_SCHEME_FEE = 'SchemeFee'; public const TYPE_SURCHARGE = 'Surcharge'; public const TYPE_TIP = 'Tip'; + public const TYPE_TOP_UP = 'TopUp'; public const TYPE_VAT = 'VAT'; /** @@ -277,6 +278,7 @@ public function getTypeAllowableValues() self::TYPE_SCHEME_FEE, self::TYPE_SURCHARGE, self::TYPE_TIP, + self::TYPE_TOP_UP, self::TYPE_VAT, ]; } diff --git a/src/Adyen/Model/Payments/ThreeDS2RequestData.php b/src/Adyen/Model/Payments/ThreeDS2RequestData.php index 669f6cfe..0adab18e 100644 --- a/src/Adyen/Model/Payments/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Payments/ThreeDS2RequestData.php @@ -853,7 +853,7 @@ public function setAddrMatch($addrMatch) * Gets authenticationOnly * * @return bool|null - * @deprecated + * @deprecated since Adyen Payment API v50. "Use `threeDSAuthenticationOnly` instead." */ public function getAuthenticationOnly() { @@ -866,7 +866,7 @@ public function getAuthenticationOnly() * @param bool|null $authenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @return self - * @deprecated + * @deprecated since Adyen Payment API v50. "Use `threeDSAuthenticationOnly` instead." */ public function setAuthenticationOnly($authenticationOnly) { @@ -879,7 +879,7 @@ public function setAuthenticationOnly($authenticationOnly) * Gets challengeIndicator * * @return string|null - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `threeDSRequestorChallengeInd` instead." */ public function getChallengeIndicator() { @@ -892,7 +892,7 @@ public function getChallengeIndicator() * @param string|null $challengeIndicator Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` * * @return self - * @deprecated + * @deprecated since Adyen Payment API v68. "Use `threeDSRequestorChallengeInd` instead." */ public function setChallengeIndicator($challengeIndicator) { diff --git a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index b900dc2b..56c51256 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 ad1c991a..0d50f436 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/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ae87baef..ba0e91ce 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/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 7adbf8e5..3b2a857b 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,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/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index 97f67038..a8a265ce 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,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 ed3372fb..93497545 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 6592bf84..9ccc6758 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 01b25bf2..d05b2690 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 b9cbe36b..349b367b 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 7592a128..6bb797d7 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 c6114356..99bc3b6b 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 df3b7a28..50ba91f1 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -60,13 +60,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 ad86f120..2e704599 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 233c0918..72b257fd 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/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed..2551bbc5 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 d834bf55..9a6ea175 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 b61d2b23..714550af 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 70c2e076..3bf8aeaa 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 c2557d39..60813025 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 1b40d271..ec0d042a 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 54005b35..65cdadc5 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 f8b7cc0b..4f955b8b 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 efff80b6..499e7895 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 8a7c5e73..8b6d78c7 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 cfe85a38..6caa292a 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 968e9c61..7113c9c3 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/Transfers/TransfersApi.php b/src/Adyen/Service/Transfers/TransfersApi.php index 869e9d60..7b62cec3 100644 --- a/src/Adyen/Service/Transfers/TransfersApi.php +++ b/src/Adyen/Service/Transfers/TransfersApi.php @@ -44,13 +44,14 @@ 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); + } /** @@ -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); + } /**