Skip to content

Commit

Permalink
[reformat][adyen-sdk-automation] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot committed Feb 19, 2025
1 parent d8b3427 commit 0436cd9
Show file tree
Hide file tree
Showing 61 changed files with 201 additions and 175 deletions.
9 changes: 4 additions & 5 deletions src/Adyen/Model/AcsWebhooks/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BalanceControl/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
8 changes: 4 additions & 4 deletions src/Adyen/Model/BalancePlatform/CapabilitySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function getAmountPerIndustry()
/**
* Sets amountPerIndustry
*
* @param array<string,\Adyen\Model\BalancePlatform\Amount>|null $amountPerIndustry
* @param array<string,\Adyen\Model\BalancePlatform\Amount>|null $amountPerIndustry
*
* @return self
*/
Expand All @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers()
/**
* Sets authorizedCardUsers
*
* @param bool|null $authorizedCardUsers
* @param bool|null $authorizedCardUsers
*
* @return self
*/
Expand All @@ -406,7 +406,7 @@ public function getFundingSource()
/**
* Sets fundingSource
*
* @param string[]|null $fundingSource
* @param string[]|null $fundingSource
*
* @return self
*/
Expand Down Expand Up @@ -439,7 +439,7 @@ public function getInterval()
/**
* Sets interval
*
* @param string|null $interval
* @param string|null $interval
*
* @return self
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BalancePlatform/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BinLookup/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/BalanceCheckRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/Checkout/CheckoutPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ public function getShopperEmail()
/**
* Sets shopperEmail
*
* @param string $shopperEmail
* @param string $shopperEmail
*
* @return self
*/
Expand All @@ -2057,7 +2057,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/FundRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/Checkout/MbwayDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function getShopperEmail()
/**
* Sets shopperEmail
*
* @param string $shopperEmail
* @param string $shopperEmail
*
* @return self
*/
Expand All @@ -385,7 +385,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @return self
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/Checkout/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/PaymentLinkRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/PaymentLinkResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/PaymentMethodsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
31 changes: 31 additions & 0 deletions src/Adyen/Model/Checkout/PaymentRefundResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $openAPITypes = [
'amount' => '\Adyen\Model\Checkout\Amount',
'capturePspReference' => 'string',
'lineItems' => '\Adyen\Model\Checkout\LineItem[]',
'merchantAccount' => 'string',
'merchantRefundReason' => 'string',
Expand All @@ -65,6 +66,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $openAPIFormats = [
'amount' => null,
'capturePspReference' => null,
'lineItems' => null,
'merchantAccount' => null,
'merchantRefundReason' => null,
Expand All @@ -83,6 +85,7 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $openAPINullables = [
'amount' => false,
'capturePspReference' => false,
'lineItems' => false,
'merchantAccount' => false,
'merchantRefundReason' => true,
Expand Down Expand Up @@ -181,6 +184,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'amount' => 'amount',
'capturePspReference' => 'capturePspReference',
'lineItems' => 'lineItems',
'merchantAccount' => 'merchantAccount',
'merchantRefundReason' => 'merchantRefundReason',
Expand All @@ -199,6 +203,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'amount' => 'setAmount',
'capturePspReference' => 'setCapturePspReference',
'lineItems' => 'setLineItems',
'merchantAccount' => 'setMerchantAccount',
'merchantRefundReason' => 'setMerchantRefundReason',
Expand All @@ -217,6 +222,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'amount' => 'getAmount',
'capturePspReference' => 'getCapturePspReference',
'lineItems' => 'getLineItems',
'merchantAccount' => 'getMerchantAccount',
'merchantRefundReason' => 'getMerchantRefundReason',
Expand Down Expand Up @@ -318,6 +324,7 @@ public function getStatusAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('amount', $data ?? [], null);
$this->setIfExists('capturePspReference', $data ?? [], null);
$this->setIfExists('lineItems', $data ?? [], null);
$this->setIfExists('merchantAccount', $data ?? [], null);
$this->setIfExists('merchantRefundReason', $data ?? [], null);
Expand Down Expand Up @@ -428,6 +435,30 @@ public function setAmount($amount)
return $this;
}

/**
* Gets capturePspReference
*
* @return string|null
*/
public function getCapturePspReference()
{
return $this->container['capturePspReference'];
}

/**
* Sets capturePspReference
*
* @param string|null $capturePspReference This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.
*
* @return self
*/
public function setCapturePspReference($capturePspReference)
{
$this->container['capturePspReference'] = $capturePspReference;

return $this;
}

/**
* Gets lineItems
*
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/StoredPaymentMethodResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public function getShopperReference()
/**
* Sets shopperReference
*
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
* @param string|null $shopperReference Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/VippsDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @return self
*/
Expand Down
Loading

0 comments on commit 0436cd9

Please sign in to comment.