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 Jan 8, 2025
1 parent 6d4d320 commit 32daea0
Show file tree
Hide file tree
Showing 47 changed files with 205 additions and 147 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
62 changes: 62 additions & 0 deletions src/Adyen/Model/Checkout/AdditionalDataCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ class AdditionalDataCommon implements ModelInterface, ArrayAccess, \JsonSerializ
'requestedTestErrorResponseCode' => 'string',
'allowPartialAuth' => 'string',
'authorisationType' => 'string',
'autoRescue' => 'string',
'customRoutingFlag' => 'string',
'industryUsage' => 'string',
'manualCapture' => 'string',
'maxDaysToRescue' => 'string',
'networkTxReference' => 'string',
'overwriteBrand' => 'string',
'subMerchantCity' => 'string',
Expand All @@ -73,9 +75,11 @@ class AdditionalDataCommon implements ModelInterface, ArrayAccess, \JsonSerializ
'requestedTestErrorResponseCode' => null,
'allowPartialAuth' => null,
'authorisationType' => null,
'autoRescue' => null,
'customRoutingFlag' => null,
'industryUsage' => null,
'manualCapture' => null,
'maxDaysToRescue' => null,
'networkTxReference' => null,
'overwriteBrand' => null,
'subMerchantCity' => null,
Expand All @@ -97,9 +101,11 @@ class AdditionalDataCommon implements ModelInterface, ArrayAccess, \JsonSerializ
'requestedTestErrorResponseCode' => false,
'allowPartialAuth' => false,
'authorisationType' => false,
'autoRescue' => false,
'customRoutingFlag' => false,
'industryUsage' => false,
'manualCapture' => false,
'maxDaysToRescue' => false,
'networkTxReference' => false,
'overwriteBrand' => false,
'subMerchantCity' => false,
Expand Down Expand Up @@ -201,9 +207,11 @@ public function isNullableSetToNull(string $property): bool
'requestedTestErrorResponseCode' => 'RequestedTestErrorResponseCode',
'allowPartialAuth' => 'allowPartialAuth',
'authorisationType' => 'authorisationType',
'autoRescue' => 'autoRescue',
'customRoutingFlag' => 'customRoutingFlag',
'industryUsage' => 'industryUsage',
'manualCapture' => 'manualCapture',
'maxDaysToRescue' => 'maxDaysToRescue',
'networkTxReference' => 'networkTxReference',
'overwriteBrand' => 'overwriteBrand',
'subMerchantCity' => 'subMerchantCity',
Expand All @@ -225,9 +233,11 @@ public function isNullableSetToNull(string $property): bool
'requestedTestErrorResponseCode' => 'setRequestedTestErrorResponseCode',
'allowPartialAuth' => 'setAllowPartialAuth',
'authorisationType' => 'setAuthorisationType',
'autoRescue' => 'setAutoRescue',
'customRoutingFlag' => 'setCustomRoutingFlag',
'industryUsage' => 'setIndustryUsage',
'manualCapture' => 'setManualCapture',
'maxDaysToRescue' => 'setMaxDaysToRescue',
'networkTxReference' => 'setNetworkTxReference',
'overwriteBrand' => 'setOverwriteBrand',
'subMerchantCity' => 'setSubMerchantCity',
Expand All @@ -249,9 +259,11 @@ public function isNullableSetToNull(string $property): bool
'requestedTestErrorResponseCode' => 'getRequestedTestErrorResponseCode',
'allowPartialAuth' => 'getAllowPartialAuth',
'authorisationType' => 'getAuthorisationType',
'autoRescue' => 'getAutoRescue',
'customRoutingFlag' => 'getCustomRoutingFlag',
'industryUsage' => 'getIndustryUsage',
'manualCapture' => 'getManualCapture',
'maxDaysToRescue' => 'getMaxDaysToRescue',
'networkTxReference' => 'getNetworkTxReference',
'overwriteBrand' => 'getOverwriteBrand',
'subMerchantCity' => 'getSubMerchantCity',
Expand Down Expand Up @@ -338,9 +350,11 @@ public function __construct(array $data = null)
$this->setIfExists('requestedTestErrorResponseCode', $data ?? [], null);
$this->setIfExists('allowPartialAuth', $data ?? [], null);
$this->setIfExists('authorisationType', $data ?? [], null);
$this->setIfExists('autoRescue', $data ?? [], null);
$this->setIfExists('customRoutingFlag', $data ?? [], null);
$this->setIfExists('industryUsage', $data ?? [], null);
$this->setIfExists('manualCapture', $data ?? [], null);
$this->setIfExists('maxDaysToRescue', $data ?? [], null);
$this->setIfExists('networkTxReference', $data ?? [], null);
$this->setIfExists('overwriteBrand', $data ?? [], null);
$this->setIfExists('subMerchantCity', $data ?? [], null);
Expand Down Expand Up @@ -476,6 +490,30 @@ public function setAuthorisationType($authorisationType)
return $this;
}

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

/**
* Sets autoRescue
*
* @param string|null $autoRescue Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window.
*
* @return self
*/
public function setAutoRescue($autoRescue)
{
$this->container['autoRescue'] = $autoRescue;

return $this;
}

/**
* Gets customRoutingFlag
*
Expand Down Expand Up @@ -558,6 +596,30 @@ public function setManualCapture($manualCapture)
return $this;
}

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

/**
* Sets maxDaysToRescue
*
* @param string|null $maxDaysToRescue The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days.
*
* @return self
*/
public function setMaxDaysToRescue($maxDaysToRescue)
{
$this->container['maxDaysToRescue'] = $maxDaysToRescue;

return $this;
}

/**
* Gets networkTxReference
*
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 @@ -1999,7 +1999,7 @@ public function getShopperEmail()
/**
* Sets shopperEmail
*
* @param string $shopperEmail
* @param string $shopperEmail
*
* @return self
*/
Expand All @@ -2023,7 +2023,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @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/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 32daea0

Please sign in to comment.