Skip to content

Commit 8b6ad91

Browse files
authored
Merge pull request #763 from Adyen/generate-models-for-platform
Generate models for LEM/Transfers/BalanceControl/BalancePlatform
2 parents 12ff965 + 7e1cd37 commit 8b6ad91

File tree

381 files changed

+3285
-1705
lines changed

Some content is hidden

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

381 files changed

+3285
-1705
lines changed

src/Adyen/Model/BalanceControl/Amount.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* Amount Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class Amount implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -235,7 +232,7 @@ public function getModelName()
235232
* @param mixed[] $data Associated array of property values
236233
* initializing the model
237234
*/
238-
public function __construct(array $data = null)
235+
public function __construct(?array $data = null)
239236
{
240237
$this->setIfExists('currency', $data ?? [], null);
241238
$this->setIfExists('value', $data ?? [], null);
@@ -302,7 +299,7 @@ public function getCurrency()
302299
/**
303300
* Sets currency
304301
*
305-
* @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
302+
* @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
306303
*
307304
* @return self
308305
*/
@@ -326,7 +323,7 @@ public function getValue()
326323
/**
327324
* Sets value
328325
*
329-
* @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
326+
* @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
330327
*
331328
* @return self
332329
*/

src/Adyen/Model/BalanceControl/BalanceTransferRequest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* BalanceTransferRequest Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class BalanceTransferRequest implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -281,7 +278,7 @@ public function getTypeAllowableValues()
281278
* @param mixed[] $data Associated array of property values
282279
* initializing the model
283280
*/
284-
public function __construct(array $data = null)
281+
public function __construct(?array $data = null)
285282
{
286283
$this->setIfExists('amount', $data ?? [], null);
287284
$this->setIfExists('description', $data ?? [], null);

src/Adyen/Model/BalanceControl/BalanceTransferResponse.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* BalanceTransferResponse Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class BalanceTransferResponse implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -317,7 +314,7 @@ public function getTypeAllowableValues()
317314
* @param mixed[] $data Associated array of property values
318315
* initializing the model
319316
*/
320-
public function __construct(array $data = null)
317+
public function __construct(?array $data = null)
321318
{
322319
$this->setIfExists('amount', $data ?? [], null);
323320
$this->setIfExists('createdAt', $data ?? [], null);

src/Adyen/Model/BalanceControl/ObjectSerializer.php

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Adyen\Model\BalanceControl;
1717

1818
use Adyen\Model\BalanceControl\ModelInterface;
19+
use GuzzleHttp\Utils;
1920

2021
class ObjectSerializer
2122
{
@@ -236,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null)
236237
}
237238
}
238239

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

src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* AULocalAccountIdentification Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -253,7 +250,7 @@ public function getTypeAllowableValues()
253250
* @param mixed[] $data Associated array of property values
254251
* initializing the model
255252
*/
256-
public function __construct(array $data = null)
253+
public function __construct(?array $data = null)
257254
{
258255
$this->setIfExists('accountNumber', $data ?? [], null);
259256
$this->setIfExists('bsbCode', $data ?? [], null);

src/Adyen/Model/BalancePlatform/AccountHolder.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* AccountHolder Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -317,7 +314,7 @@ public function getStatusAllowableValues()
317314
* @param mixed[] $data Associated array of property values
318315
* initializing the model
319316
*/
320-
public function __construct(array $data = null)
317+
public function __construct(?array $data = null)
321318
{
322319
$this->setIfExists('balancePlatform', $data ?? [], null);
323320
$this->setIfExists('capabilities', $data ?? [], null);

src/Adyen/Model/BalancePlatform/AccountHolderCapability.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* AccountHolderCapability Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -337,7 +334,7 @@ public function getVerificationStatusAllowableValues()
337334
* @param mixed[] $data Associated array of property values
338335
* initializing the model
339336
*/
340-
public function __construct(array $data = null)
337+
public function __construct(?array $data = null)
341338
{
342339
$this->setIfExists('allowed', $data ?? [], null);
343340
$this->setIfExists('allowedLevel', $data ?? [], null);

src/Adyen/Model/BalancePlatform/AccountHolderInfo.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* AccountHolderInfo Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class AccountHolderInfo implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -277,7 +274,7 @@ public function getModelName()
277274
* @param mixed[] $data Associated array of property values
278275
* initializing the model
279276
*/
280-
public function __construct(array $data = null)
277+
public function __construct(?array $data = null)
281278
{
282279
$this->setIfExists('balancePlatform', $data ?? [], null);
283280
$this->setIfExists('capabilities', $data ?? [], null);

src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* AccountHolderUpdateRequest Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class AccountHolderUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -305,7 +302,7 @@ public function getStatusAllowableValues()
305302
* @param mixed[] $data Associated array of property values
306303
* initializing the model
307304
*/
308-
public function __construct(array $data = null)
305+
public function __construct(?array $data = null)
309306
{
310307
$this->setIfExists('balancePlatform', $data ?? [], null);
311308
$this->setIfExists('capabilities', $data ?? [], null);

src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* AccountSupportingEntityCapability Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class AccountSupportingEntityCapability implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -319,7 +316,7 @@ public function getVerificationStatusAllowableValues()
319316
* @param mixed[] $data Associated array of property values
320317
* initializing the model
321318
*/
322-
public function __construct(array $data = null)
319+
public function __construct(?array $data = null)
323320
{
324321
$this->setIfExists('allowed', $data ?? [], null);
325322
$this->setIfExists('allowedLevel', $data ?? [], null);

0 commit comments

Comments
 (0)