Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\BalanceWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\BalanceWebhooks\ObjectSerializer;

/**
* BalanceAccountBalanceNotificationRequest Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class BalanceAccountBalanceNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -417,11 +417,11 @@ public function setType($type)
{
$allowedValues = $this->getTypeAllowableValues();
if (!in_array($type, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'type', must be one of '%s'",
"type: unexpected enum value '%s' - Supported values are [%s]",
$type,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Adyen/Model/BalanceWebhooks/BalanceNotificationData.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\BalanceWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\BalanceWebhooks\ObjectSerializer;

/**
* BalanceNotificationData Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class BalanceNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -412,7 +412,7 @@ public function getCreationDate()
/**
* Sets creationDate
*
* @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
* @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.
*
* @return self
*/
Expand All @@ -436,7 +436,7 @@ public function getCurrency()
/**
* Sets currency
*
* @param string $currency TThe three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
* @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\BalanceWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\BalanceWebhooks\ObjectSerializer;

/**
* BalancePlatformNotificationResponse Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -286,7 +286,7 @@ public function getNotificationResponse()
/**
* Sets notificationResponse
*
* @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
* @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/BalanceWebhooks/Balances.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\BalanceWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\BalanceWebhooks\ObjectSerializer;

/**
* Balances Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class Balances implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down
24 changes: 0 additions & 24 deletions src/Adyen/Model/BalanceWebhooks/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null)
}
}

if ($class === '\SplFileObject') {
$data = Utils::streamFor($data);

/** @var \Psr\Http\Message\StreamInterface $data */

// determine file name
if (is_array($httpHeaders)
&& array_key_exists('Content-Disposition', $httpHeaders)
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
) {
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]);
} else {
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
}

$file = fopen($filename, 'w');
while ($chunk = $data->read(200)) {
fwrite($file, $chunk);
}
fclose($file);

return new \SplFileObject($filename, 'r');
}

/** @psalm-suppress ParadoxicalCondition */
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
settype($data, $class);
Expand Down
10 changes: 5 additions & 5 deletions src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* AccountHolder Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -651,11 +651,11 @@ public function setStatus($status)
{
$allowedValues = $this->getStatusAllowableValues();
if (!in_array($status, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'status', must be one of '%s'",
"status: unexpected enum value '%s' - Supported values are [%s]",
$status,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down
22 changes: 11 additions & 11 deletions src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* AccountHolderCapability Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -462,11 +462,11 @@ public function setAllowedLevel($allowedLevel)
{
$allowedValues = $this->getAllowedLevelAllowableValues();
if (!in_array($allowedLevel, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'allowedLevel', must be one of '%s'",
"allowedLevel: unexpected enum value '%s' - Supported values are [%s]",
$allowedLevel,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down Expand Up @@ -592,11 +592,11 @@ public function setRequestedLevel($requestedLevel)
{
$allowedValues = $this->getRequestedLevelAllowableValues();
if (!in_array($requestedLevel, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'requestedLevel', must be one of '%s'",
"requestedLevel: unexpected enum value '%s' - Supported values are [%s]",
$requestedLevel,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down Expand Up @@ -674,11 +674,11 @@ public function setVerificationStatus($verificationStatus)
{
$allowedValues = $this->getVerificationStatusAllowableValues();
if (!in_array($verificationStatus, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'verificationStatus', must be one of '%s'",
"verificationStatus: unexpected enum value '%s' - Supported values are [%s]",
$verificationStatus,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* AccountHolderNotificationData Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class AccountHolderNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* AccountHolderNotificationRequest Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class AccountHolderNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -419,11 +419,11 @@ public function setType($type)
{
$allowedValues = $this->getTypeAllowableValues();
if (!in_array($type, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'type', must be one of '%s'",
"type: unexpected enum value '%s' - Supported values are [%s]",
$type,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* AccountSupportingEntityCapability Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class AccountSupportingEntityCapability implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down Expand Up @@ -441,11 +441,11 @@ public function setAllowedLevel($allowedLevel)
{
$allowedValues = $this->getAllowedLevelAllowableValues();
if (!in_array($allowedLevel, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'allowedLevel', must be one of '%s'",
"allowedLevel: unexpected enum value '%s' - Supported values are [%s]",
$allowedLevel,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down Expand Up @@ -547,11 +547,11 @@ public function setRequestedLevel($requestedLevel)
{
$allowedValues = $this->getRequestedLevelAllowableValues();
if (!in_array($requestedLevel, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'requestedLevel', must be one of '%s'",
"requestedLevel: unexpected enum value '%s' - Supported values are [%s]",
$requestedLevel,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down Expand Up @@ -581,11 +581,11 @@ public function setVerificationStatus($verificationStatus)
{
$allowedValues = $this->getVerificationStatusAllowableValues();
if (!in_array($verificationStatus, $allowedValues, true)) {
throw new \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'verificationStatus', must be one of '%s'",
"verificationStatus: unexpected enum value '%s' - Supported values are [%s]",
$verificationStatus,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/ConfigurationWebhooks/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* Address Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class Address implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/ConfigurationWebhooks/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* Amount Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class Amount implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/ConfigurationWebhooks/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Adyen\Model\ConfigurationWebhooks;

use \ArrayAccess;
use ArrayAccess;
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;

/**
* Authentication Class Doc Comment
*
* @package Adyen
* @implements \ArrayAccess<string, mixed>
* @implements ArrayAccess<string, mixed>
*/
class Authentication implements ModelInterface, ArrayAccess, \JsonSerializable
{
Expand Down
Loading