Skip to content

Commit

Permalink
Merge branch 'main' into sdk-automation/models
Browse files Browse the repository at this point in the history
  • Loading branch information
DjoykeAbyah authored Feb 22, 2024
2 parents 18386da + 0c3f013 commit 6cebe56
Show file tree
Hide file tree
Showing 196 changed files with 5,084 additions and 4,887 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"friendsofphp/php-cs-fixer": "*",
"phpunit/phpunit": "9.6.16",
"php-coveralls/php-coveralls": "2.7.0",
"squizlabs/php_codesniffer": "3.8.1"
"squizlabs/php_codesniffer": "3.9.0"
},
"autoload": {
"psr-4": {
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AccountInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -1205,6 +1205,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AcctInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -1136,6 +1136,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AchDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -756,6 +756,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AdditionalData3DSecure.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -582,6 +582,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AdditionalDataAirline.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -1290,6 +1290,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AdditionalDataCarRental.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -1117,6 +1117,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AdditionalDataCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -912,6 +912,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AdditionalDataLevel23.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -913,6 +913,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
28 changes: 27 additions & 1 deletion src/Adyen/Model/Checkout/AdditionalDataLodging.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The version of the OpenAPI document: 71
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.1
* OpenAPI Generator version: 6.4.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down Expand Up @@ -879,6 +879,32 @@ public function jsonSerialize()
return ObjectSerializer::sanitizeForSerialization($this);
}

public function toArray(): array
{
$array = [];
foreach (self::$openAPITypes as $propertyName => $propertyType) {
$propertyValue = $this[$propertyName];
if ($propertyValue !== null) {
// Check if the property value is an object and has a toArray() method
if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
$array[$propertyName] = $propertyValue->toArray();
// Check if it's type datetime
} elseif ($propertyValue instanceof \DateTime) {
$array[$propertyName] = $propertyValue->format(DATE_ATOM);
// If it's an array type we should check whether it contains objects and if so call toArray method
} elseif (is_array($propertyValue)) {
$array[$propertyName] = array_map(function ($item) {
return $item instanceof ModelInterface ? $item->toArray() : $item;
}, $propertyValue);
} else {
// Otherwise, directly assign the property value to the array
$array[$propertyName] = $propertyValue;
}
}
}
return $array;
}

/**
* Gets the string presentation of the object
*
Expand Down
Loading

0 comments on commit 6cebe56

Please sign in to comment.