Skip to content

Commit 3ffbcab

Browse files
[reformat][adyen-sdk-automation] automated change
1 parent ecfe4ab commit 3ffbcab

File tree

217 files changed

+25972
-605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+25972
-605
lines changed

src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public function getId()
409409
/**
410410
* Sets id
411411
*
412-
* @param string $id Unique identifier of the authentication.
412+
* @param string $id The unique identifier of the authentication.
413413
*
414414
* @return self
415415
*/
@@ -433,7 +433,7 @@ public function getPaymentInstrumentId()
433433
/**
434434
* Sets paymentInstrumentId
435435
*
436-
* @param string $paymentInstrumentId Unique identifier of the payment instrument that was used for the authentication.
436+
* @param string $paymentInstrumentId The unique identifier of the payment instrument that was used for the authentication.
437437
*
438438
* @return self
439439
*/

src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public function getNotificationResponse()
286286
/**
287287
* Sets notificationResponse
288288
*
289-
* @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
289+
* @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
290290
*
291291
* @return self
292292
*/

src/Adyen/Model/AcsWebhooks/ObjectSerializer.php

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach ($data as $property => $value) {
85+
foreach($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,9 +118,7 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) {
122-
return $timestamp;
123-
}
121+
if (!is_string($timestamp)) return $timestamp;
124122

125123
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
126124
}
@@ -237,30 +235,6 @@ public static function deserialize($data, $class, $httpHeaders = null)
237235
}
238236
}
239237

240-
if ($class === '\SplFileObject') {
241-
$data = Utils::streamFor($data);
242-
243-
/** @var \Psr\Http\Message\StreamInterface $data */
244-
245-
// determine file name
246-
if (is_array($httpHeaders)
247-
&& array_key_exists('Content-Disposition', $httpHeaders)
248-
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
249-
) {
250-
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]);
251-
} else {
252-
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
253-
}
254-
255-
$file = fopen($filename, 'w');
256-
while ($chunk = $data->read(200)) {
257-
fwrite($file, $chunk);
258-
}
259-
fclose($file);
260-
261-
return new \SplFileObject($filename, 'r');
262-
}
263-
264238
/** @psalm-suppress ParadoxicalCondition */
265239
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
266240
settype($data, $class);

src/Adyen/Model/AcsWebhooks/PurchaseInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function getDate()
309309
/**
310310
* Sets date
311311
*
312-
* @param string $date Date of the purchase.
312+
* @param string $date The date of the purchase.
313313
*
314314
* @return self
315315
*/
@@ -333,7 +333,7 @@ public function getMerchantName()
333333
/**
334334
* Sets merchantName
335335
*
336-
* @param string $merchantName Name of the merchant.
336+
* @param string $merchantName The name of the business that the cardholder purchased from.
337337
*
338338
* @return self
339339
*/

src/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.php

Lines changed: 167 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \Json
4141
* @var string[]
4242
*/
4343
protected static $openAPITypes = [
44+
'environment' => 'string',
4445
'id' => 'string',
4546
'paymentInstrumentId' => 'string',
46-
'purchase' => '\Adyen\Model\AcsWebhooks\Purchase'
47+
'purchase' => '\Adyen\Model\AcsWebhooks\Purchase',
48+
'threeDSRequestorAppURL' => 'string',
49+
'timestamp' => '\DateTime',
50+
'type' => 'string'
4751
];
4852

4953
/**
@@ -54,9 +58,13 @@ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \Json
5458
* @psalm-var array<string, string|null>
5559
*/
5660
protected static $openAPIFormats = [
61+
'environment' => null,
5762
'id' => null,
5863
'paymentInstrumentId' => null,
59-
'purchase' => null
64+
'purchase' => null,
65+
'threeDSRequestorAppURL' => null,
66+
'timestamp' => 'date-time',
67+
'type' => null
6068
];
6169

6270
/**
@@ -65,9 +73,13 @@ class RelayedAuthenticationRequest implements ModelInterface, ArrayAccess, \Json
6573
* @var boolean[]
6674
*/
6775
protected static $openAPINullables = [
76+
'environment' => false,
6877
'id' => false,
6978
'paymentInstrumentId' => false,
70-
'purchase' => false
79+
'purchase' => false,
80+
'threeDSRequestorAppURL' => false,
81+
'timestamp' => false,
82+
'type' => false
7183
];
7284

7385
/**
@@ -156,9 +168,13 @@ public function isNullableSetToNull(string $property): bool
156168
* @var string[]
157169
*/
158170
protected static $attributeMap = [
171+
'environment' => 'environment',
159172
'id' => 'id',
160173
'paymentInstrumentId' => 'paymentInstrumentId',
161-
'purchase' => 'purchase'
174+
'purchase' => 'purchase',
175+
'threeDSRequestorAppURL' => 'threeDSRequestorAppURL',
176+
'timestamp' => 'timestamp',
177+
'type' => 'type'
162178
];
163179

164180
/**
@@ -167,9 +183,13 @@ public function isNullableSetToNull(string $property): bool
167183
* @var string[]
168184
*/
169185
protected static $setters = [
186+
'environment' => 'setEnvironment',
170187
'id' => 'setId',
171188
'paymentInstrumentId' => 'setPaymentInstrumentId',
172-
'purchase' => 'setPurchase'
189+
'purchase' => 'setPurchase',
190+
'threeDSRequestorAppURL' => 'setThreeDSRequestorAppURL',
191+
'timestamp' => 'setTimestamp',
192+
'type' => 'setType'
173193
];
174194

175195
/**
@@ -178,9 +198,13 @@ public function isNullableSetToNull(string $property): bool
178198
* @var string[]
179199
*/
180200
protected static $getters = [
201+
'environment' => 'getEnvironment',
181202
'id' => 'getId',
182203
'paymentInstrumentId' => 'getPaymentInstrumentId',
183-
'purchase' => 'getPurchase'
204+
'purchase' => 'getPurchase',
205+
'threeDSRequestorAppURL' => 'getThreeDSRequestorAppURL',
206+
'timestamp' => 'getTimestamp',
207+
'type' => 'getType'
184208
];
185209

186210
/**
@@ -224,7 +248,19 @@ public function getModelName()
224248
return self::$openAPIModelName;
225249
}
226250

251+
public const TYPE_BALANCE_PLATFORM_AUTHENTICATION_RELAYED = 'balancePlatform.authentication.relayed';
227252

253+
/**
254+
* Gets allowable values of the enum
255+
*
256+
* @return string[]
257+
*/
258+
public function getTypeAllowableValues()
259+
{
260+
return [
261+
self::TYPE_BALANCE_PLATFORM_AUTHENTICATION_RELAYED,
262+
];
263+
}
228264
/**
229265
* Associative array for storing property values
230266
*
@@ -240,9 +276,13 @@ public function getModelName()
240276
*/
241277
public function __construct(?array $data = null)
242278
{
279+
$this->setIfExists('environment', $data ?? [], null);
243280
$this->setIfExists('id', $data ?? [], null);
244281
$this->setIfExists('paymentInstrumentId', $data ?? [], null);
245282
$this->setIfExists('purchase', $data ?? [], null);
283+
$this->setIfExists('threeDSRequestorAppURL', $data ?? [], null);
284+
$this->setIfExists('timestamp', $data ?? [], null);
285+
$this->setIfExists('type', $data ?? [], null);
246286
}
247287

248288
/**
@@ -272,6 +312,9 @@ public function listInvalidProperties()
272312
{
273313
$invalidProperties = [];
274314

315+
if ($this->container['environment'] === null) {
316+
$invalidProperties[] = "'environment' can't be null";
317+
}
275318
if ($this->container['id'] === null) {
276319
$invalidProperties[] = "'id' can't be null";
277320
}
@@ -281,6 +324,18 @@ public function listInvalidProperties()
281324
if ($this->container['purchase'] === null) {
282325
$invalidProperties[] = "'purchase' can't be null";
283326
}
327+
if ($this->container['type'] === null) {
328+
$invalidProperties[] = "'type' can't be null";
329+
}
330+
$allowedValues = $this->getTypeAllowableValues();
331+
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
332+
$invalidProperties[] = sprintf(
333+
"invalid value '%s' for 'type', must be one of '%s'",
334+
$this->container['type'],
335+
implode("', '", $allowedValues)
336+
);
337+
}
338+
284339
return $invalidProperties;
285340
}
286341

@@ -296,6 +351,30 @@ public function valid()
296351
}
297352

298353

354+
/**
355+
* Gets environment
356+
*
357+
* @return string
358+
*/
359+
public function getEnvironment()
360+
{
361+
return $this->container['environment'];
362+
}
363+
364+
/**
365+
* Sets environment
366+
*
367+
* @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**.
368+
*
369+
* @return self
370+
*/
371+
public function setEnvironment($environment)
372+
{
373+
$this->container['environment'] = $environment;
374+
375+
return $this;
376+
}
377+
299378
/**
300379
* Gets id
301380
*
@@ -367,6 +446,88 @@ public function setPurchase($purchase)
367446

368447
return $this;
369448
}
449+
450+
/**
451+
* Gets threeDSRequestorAppURL
452+
*
453+
* @return string|null
454+
*/
455+
public function getThreeDSRequestorAppURL()
456+
{
457+
return $this->container['threeDSRequestorAppURL'];
458+
}
459+
460+
/**
461+
* Sets threeDSRequestorAppURL
462+
*
463+
* @param string|null $threeDSRequestorAppURL URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn't support auto-switching.
464+
*
465+
* @return self
466+
*/
467+
public function setThreeDSRequestorAppURL($threeDSRequestorAppURL)
468+
{
469+
$this->container['threeDSRequestorAppURL'] = $threeDSRequestorAppURL;
470+
471+
return $this;
472+
}
473+
474+
/**
475+
* Gets timestamp
476+
*
477+
* @return \DateTime|null
478+
*/
479+
public function getTimestamp()
480+
{
481+
return $this->container['timestamp'];
482+
}
483+
484+
/**
485+
* Sets timestamp
486+
*
487+
* @param \DateTime|null $timestamp When the event was queued.
488+
*
489+
* @return self
490+
*/
491+
public function setTimestamp($timestamp)
492+
{
493+
$this->container['timestamp'] = $timestamp;
494+
495+
return $this;
496+
}
497+
498+
/**
499+
* Gets type
500+
*
501+
* @return string
502+
*/
503+
public function getType()
504+
{
505+
return $this->container['type'];
506+
}
507+
508+
/**
509+
* Sets type
510+
*
511+
* @param string $type Type of notification.
512+
*
513+
* @return self
514+
*/
515+
public function setType($type)
516+
{
517+
$allowedValues = $this->getTypeAllowableValues();
518+
if (!in_array($type, $allowedValues, true)) {
519+
throw new \InvalidArgumentException(
520+
sprintf(
521+
"Invalid value '%s' for 'type', must be one of '%s'",
522+
$type,
523+
implode("', '", $allowedValues)
524+
)
525+
);
526+
}
527+
$this->container['type'] = $type;
528+
529+
return $this;
530+
}
370531
/**
371532
* Returns true if offset exists. False otherwise.
372533
*

src/Adyen/Model/AcsWebhooks/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public function getCreationDate()
324324
/**
325325
* Sets creationDate
326326
*
327-
* @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**.
327+
* @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**.
328328
*
329329
* @return self
330330
*/

src/Adyen/Model/BalanceControl/ObjectSerializer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach ($data as $property => $value) {
85+
foreach($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,9 +118,7 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) {
122-
return $timestamp;
123-
}
121+
if (!is_string($timestamp)) return $timestamp;
124122

125123
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
126124
}

0 commit comments

Comments
 (0)