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 May 2, 2024
1 parent 03573f5 commit 51d0410
Show file tree
Hide file tree
Showing 207 changed files with 14,750 additions and 2,565 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
41 changes: 0 additions & 41 deletions src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
protected static $openAPITypes = [
'accountNumber' => 'string',
'bsbCode' => 'string',
'formFactor' => 'string',
'type' => 'string'
];

Expand All @@ -60,7 +59,6 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
protected static $openAPIFormats = [
'accountNumber' => null,
'bsbCode' => null,
'formFactor' => null,
'type' => null
];

Expand All @@ -72,7 +70,6 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
protected static $openAPINullables = [
'accountNumber' => false,
'bsbCode' => false,
'formFactor' => true,
'type' => false
];

Expand Down Expand Up @@ -164,7 +161,6 @@ public function isNullableSetToNull(string $property): bool
protected static $attributeMap = [
'accountNumber' => 'accountNumber',
'bsbCode' => 'bsbCode',
'formFactor' => 'formFactor',
'type' => 'type'
];

Expand All @@ -176,7 +172,6 @@ public function isNullableSetToNull(string $property): bool
protected static $setters = [
'accountNumber' => 'setAccountNumber',
'bsbCode' => 'setBsbCode',
'formFactor' => 'setFormFactor',
'type' => 'setType'
];

Expand All @@ -188,7 +183,6 @@ public function isNullableSetToNull(string $property): bool
protected static $getters = [
'accountNumber' => 'getAccountNumber',
'bsbCode' => 'getBsbCode',
'formFactor' => 'getFormFactor',
'type' => 'getType'
];

Expand Down Expand Up @@ -263,7 +257,6 @@ public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bsbCode', $data ?? [], null);
$this->setIfExists('formFactor', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
}

Expand Down Expand Up @@ -381,40 +374,6 @@ public function setBsbCode($bsbCode)
return $this;
}

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

/**
* Sets formFactor
*
* @param string|null $formFactor The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**.
*
* @return self
*/
public function setFormFactor($formFactor)
{
if (is_null($formFactor)) {
array_push($this->openAPINullablesSetToNull, 'formFactor');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('formFactor', $nullablesSetToNull);
if ($index !== false) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['formFactor'] = $formFactor;

return $this;
}

/**
* Gets type
*
Expand Down
8 changes: 3 additions & 5 deletions src/Adyen/Model/BalancePlatform/AccountHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ public function getModelName()

public const STATUS_ACTIVE = 'active';
public const STATUS_CLOSED = 'closed';
public const STATUS_INACTIVE = 'inactive';
public const STATUS_SUSPENDED = 'suspended';

/**
Expand All @@ -302,7 +301,6 @@ public function getStatusAllowableValues()
return [
self::STATUS_ACTIVE,
self::STATUS_CLOSED,
self::STATUS_INACTIVE,
self::STATUS_SUSPENDED,
];
}
Expand Down Expand Up @@ -487,7 +485,7 @@ public function getDescription()
/**
* Sets description
*
* @param string|null $description Your description for the account holder, maximum 300 characters.
* @param string|null $description Your description for the account holder.
*
* @return self
*/
Expand Down Expand Up @@ -649,7 +647,7 @@ public function getReference()
/**
* Sets reference
*
* @param string|null $reference Your reference for the account holder, maximum 150 characters.
* @param string|null $reference Your reference for the account holder.
*
* @return self
*/
Expand All @@ -676,7 +674,7 @@ public function getStatus()
/**
* Sets status
*
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/BalancePlatform/AccountHolderInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public function getDescription()
/**
* Sets description
*
* @param string|null $description Your description for the account holder, maximum 300 characters.
* @param string|null $description Your description for the account holder.
*
* @return self
*/
Expand Down Expand Up @@ -537,7 +537,7 @@ public function getReference()
/**
* Sets reference
*
* @param string|null $reference Your reference for the account holder, maximum 150 characters.
* @param string|null $reference Your reference for the account holder.
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ public function getModelName()

public const STATUS_ACTIVE = 'active';
public const STATUS_CLOSED = 'closed';
public const STATUS_INACTIVE = 'inactive';
public const STATUS_SUSPENDED = 'suspended';

/**
Expand All @@ -290,7 +289,6 @@ public function getStatusAllowableValues()
return [
self::STATUS_ACTIVE,
self::STATUS_CLOSED,
self::STATUS_INACTIVE,
self::STATUS_SUSPENDED,
];
}
Expand Down Expand Up @@ -467,7 +465,7 @@ public function getDescription()
/**
* Sets description
*
* @param string|null $description Your description for the account holder, maximum 300 characters.
* @param string|null $description Your description for the account holder.
*
* @return self
*/
Expand Down Expand Up @@ -575,7 +573,7 @@ public function getReference()
/**
* Sets reference
*
* @param string|null $reference Your reference for the account holder, maximum 150 characters.
* @param string|null $reference Your reference for the account holder.
*
* @return self
*/
Expand All @@ -602,7 +600,7 @@ public function getStatus()
/**
* Sets status
*
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
*
* @return self
*/
Expand Down
41 changes: 0 additions & 41 deletions src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
'accountNumber' => 'string',
'bankCode' => 'string',
'branchNumber' => 'string',
'formFactor' => 'string',
'type' => 'string'
];

Expand All @@ -62,7 +61,6 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
'accountNumber' => null,
'bankCode' => null,
'branchNumber' => null,
'formFactor' => null,
'type' => null
];

Expand All @@ -75,7 +73,6 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
'accountNumber' => false,
'bankCode' => false,
'branchNumber' => false,
'formFactor' => true,
'type' => false
];

Expand Down Expand Up @@ -168,7 +165,6 @@ public function isNullableSetToNull(string $property): bool
'accountNumber' => 'accountNumber',
'bankCode' => 'bankCode',
'branchNumber' => 'branchNumber',
'formFactor' => 'formFactor',
'type' => 'type'
];

Expand All @@ -181,7 +177,6 @@ public function isNullableSetToNull(string $property): bool
'accountNumber' => 'setAccountNumber',
'bankCode' => 'setBankCode',
'branchNumber' => 'setBranchNumber',
'formFactor' => 'setFormFactor',
'type' => 'setType'
];

Expand All @@ -194,7 +189,6 @@ public function isNullableSetToNull(string $property): bool
'accountNumber' => 'getAccountNumber',
'bankCode' => 'getBankCode',
'branchNumber' => 'getBranchNumber',
'formFactor' => 'getFormFactor',
'type' => 'getType'
];

Expand Down Expand Up @@ -270,7 +264,6 @@ public function __construct(array $data = null)
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bankCode', $data ?? [], null);
$this->setIfExists('branchNumber', $data ?? [], null);
$this->setIfExists('formFactor', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
}

Expand Down Expand Up @@ -418,40 +411,6 @@ public function setBranchNumber($branchNumber)
return $this;
}

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

/**
* Sets formFactor
*
* @param string|null $formFactor The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**.
*
* @return self
*/
public function setFormFactor($formFactor)
{
if (is_null($formFactor)) {
array_push($this->openAPINullablesSetToNull, 'formFactor');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('formFactor', $nullablesSetToNull);
if ($index !== false) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['formFactor'] = $formFactor;

return $this;
}

/**
* Gets type
*
Expand Down
8 changes: 4 additions & 4 deletions src/Adyen/Model/BalancePlatform/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function getAvailable()
/**
* Sets available
*
* @param int $available The remaining amount available for spending.
* @param int $available The current balance minus any reserved balance.
*
* @return self
*/
Expand All @@ -356,7 +356,7 @@ public function getBalance()
/**
* Sets balance
*
* @param int $balance The total amount in the balance.
* @param int $balance The current balance of funds in the balance account. These are the funds from all transactions with a value date in the past that have not yet been paid out.
*
* @return self
*/
Expand Down Expand Up @@ -410,7 +410,7 @@ public function getPending()
/**
* Sets pending
*
* @param int|null $pending The amount pending to be paid out but not yet available in the balance.
* @param int|null $pending The amount of funds that Adyen has processed for this account, but will be settled in a future date. For more information, see how to settle funds for users in your [platform](https://docs.adyen.com/platforms/settle-funds) and [marketplace](https://docs.adyen.com/marketplaces/settle-funds).
*
* @return self
*/
Expand All @@ -437,7 +437,7 @@ public function getReserved()
/**
* Sets reserved
*
* @param int $reserved The amount reserved for payments that have been authorised, but have not been captured yet.
* @param int $reserved The amount reserved for payments that have been [authorised](https://docs.adyen.com/issuing/payment-stages/#authorised), but not yet [captured](https://docs.adyen.com/issuing/payment-stages/#captured) by the merchant. Applies only to [Adyen-issued cards](https://docs.adyen.com/issuing).
*
* @return self
*/
Expand Down
Loading

0 comments on commit 51d0410

Please sign in to comment.