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 Sep 23, 2024
1 parent 4968131 commit 14f107a
Show file tree
Hide file tree
Showing 51 changed files with 233 additions and 144 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
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/FundRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public function getWalletOwnerTaxId()
/**
* Sets walletOwnerTaxId
*
* @param string|null $walletOwnerTaxId Indicates the tax identifier of the fund recepient
* @param string|null $walletOwnerTaxId Indicates the tax identifier of the fund recipient
*
* @return self
*/
Expand Down
31 changes: 31 additions & 0 deletions src/Adyen/Model/Checkout/Mandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Mandate implements ModelInterface, ArrayAccess, \JsonSerializable
'amountRule' => 'string',
'billingAttemptsRule' => 'string',
'billingDay' => 'string',
'count' => 'string',
'endsAt' => 'string',
'frequency' => 'string',
'remarks' => 'string',
Expand All @@ -66,6 +67,7 @@ class Mandate implements ModelInterface, ArrayAccess, \JsonSerializable
'amountRule' => null,
'billingAttemptsRule' => null,
'billingDay' => null,
'count' => null,
'endsAt' => null,
'frequency' => null,
'remarks' => null,
Expand All @@ -82,6 +84,7 @@ class Mandate implements ModelInterface, ArrayAccess, \JsonSerializable
'amountRule' => false,
'billingAttemptsRule' => false,
'billingDay' => false,
'count' => false,
'endsAt' => false,
'frequency' => false,
'remarks' => false,
Expand Down Expand Up @@ -178,6 +181,7 @@ public function isNullableSetToNull(string $property): bool
'amountRule' => 'amountRule',
'billingAttemptsRule' => 'billingAttemptsRule',
'billingDay' => 'billingDay',
'count' => 'count',
'endsAt' => 'endsAt',
'frequency' => 'frequency',
'remarks' => 'remarks',
Expand All @@ -194,6 +198,7 @@ public function isNullableSetToNull(string $property): bool
'amountRule' => 'setAmountRule',
'billingAttemptsRule' => 'setBillingAttemptsRule',
'billingDay' => 'setBillingDay',
'count' => 'setCount',
'endsAt' => 'setEndsAt',
'frequency' => 'setFrequency',
'remarks' => 'setRemarks',
Expand All @@ -210,6 +215,7 @@ public function isNullableSetToNull(string $property): bool
'amountRule' => 'getAmountRule',
'billingAttemptsRule' => 'getBillingAttemptsRule',
'billingDay' => 'getBillingDay',
'count' => 'getCount',
'endsAt' => 'getEndsAt',
'frequency' => 'getFrequency',
'remarks' => 'getRemarks',
Expand Down Expand Up @@ -333,6 +339,7 @@ public function __construct(array $data = null)
$this->setIfExists('amountRule', $data ?? [], null);
$this->setIfExists('billingAttemptsRule', $data ?? [], null);
$this->setIfExists('billingDay', $data ?? [], null);
$this->setIfExists('count', $data ?? [], null);
$this->setIfExists('endsAt', $data ?? [], null);
$this->setIfExists('frequency', $data ?? [], null);
$this->setIfExists('remarks', $data ?? [], null);
Expand Down Expand Up @@ -533,6 +540,30 @@ public function setBillingDay($billingDay)
return $this;
}

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

/**
* Sets count
*
* @param string|null $count The number of transactions that can be performed within the given frequency.
*
* @return self
*/
public function setCount($count)
{
$this->container['count'] = $count;

return $this;
}

/**
* Gets endsAt
*
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: 2 additions & 0 deletions src/Adyen/Model/Checkout/PaymentDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public function getModelName()
public const TYPE_MOLPAY_EBANKING_DIRECT_MY = 'molpay_ebanking_direct_MY';
public const TYPE_SWISH = 'swish';
public const TYPE_PIX = 'pix';
public const TYPE_BIZUM = 'bizum';
public const TYPE_WALLEY = 'walley';
public const TYPE_WALLEY_B2B = 'walley_b2b';
public const TYPE_ALMA = 'alma';
Expand Down Expand Up @@ -355,6 +356,7 @@ public function getTypeAllowableValues()
self::TYPE_MOLPAY_EBANKING_DIRECT_MY,
self::TYPE_SWISH,
self::TYPE_PIX,
self::TYPE_BIZUM,
self::TYPE_WALLEY,
self::TYPE_WALLEY_B2B,
self::TYPE_ALMA,
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
8 changes: 4 additions & 4 deletions src/Adyen/Model/ConfigurationWebhooks/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\ConfigurationWebhooks\Amount>|null $amountPerIndustry
* @param array<string,\Adyen\Model\ConfigurationWebhooks\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
Loading

0 comments on commit 14f107a

Please sign in to comment.