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 Oct 2, 2024
1 parent 5bc9d69 commit 206cd3c
Show file tree
Hide file tree
Showing 58 changed files with 1,238 additions and 315 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/CardDetailsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class CardDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializa
*/
protected static $openAPITypes = [
'brands' => '\Adyen\Model\Checkout\CardBrandDetails[]',
'fundingSource' => 'string',
'isCardCommercial' => 'bool',
'issuingCountryCode' => 'string'
];

Expand All @@ -57,6 +59,8 @@ class CardDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializa
*/
protected static $openAPIFormats = [
'brands' => null,
'fundingSource' => null,
'isCardCommercial' => null,
'issuingCountryCode' => null
];

Expand All @@ -67,6 +71,8 @@ class CardDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializa
*/
protected static $openAPINullables = [
'brands' => false,
'fundingSource' => false,
'isCardCommercial' => false,
'issuingCountryCode' => false
];

Expand Down Expand Up @@ -157,6 +163,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'brands' => 'brands',
'fundingSource' => 'fundingSource',
'isCardCommercial' => 'isCardCommercial',
'issuingCountryCode' => 'issuingCountryCode'
];

Expand All @@ -167,6 +175,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'brands' => 'setBrands',
'fundingSource' => 'setFundingSource',
'isCardCommercial' => 'setIsCardCommercial',
'issuingCountryCode' => 'setIssuingCountryCode'
];

Expand All @@ -177,6 +187,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'brands' => 'getBrands',
'fundingSource' => 'getFundingSource',
'isCardCommercial' => 'getIsCardCommercial',
'issuingCountryCode' => 'getIssuingCountryCode'
];

Expand Down Expand Up @@ -238,6 +250,8 @@ public function getModelName()
public function __construct(array $data = null)
{
$this->setIfExists('brands', $data ?? [], null);
$this->setIfExists('fundingSource', $data ?? [], null);
$this->setIfExists('isCardCommercial', $data ?? [], null);
$this->setIfExists('issuingCountryCode', $data ?? [], null);
}

Expand Down Expand Up @@ -307,6 +321,54 @@ public function setBrands($brands)
return $this;
}

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

/**
* Sets fundingSource
*
* @param string|null $fundingSource The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.
*
* @return self
*/
public function setFundingSource($fundingSource)
{
$this->container['fundingSource'] = $fundingSource;

return $this;
}

/**
* Gets isCardCommercial
*
* @return bool|null
*/
public function getIsCardCommercial()
{
return $this->container['isCardCommercial'];
}

/**
* Sets isCardCommercial
*
* @param bool|null $isCardCommercial Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.
*
* @return self
*/
public function setIsCardCommercial($isCardCommercial)
{
$this->container['isCardCommercial'] = $isCardCommercial;

return $this;
}

/**
* Gets issuingCountryCode
*
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 @@ -1922,7 +1922,7 @@ public function getShopperEmail()
/**
* Sets shopperEmail
*
* @param string $shopperEmail
* @param string $shopperEmail
*
* @return self
*/
Expand All @@ -1946,7 +1946,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/CreateOrderRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function getExpiresAt()
/**
* Sets expiresAt
*
* @param string|null $expiresAt The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day.
* @param string|null $expiresAt The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.
*
* @return self
*/
Expand Down
Loading

0 comments on commit 206cd3c

Please sign in to comment.