diff --git a/src/Adyen/Model/AcsWebhooks/Amount.php b/src/Adyen/Model/AcsWebhooks/Amount.php index 13148c9d1..e12296bd7 100644 --- a/src/Adyen/Model/AcsWebhooks/Amount.php +++ b/src/Adyen/Model/AcsWebhooks/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php b/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php index 2a562352b..c5c68a38e 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php @@ -1207,6 +1207,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 * diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php index a34c384bc..969d296f6 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php @@ -589,6 +589,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 * diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php index 19ffa867f..a8debe217 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php index 994e3c61a..5b4fb6c78 100644 --- a/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php index e84909317..9d0bec437 100644 --- a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php +++ b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php @@ -617,6 +617,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 * diff --git a/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php b/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php index d88885c3a..529529cd1 100644 --- a/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php +++ b/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/AcsWebhooks/Resource.php b/src/Adyen/Model/AcsWebhooks/Resource.php index 50bdcc860..a8124707d 100644 --- a/src/Adyen/Model/AcsWebhooks/Resource.php +++ b/src/Adyen/Model/AcsWebhooks/Resource.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/BalanceControl/Amount.php b/src/Adyen/Model/BalanceControl/Amount.php index bf952009b..c2e1abec5 100644 --- a/src/Adyen/Model/BalanceControl/Amount.php +++ b/src/Adyen/Model/BalanceControl/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php index 2fdc68bf1..b6813a764 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php @@ -592,6 +592,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 * diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php index 724a47f8a..c4fee3b83 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php @@ -740,6 +740,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 * diff --git a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php index de254aeda..992549c45 100644 --- a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php @@ -46,6 +46,7 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'bsbCode' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'bsbCode' => null, + 'formFactor' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'bsbCode' => false, + 'formFactor' => true, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'bsbCode' => 'bsbCode', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'bsbCode' => 'setBsbCode', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'bsbCode' => 'getBsbCode', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -257,6 +263,7 @@ 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); } @@ -374,6 +381,40 @@ 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 bank account. + * + * @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 * @@ -477,6 +518,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 * diff --git a/src/Adyen/Model/BalancePlatform/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index b05a13e0c..0172fe516 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -820,6 +820,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 * diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php index a74bdfef9..92661ef46 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php @@ -786,6 +786,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 * diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php index 1de87bce6..26f75ae49 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php @@ -644,6 +644,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 * diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php index 4d34899bd..391f66711 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php @@ -746,6 +746,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 * diff --git a/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php b/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php index 6cc7abba0..a5d5a405e 100644 --- a/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php @@ -684,6 +684,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 * diff --git a/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php b/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php index 89eaa0eb9..600f95997 100644 --- a/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php +++ b/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php @@ -404,6 +404,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 * diff --git a/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php b/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php index 4bb4efaba..fd0fa490c 100644 --- a/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php @@ -436,6 +436,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 * diff --git a/src/Adyen/Model/BalancePlatform/Address.php b/src/Adyen/Model/BalancePlatform/Address.php index 19e9ed5f5..6311d2f53 100644 --- a/src/Adyen/Model/BalancePlatform/Address.php +++ b/src/Adyen/Model/BalancePlatform/Address.php @@ -554,6 +554,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 * diff --git a/src/Adyen/Model/BalancePlatform/AddressRequirement.php b/src/Adyen/Model/BalancePlatform/AddressRequirement.php index 511ad184a..979ea493f 100644 --- a/src/Adyen/Model/BalancePlatform/AddressRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AddressRequirement.php @@ -500,6 +500,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 * diff --git a/src/Adyen/Model/BalancePlatform/Amount.php b/src/Adyen/Model/BalancePlatform/Amount.php index 5f7633ddc..16d8934f7 100644 --- a/src/Adyen/Model/BalancePlatform/Amount.php +++ b/src/Adyen/Model/BalancePlatform/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php index ae3eb2dfe..87b4d61ce 100644 --- a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/BalancePlatform/Authentication.php b/src/Adyen/Model/BalancePlatform/Authentication.php index d3d4e7ac0..909a7fdb6 100644 --- a/src/Adyen/Model/BalancePlatform/Authentication.php +++ b/src/Adyen/Model/BalancePlatform/Authentication.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php index a6410cdef..98d42e266 100644 --- a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php @@ -47,6 +47,7 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json 'accountNumber' => 'string', 'bankCode' => 'string', 'branchNumber' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -61,6 +62,7 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json 'accountNumber' => null, 'bankCode' => null, 'branchNumber' => null, + 'formFactor' => null, 'type' => null ]; @@ -73,6 +75,7 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json 'accountNumber' => false, 'bankCode' => false, 'branchNumber' => false, + 'formFactor' => true, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'accountNumber', 'bankCode' => 'bankCode', 'branchNumber' => 'branchNumber', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'setAccountNumber', 'bankCode' => 'setBankCode', 'branchNumber' => 'setBranchNumber', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -189,6 +194,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'getAccountNumber', 'bankCode' => 'getBankCode', 'branchNumber' => 'getBranchNumber', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -264,6 +270,7 @@ 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); } @@ -411,6 +418,40 @@ 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 bank account. + * + * @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 * @@ -514,6 +555,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 * diff --git a/src/Adyen/Model/BalancePlatform/Balance.php b/src/Adyen/Model/BalancePlatform/Balance.php index 12233bea8..062479a5f 100644 --- a/src/Adyen/Model/BalancePlatform/Balance.php +++ b/src/Adyen/Model/BalancePlatform/Balance.php @@ -517,6 +517,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 * diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index 08f45254c..d8497394c 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -752,6 +752,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 * diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index 64ca3ea7b..01f937c81 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -718,6 +718,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 * diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index 4563f79e7..37d90c13c 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -610,6 +610,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 * diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index 707bd499d..b0665f09e 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -610,6 +610,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 * diff --git a/src/Adyen/Model/BalancePlatform/BalancePlatform.php b/src/Adyen/Model/BalancePlatform/BalancePlatform.php index f1d166683..4c7ba064c 100644 --- a/src/Adyen/Model/BalancePlatform/BalancePlatform.php +++ b/src/Adyen/Model/BalancePlatform/BalancePlatform.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php b/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php index 02d262af8..dbebbbd99 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php +++ b/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankAccount.php b/src/Adyen/Model/BalancePlatform/BankAccount.php index 5dd4ee3da..c7c28d1b7 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccount.php +++ b/src/Adyen/Model/BalancePlatform/BankAccount.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index f84236d92..69c04e751 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -47,6 +47,7 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ protected static $openAPITypes = [ 'accountNumber' => 'string', 'bsbCode' => 'string', + 'formFactor' => 'string', 'type' => 'string', 'bankCode' => 'string', 'branchNumber' => 'string', @@ -72,6 +73,7 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ protected static $openAPIFormats = [ 'accountNumber' => null, 'bsbCode' => null, + 'formFactor' => null, 'type' => null, 'bankCode' => null, 'branchNumber' => null, @@ -95,6 +97,7 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ protected static $openAPINullables = [ 'accountNumber' => false, 'bsbCode' => false, + 'formFactor' => true, 'type' => false, 'bankCode' => false, 'branchNumber' => false, @@ -198,6 +201,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'bsbCode' => 'bsbCode', + 'formFactor' => 'formFactor', 'type' => 'type', 'bankCode' => 'bankCode', 'branchNumber' => 'branchNumber', @@ -221,6 +225,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'bsbCode' => 'setBsbCode', + 'formFactor' => 'setFormFactor', 'type' => 'setType', 'bankCode' => 'setBankCode', 'branchNumber' => 'setBranchNumber', @@ -244,6 +249,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'bsbCode' => 'getBsbCode', + 'formFactor' => 'getFormFactor', 'type' => 'getType', 'bankCode' => 'getBankCode', 'branchNumber' => 'getBranchNumber', @@ -317,6 +323,7 @@ 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); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); @@ -469,6 +476,40 @@ 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 bank account. + * + * @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 * @@ -886,6 +927,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php index 0c35fdb15..5f8d8de3f 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php @@ -524,6 +524,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php index 721d3c5e0..8aa73d6cc 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index c8e33356a..0a5f64872 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -47,6 +47,7 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements protected static $openAPITypes = [ 'accountNumber' => 'string', 'bsbCode' => 'string', + 'formFactor' => 'string', 'type' => 'string', 'bankCode' => 'string', 'branchNumber' => 'string', @@ -72,6 +73,7 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements protected static $openAPIFormats = [ 'accountNumber' => null, 'bsbCode' => null, + 'formFactor' => null, 'type' => null, 'bankCode' => null, 'branchNumber' => null, @@ -95,6 +97,7 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements protected static $openAPINullables = [ 'accountNumber' => false, 'bsbCode' => false, + 'formFactor' => true, 'type' => false, 'bankCode' => false, 'branchNumber' => false, @@ -198,6 +201,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'bsbCode' => 'bsbCode', + 'formFactor' => 'formFactor', 'type' => 'type', 'bankCode' => 'bankCode', 'branchNumber' => 'branchNumber', @@ -221,6 +225,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'bsbCode' => 'setBsbCode', + 'formFactor' => 'setFormFactor', 'type' => 'setType', 'bankCode' => 'setBankCode', 'branchNumber' => 'setBranchNumber', @@ -244,6 +249,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'bsbCode' => 'getBsbCode', + 'formFactor' => 'getFormFactor', 'type' => 'getType', 'bankCode' => 'getBankCode', 'branchNumber' => 'getBranchNumber', @@ -317,6 +323,7 @@ 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); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); @@ -469,6 +476,40 @@ 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 bank account. + * + * @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 * @@ -886,6 +927,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountModel.php b/src/Adyen/Model/BalancePlatform/BankAccountModel.php index 28e0f4753..fc5a66781 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountModel.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountModel.php @@ -404,6 +404,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 * diff --git a/src/Adyen/Model/BalancePlatform/BankIdentification.php b/src/Adyen/Model/BalancePlatform/BankIdentification.php index 2386d7317..6b5724c11 100644 --- a/src/Adyen/Model/BalancePlatform/BankIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankIdentification.php @@ -326,7 +326,7 @@ public function getCountry() /** * Sets country * - * @param string|null $country country + * @param string|null $country Two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. * * @return self */ @@ -353,7 +353,7 @@ public function getIdentification() /** * Sets identification * - * @param string|null $identification identification + * @param string|null $identification The bank identification code. * * @return self */ @@ -380,7 +380,7 @@ public function getIdentificationType() /** * Sets identificationType * - * @param string|null $identificationType identificationType + * @param string|null $identificationType The type of the identification. Possible values: **iban**, **routingNumber**. * * @return self */ @@ -470,6 +470,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 * diff --git a/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php b/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php index f0c9eb28c..9d7faa690 100644 --- a/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/BulkAddress.php b/src/Adyen/Model/BalancePlatform/BulkAddress.php index cced8cd23..965a1cbab 100644 --- a/src/Adyen/Model/BalancePlatform/BulkAddress.php +++ b/src/Adyen/Model/BalancePlatform/BulkAddress.php @@ -644,6 +644,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 * diff --git a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php index 3d3d82bb2..616911c35 100644 --- a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php @@ -46,6 +46,7 @@ class CALocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'accountType' => 'string', + 'formFactor' => 'string', 'institutionNumber' => 'string', 'transitNumber' => 'string', 'type' => 'string' @@ -61,6 +62,7 @@ class CALocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'accountType' => null, + 'formFactor' => null, 'institutionNumber' => null, 'transitNumber' => null, 'type' => null @@ -74,6 +76,7 @@ class CALocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'accountType' => false, + 'formFactor' => true, 'institutionNumber' => false, 'transitNumber' => false, 'type' => false @@ -167,6 +170,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'accountType' => 'accountType', + 'formFactor' => 'formFactor', 'institutionNumber' => 'institutionNumber', 'transitNumber' => 'transitNumber', 'type' => 'type' @@ -180,6 +184,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'accountType' => 'setAccountType', + 'formFactor' => 'setFormFactor', 'institutionNumber' => 'setInstitutionNumber', 'transitNumber' => 'setTransitNumber', 'type' => 'setType' @@ -193,6 +198,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'accountType' => 'getAccountType', + 'formFactor' => 'getFormFactor', 'institutionNumber' => 'getInstitutionNumber', 'transitNumber' => 'getTransitNumber', 'type' => 'getType' @@ -283,6 +289,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -424,6 +431,40 @@ public function setAccountType($accountType) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 institutionNumber * @@ -581,6 +622,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 * diff --git a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php index 4d17aa6f3..e3afa2b2e 100644 --- a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php @@ -46,6 +46,7 @@ class CZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'bankCode' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class CZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'bankCode' => null, + 'formFactor' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class CZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'bankCode' => false, + 'formFactor' => true, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'bankCode' => 'bankCode', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'bankCode' => 'setBankCode', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'bankCode' => 'getBankCode', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -257,6 +263,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -374,6 +381,40 @@ public function setBankCode($bankCode) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -477,6 +518,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 * diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblem.php b/src/Adyen/Model/BalancePlatform/CapabilityProblem.php index c279fea76..1845ebf5e 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblem.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblem.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php index a20c971cf..304af3724 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php @@ -506,6 +506,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 * diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php index 7a69158e0..8575c4857 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php @@ -472,6 +472,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 * diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index fd3f781cc..95ce38222 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -565,6 +565,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 * diff --git a/src/Adyen/Model/BalancePlatform/CapitalBalance.php b/src/Adyen/Model/BalancePlatform/CapitalBalance.php index cbb79d994..eae456ceb 100644 --- a/src/Adyen/Model/BalancePlatform/CapitalBalance.php +++ b/src/Adyen/Model/BalancePlatform/CapitalBalance.php @@ -483,6 +483,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 * diff --git a/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php b/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php index b1ad10b00..6085bf81f 100644 --- a/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php +++ b/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/BalancePlatform/Card.php b/src/Adyen/Model/BalancePlatform/Card.php index e1b1a76c1..f88693092 100644 --- a/src/Adyen/Model/BalancePlatform/Card.php +++ b/src/Adyen/Model/BalancePlatform/Card.php @@ -827,6 +827,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 * diff --git a/src/Adyen/Model/BalancePlatform/CardConfiguration.php b/src/Adyen/Model/BalancePlatform/CardConfiguration.php index b9a71ab4d..5f42d660e 100644 --- a/src/Adyen/Model/BalancePlatform/CardConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/CardConfiguration.php @@ -814,6 +814,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 * diff --git a/src/Adyen/Model/BalancePlatform/CardInfo.php b/src/Adyen/Model/BalancePlatform/CardInfo.php index 6ba673ef9..44425df9b 100644 --- a/src/Adyen/Model/BalancePlatform/CardInfo.php +++ b/src/Adyen/Model/BalancePlatform/CardInfo.php @@ -654,6 +654,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 * diff --git a/src/Adyen/Model/BalancePlatform/CardOrder.php b/src/Adyen/Model/BalancePlatform/CardOrder.php index 0995090ec..65a64da8f 100644 --- a/src/Adyen/Model/BalancePlatform/CardOrder.php +++ b/src/Adyen/Model/BalancePlatform/CardOrder.php @@ -640,6 +640,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 * diff --git a/src/Adyen/Model/BalancePlatform/CardOrderItem.php b/src/Adyen/Model/BalancePlatform/CardOrderItem.php index a630eb599..aaecdd0ab 100644 --- a/src/Adyen/Model/BalancePlatform/CardOrderItem.php +++ b/src/Adyen/Model/BalancePlatform/CardOrderItem.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php index 3f122f551..f13e8dc27 100644 --- a/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php +++ b/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php @@ -482,6 +482,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 * diff --git a/src/Adyen/Model/BalancePlatform/ContactDetails.php b/src/Adyen/Model/BalancePlatform/ContactDetails.php index 7a18a18bb..26fd8e5e5 100644 --- a/src/Adyen/Model/BalancePlatform/ContactDetails.php +++ b/src/Adyen/Model/BalancePlatform/ContactDetails.php @@ -480,6 +480,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 * diff --git a/src/Adyen/Model/BalancePlatform/Counterparty.php b/src/Adyen/Model/BalancePlatform/Counterparty.php index e6d91b3c4..48bfe2c53 100644 --- a/src/Adyen/Model/BalancePlatform/Counterparty.php +++ b/src/Adyen/Model/BalancePlatform/Counterparty.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php index 2b605ad48..49c33966a 100644 --- a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/CountriesRestriction.php b/src/Adyen/Model/BalancePlatform/CountriesRestriction.php index fe2db616d..a2b177943 100644 --- a/src/Adyen/Model/BalancePlatform/CountriesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/CountriesRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index b61e85d80..a6591b224 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -945,6 +945,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 * diff --git a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php index 55740b489..7e50b2ceb 100644 --- a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php @@ -46,6 +46,7 @@ class DKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'bankCode' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class DKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'bankCode' => null, + 'formFactor' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class DKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'bankCode' => false, + 'formFactor' => true, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'bankCode' => 'bankCode', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'bankCode' => 'setBankCode', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'bankCode' => 'getBankCode', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -257,6 +263,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -374,6 +381,40 @@ public function setBankCode($bankCode) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -477,6 +518,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 * diff --git a/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php b/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php index 620221dd4..d28cc823e 100644 --- a/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php +++ b/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php @@ -439,6 +439,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 * diff --git a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php index c886b04d7..e3567ad90 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/BalancePlatform/DeliveryContact.php b/src/Adyen/Model/BalancePlatform/DeliveryContact.php index 367e10d80..984cc8d50 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryContact.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryContact.php @@ -545,6 +545,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 * diff --git a/src/Adyen/Model/BalancePlatform/DeviceInfo.php b/src/Adyen/Model/BalancePlatform/DeviceInfo.php index b465d7082..ea6368a4c 100644 --- a/src/Adyen/Model/BalancePlatform/DeviceInfo.php +++ b/src/Adyen/Model/BalancePlatform/DeviceInfo.php @@ -709,6 +709,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 * diff --git a/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php b/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php index 603ab8a6a..5e17ff237 100644 --- a/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/Duration.php b/src/Adyen/Model/BalancePlatform/Duration.php index 70713ea56..59d7e03ff 100644 --- a/src/Adyen/Model/BalancePlatform/Duration.php +++ b/src/Adyen/Model/BalancePlatform/Duration.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php b/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php index 5ecbe040b..a59c1b215 100644 --- a/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/BalancePlatform/Expiry.php b/src/Adyen/Model/BalancePlatform/Expiry.php index 61f2cca42..5de0f43ab 100644 --- a/src/Adyen/Model/BalancePlatform/Expiry.php +++ b/src/Adyen/Model/BalancePlatform/Expiry.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/Fee.php b/src/Adyen/Model/BalancePlatform/Fee.php index f803d247d..85f60ec38 100644 --- a/src/Adyen/Model/BalancePlatform/Fee.php +++ b/src/Adyen/Model/BalancePlatform/Fee.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php b/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php index 3cc08549b..8905d17cb 100644 --- a/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php index 9d5bce9ef..a6442a397 100644 --- a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/BalancePlatform/GrantLimit.php b/src/Adyen/Model/BalancePlatform/GrantLimit.php index 729175de4..08da0b479 100644 --- a/src/Adyen/Model/BalancePlatform/GrantLimit.php +++ b/src/Adyen/Model/BalancePlatform/GrantLimit.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/BalancePlatform/GrantOffer.php b/src/Adyen/Model/BalancePlatform/GrantOffer.php index 9f86a652a..deb388751 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffer.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffer.php @@ -643,6 +643,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 * diff --git a/src/Adyen/Model/BalancePlatform/GrantOffers.php b/src/Adyen/Model/BalancePlatform/GrantOffers.php index 20f4206c8..304874aa2 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffers.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffers.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 82413e8f6..cf50b247b 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -46,6 +46,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'clearingCode' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'clearingCode' => null, + 'formFactor' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'clearingCode' => false, + 'formFactor' => true, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'clearingCode' => 'clearingCode', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'clearingCode' => 'setClearingCode', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'clearingCode' => 'getClearingCode', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -257,6 +263,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -374,6 +381,40 @@ public function setClearingCode($clearingCode) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -477,6 +518,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 * diff --git a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php index ea6dc622b..8abd463f1 100644 --- a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php @@ -45,6 +45,7 @@ class HULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class HULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'formFactor' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class HULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, + 'formFactor' => true, 'type' => false ]; @@ -157,6 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -177,6 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -250,6 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -337,6 +344,40 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -440,6 +481,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 * diff --git a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php index 718844b18..3fcd79c74 100644 --- a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php @@ -44,6 +44,7 @@ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ + 'formFactor' => 'string', 'iban' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ + 'formFactor' => null, 'iban' => null, 'type' => null ]; @@ -66,6 +68,7 @@ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static $openAPINullables = [ + 'formFactor' => true, 'iban' => false, 'type' => false ]; @@ -156,6 +159,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'formFactor' => 'formFactor', 'iban' => 'iban', 'type' => 'type' ]; @@ -166,6 +170,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'formFactor' => 'setFormFactor', 'iban' => 'setIban', 'type' => 'setType' ]; @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'formFactor' => 'getFormFactor', 'iban' => 'getIban', 'type' => 'getType' ]; @@ -249,6 +255,7 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -310,6 +317,40 @@ public function valid() } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 iban * @@ -440,6 +481,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 * diff --git a/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php b/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php index 59a49830f..ca1250f56 100644 --- a/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php +++ b/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/InvalidField.php b/src/Adyen/Model/BalancePlatform/InvalidField.php index 9591293bf..e0d0fd0eb 100644 --- a/src/Adyen/Model/BalancePlatform/InvalidField.php +++ b/src/Adyen/Model/BalancePlatform/InvalidField.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php b/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php index 48fa0ef44..7cb3d9161 100644 --- a/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php +++ b/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php b/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php index c70186e0d..60a2d69b7 100644 --- a/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php @@ -404,6 +404,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 * diff --git a/src/Adyen/Model/BalancePlatform/MccsRestriction.php b/src/Adyen/Model/BalancePlatform/MccsRestriction.php index 0bc961eff..aff461ad1 100644 --- a/src/Adyen/Model/BalancePlatform/MccsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MccsRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php b/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php index d3bddac72..f4aadc71a 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php +++ b/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php b/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php index a88c301b0..3a9499ed0 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php b/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php index 6dcebd8d3..de4e505d4 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php index a09a59f74..448dfea2c 100644 --- a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php @@ -45,6 +45,7 @@ class NOLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class NOLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'formFactor' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class NOLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, + 'formFactor' => true, 'type' => false ]; @@ -157,6 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -177,6 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -250,6 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -337,6 +344,40 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -440,6 +481,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 * diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index c6257e670..f86ca295a 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -45,6 +45,7 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'formFactor' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, + 'formFactor' => true, 'type' => false ]; @@ -157,6 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -177,6 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -250,6 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -337,6 +344,40 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -440,6 +481,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 * diff --git a/src/Adyen/Model/BalancePlatform/Name.php b/src/Adyen/Model/BalancePlatform/Name.php index 54884fe91..83ea2671f 100644 --- a/src/Adyen/Model/BalancePlatform/Name.php +++ b/src/Adyen/Model/BalancePlatform/Name.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BalancePlatform/NetworkToken.php b/src/Adyen/Model/BalancePlatform/NetworkToken.php index 704865beb..dbb57552b 100644 --- a/src/Adyen/Model/BalancePlatform/NetworkToken.php +++ b/src/Adyen/Model/BalancePlatform/NetworkToken.php @@ -644,6 +644,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 * diff --git a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php index 676fbc851..7b131d278 100644 --- a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php @@ -47,6 +47,7 @@ class NumberAndBicAccountIdentification implements ModelInterface, ArrayAccess, 'accountNumber' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -61,6 +62,7 @@ class NumberAndBicAccountIdentification implements ModelInterface, ArrayAccess, 'accountNumber' => null, 'additionalBankIdentification' => null, 'bic' => null, + 'formFactor' => null, 'type' => null ]; @@ -73,6 +75,7 @@ class NumberAndBicAccountIdentification implements ModelInterface, ArrayAccess, 'accountNumber' => false, 'additionalBankIdentification' => false, 'bic' => false, + 'formFactor' => true, 'type' => false ]; @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'accountNumber', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'setAccountNumber', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -189,6 +194,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'getAccountNumber', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -264,6 +270,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -408,6 +415,40 @@ public function setBic($bic) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -511,6 +552,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 * diff --git a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php index c5525acb2..da56d4a2a 100644 --- a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php @@ -45,6 +45,7 @@ class PLLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class PLLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'formFactor' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class PLLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, + 'formFactor' => true, 'type' => false ]; @@ -157,6 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -177,6 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -250,6 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -337,6 +344,40 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -440,6 +481,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php index 1bfccd6a3..74fe6bde9 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php index a19d50bb3..b8ad482c3 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php index 7d5e9a1e3..8aa08c59c 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php index a5c9b19e9..8063c9733 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php index 746ed65fe..572f43483 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php index 303bd04e1..aa5c09b1b 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php @@ -838,6 +838,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php index c5c27128a..c23d8478d 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php @@ -45,6 +45,7 @@ class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ + 'formFactor' => 'string', 'iban' => 'string', 'type' => 'string', 'accountNumber' => 'string', @@ -60,6 +61,7 @@ class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'formFactor' => null, 'iban' => null, 'type' => null, 'accountNumber' => null, @@ -73,6 +75,7 @@ class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \Json * @var boolean[] */ protected static $openAPINullables = [ + 'formFactor' => true, 'iban' => false, 'type' => false, 'accountNumber' => false, @@ -166,6 +169,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'formFactor' => 'formFactor', 'iban' => 'iban', 'type' => 'type', 'accountNumber' => 'accountNumber', @@ -179,6 +183,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'formFactor' => 'setFormFactor', 'iban' => 'setIban', 'type' => 'setType', 'accountNumber' => 'setAccountNumber', @@ -192,6 +197,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'formFactor' => 'getFormFactor', 'iban' => 'getIban', 'type' => 'getType', 'accountNumber' => 'getAccountNumber', @@ -255,6 +261,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); @@ -318,6 +325,40 @@ public function valid() } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 iban * @@ -519,6 +560,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php index 0ac7d75fe..bcb03905a 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php @@ -545,6 +545,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php index 7c188e6de..c971f3a29 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php @@ -511,6 +511,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php index 351b117be..b5639ad03 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php @@ -801,6 +801,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index 8680714a7..98152499d 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -46,6 +46,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'description' => 'string', 'issuingCountryCode' => 'string', + 'issuingCountryCodes' => 'string[]', 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string', 'type' => 'string' @@ -61,6 +62,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'description' => null, 'issuingCountryCode' => null, + 'issuingCountryCodes' => null, 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null, 'type' => null @@ -74,6 +76,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'description' => false, 'issuingCountryCode' => false, + 'issuingCountryCodes' => false, 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false, 'type' => false @@ -167,6 +170,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'description' => 'description', 'issuingCountryCode' => 'issuingCountryCode', + 'issuingCountryCodes' => 'issuingCountryCodes', 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType', 'type' => 'type' @@ -180,6 +184,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'description' => 'setDescription', 'issuingCountryCode' => 'setIssuingCountryCode', + 'issuingCountryCodes' => 'setIssuingCountryCodes', 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType', 'type' => 'setType' @@ -193,6 +198,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'description' => 'getDescription', 'issuingCountryCode' => 'getIssuingCountryCode', + 'issuingCountryCodes' => 'getIssuingCountryCodes', 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType', 'type' => 'getType' @@ -283,6 +289,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('issuingCountryCodes', $data ?? [], null); $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -405,6 +412,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets issuingCountryCodes + * + * @return string[]|null + */ + public function getIssuingCountryCodes() + { + return $this->container['issuingCountryCodes']; + } + + /** + * Sets issuingCountryCodes + * + * @param string[]|null $issuingCountryCodes The two-character ISO-3166-1 alpha-2 country code list for payment instruments. + * + * @return self + */ + public function setIssuingCountryCodes($issuingCountryCodes) + { + if (is_null($issuingCountryCodes)) { + throw new \InvalidArgumentException('non-nullable issuingCountryCodes cannot be null'); + } + $this->container['issuingCountryCodes'] = $issuingCountryCodes; + + return $this; + } + /** * Gets onlyForCrossBalancePlatform * @@ -572,6 +606,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php index 94d036680..434f67078 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php new file mode 100644 index 000000000..5c4b56e7c --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php @@ -0,0 +1,450 @@ + + */ +class PaymentInstrumentRevealRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrumentRevealRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'encryptedKey' => 'string', + 'paymentInstrumentId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'encryptedKey' => null, + 'paymentInstrumentId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'encryptedKey' => false, + 'paymentInstrumentId' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'encryptedKey' => 'encryptedKey', + 'paymentInstrumentId' => 'paymentInstrumentId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'encryptedKey' => 'setEncryptedKey', + 'paymentInstrumentId' => 'setPaymentInstrumentId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'encryptedKey' => 'getEncryptedKey', + 'paymentInstrumentId' => 'getPaymentInstrumentId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('encryptedKey', $data ?? [], null); + $this->setIfExists('paymentInstrumentId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['encryptedKey'] === null) { + $invalidProperties[] = "'encryptedKey' can't be null"; + } + if ($this->container['paymentInstrumentId'] === null) { + $invalidProperties[] = "'paymentInstrumentId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets encryptedKey + * + * @return string + */ + public function getEncryptedKey() + { + return $this->container['encryptedKey']; + } + + /** + * Sets encryptedKey + * + * @param string $encryptedKey The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. + * + * @return self + */ + public function setEncryptedKey($encryptedKey) + { + if (is_null($encryptedKey)) { + throw new \InvalidArgumentException('non-nullable encryptedKey cannot be null'); + } + $this->container['encryptedKey'] = $encryptedKey; + + return $this; + } + + /** + * Gets paymentInstrumentId + * + * @return string + */ + public function getPaymentInstrumentId() + { + return $this->container['paymentInstrumentId']; + } + + /** + * Sets paymentInstrumentId + * + * @param string $paymentInstrumentId The unique identifier of the payment instrument, which is the card for which you are managing the PIN. + * + * @return self + */ + public function setPaymentInstrumentId($paymentInstrumentId) + { + if (is_null($paymentInstrumentId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); + } + $this->container['paymentInstrumentId'] = $paymentInstrumentId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php new file mode 100644 index 000000000..4d09d52af --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php @@ -0,0 +1,413 @@ + + */ +class PaymentInstrumentRevealResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrumentRevealResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'encryptedData' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'encryptedData' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'encryptedData' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'encryptedData' => 'encryptedData' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'encryptedData' => 'setEncryptedData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'encryptedData' => 'getEncryptedData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('encryptedData', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['encryptedData'] === null) { + $invalidProperties[] = "'encryptedData' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets encryptedData + * + * @return string + */ + public function getEncryptedData() + { + return $this->container['encryptedData']; + } + + /** + * Sets encryptedData + * + * @param string $encryptedData The data encrypted using the `encryptedKey`. + * + * @return self + */ + public function setEncryptedData($encryptedData) + { + if (is_null($encryptedData)) { + throw new \InvalidArgumentException('non-nullable encryptedData cannot be null'); + } + $this->container['encryptedData'] = $encryptedData; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php index 69fe1520c..ddff64a4b 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php @@ -589,6 +589,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 * diff --git a/src/Adyen/Model/BalancePlatform/Phone.php b/src/Adyen/Model/BalancePlatform/Phone.php index 39e9d2736..80b29281c 100644 --- a/src/Adyen/Model/BalancePlatform/Phone.php +++ b/src/Adyen/Model/BalancePlatform/Phone.php @@ -442,6 +442,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 * diff --git a/src/Adyen/Model/BalancePlatform/PhoneNumber.php b/src/Adyen/Model/BalancePlatform/PhoneNumber.php index 45ac74747..298cefdb5 100644 --- a/src/Adyen/Model/BalancePlatform/PhoneNumber.php +++ b/src/Adyen/Model/BalancePlatform/PhoneNumber.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/BalancePlatform/PinChangeRequest.php b/src/Adyen/Model/BalancePlatform/PinChangeRequest.php index 2608e22e0..25f8bb148 100644 --- a/src/Adyen/Model/BalancePlatform/PinChangeRequest.php +++ b/src/Adyen/Model/BalancePlatform/PinChangeRequest.php @@ -322,7 +322,7 @@ public function getEncryptedKey() /** * Sets encryptedKey * - * @param string $encryptedKey Symmetric session key encrypted under the public key. + * @param string $encryptedKey The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. * * @return self */ @@ -349,7 +349,7 @@ public function getEncryptedPinBlock() /** * Sets encryptedPinBlock * - * @param string $encryptedPinBlock The encrypted PIN block + * @param string $encryptedPinBlock The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). * * @return self */ @@ -376,7 +376,7 @@ public function getPaymentInstrumentId() /** * Sets paymentInstrumentId * - * @param string $paymentInstrumentId The unique identifier of the payment instrument. + * @param string $paymentInstrumentId The unique identifier of the payment instrument, which is the card for which you are managing the PIN. * * @return self */ @@ -403,7 +403,7 @@ public function getToken() /** * Sets token * - * @param string $token The token which is used to construct the pinblock. + * @param string $token The 16-digit token that you used to generate the `encryptedPinBlock`. * * @return self */ @@ -483,6 +483,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 * diff --git a/src/Adyen/Model/BalancePlatform/PinChangeResponse.php b/src/Adyen/Model/BalancePlatform/PinChangeResponse.php index ac000d45d..f90a17f62 100644 --- a/src/Adyen/Model/BalancePlatform/PinChangeResponse.php +++ b/src/Adyen/Model/BalancePlatform/PinChangeResponse.php @@ -317,7 +317,7 @@ public function getStatus() /** * Sets status * - * @param string $status The pin change status. + * @param string $status The status of the request for PIN change. Possible values: **completed**, **pending**, **unavailable**. * * @return self */ @@ -407,6 +407,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 * diff --git a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php index f13605674..12eb1e1c9 100644 --- a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php @@ -401,6 +401,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 * diff --git a/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php b/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php index c17193564..908371bdb 100644 --- a/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php @@ -441,6 +441,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 * diff --git a/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php b/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php index d6e0646b7..6dfb370ef 100644 --- a/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php +++ b/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php @@ -302,7 +302,7 @@ public function getPublicKey() /** * Sets publicKey * - * @param string $publicKey The public key to be used for encrypting the symmetric session key. + * @param string $publicKey The public key you need for encrypting a symmetric session key. * * @return self */ @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BalancePlatform/RemediatingAction.php b/src/Adyen/Model/BalancePlatform/RemediatingAction.php index 4f98cf59f..49989d445 100644 --- a/src/Adyen/Model/BalancePlatform/RemediatingAction.php +++ b/src/Adyen/Model/BalancePlatform/RemediatingAction.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/Repayment.php b/src/Adyen/Model/BalancePlatform/Repayment.php index 659568478..ac30d9fba 100644 --- a/src/Adyen/Model/BalancePlatform/Repayment.php +++ b/src/Adyen/Model/BalancePlatform/Repayment.php @@ -438,6 +438,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 * diff --git a/src/Adyen/Model/BalancePlatform/RepaymentTerm.php b/src/Adyen/Model/BalancePlatform/RepaymentTerm.php index 60fa8a8c2..c48559573 100644 --- a/src/Adyen/Model/BalancePlatform/RepaymentTerm.php +++ b/src/Adyen/Model/BalancePlatform/RepaymentTerm.php @@ -402,6 +402,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 * diff --git a/src/Adyen/Model/BalancePlatform/RestServiceError.php b/src/Adyen/Model/BalancePlatform/RestServiceError.php index 45c5f9c34..cd7ff34b3 100644 --- a/src/Adyen/Model/BalancePlatform/RestServiceError.php +++ b/src/Adyen/Model/BalancePlatform/RestServiceError.php @@ -654,6 +654,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 * diff --git a/src/Adyen/Model/BalancePlatform/RevealPinRequest.php b/src/Adyen/Model/BalancePlatform/RevealPinRequest.php index 6b109e68f..d38bb10e1 100644 --- a/src/Adyen/Model/BalancePlatform/RevealPinRequest.php +++ b/src/Adyen/Model/BalancePlatform/RevealPinRequest.php @@ -302,7 +302,7 @@ public function getEncryptedKey() /** * Sets encryptedKey * - * @param string $encryptedKey Symmetric session key encrypted under the public key. + * @param string $encryptedKey The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. * * @return self */ @@ -329,7 +329,7 @@ public function getPaymentInstrumentId() /** * Sets paymentInstrumentId * - * @param string $paymentInstrumentId The unique identifier of the payment instrument. + * @param string $paymentInstrumentId The unique identifier of the payment instrument, which is the card for which you are managing the PIN. * * @return self */ @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BalancePlatform/RevealPinResponse.php b/src/Adyen/Model/BalancePlatform/RevealPinResponse.php index 2f2f149c5..317224e91 100644 --- a/src/Adyen/Model/BalancePlatform/RevealPinResponse.php +++ b/src/Adyen/Model/BalancePlatform/RevealPinResponse.php @@ -302,7 +302,7 @@ public function getEncryptedPinBlock() /** * Sets encryptedPinBlock * - * @param string $encryptedPinBlock The encrypted PIN block. + * @param string $encryptedPinBlock The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). * * @return self */ @@ -329,7 +329,7 @@ public function getToken() /** * Sets token * - * @param string $token The encrypted PIN block extraction token. + * @param string $token The 16-digit token that you need to extract the `encryptedPinBlock`. * * @return self */ @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php index 136e9226b..af9f1f30a 100644 --- a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php @@ -46,6 +46,7 @@ class SELocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'clearingNumber' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class SELocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'clearingNumber' => null, + 'formFactor' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class SELocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'clearingNumber' => false, + 'formFactor' => true, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'clearingNumber' => 'clearingNumber', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'clearingNumber' => 'setClearingNumber', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'clearingNumber' => 'getClearingNumber', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -257,6 +263,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -374,6 +381,40 @@ public function setClearingNumber($clearingNumber) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -477,6 +518,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 * diff --git a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php index e17a9a792..5a6cac239 100644 --- a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php @@ -46,6 +46,7 @@ class SGLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'bic' => 'string', + 'formFactor' => 'string', 'type' => 'string' ]; @@ -59,6 +60,7 @@ class SGLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'bic' => null, + 'formFactor' => null, 'type' => null ]; @@ -70,6 +72,7 @@ class SGLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'bic' => false, + 'formFactor' => true, 'type' => false ]; @@ -161,6 +164,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'bic' => 'bic', + 'formFactor' => 'formFactor', 'type' => 'type' ]; @@ -172,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'bic' => 'setBic', + 'formFactor' => 'setFormFactor', 'type' => 'setType' ]; @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'bic' => 'getBic', + 'formFactor' => 'getFormFactor', 'type' => 'getType' ]; @@ -257,6 +263,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -371,6 +378,40 @@ public function setBic($bic) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 * @@ -474,6 +515,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 * diff --git a/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php index 58ff0bfe5..31e9267f9 100644 --- a/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php +++ b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php index 991f179b9..256d98acc 100644 --- a/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php +++ b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/StringMatch.php b/src/Adyen/Model/BalancePlatform/StringMatch.php index 2ac87c457..215a9c6a3 100644 --- a/src/Adyen/Model/BalancePlatform/StringMatch.php +++ b/src/Adyen/Model/BalancePlatform/StringMatch.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index b0f0ddc18..a1e253dff 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -982,6 +982,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 * diff --git a/src/Adyen/Model/BalancePlatform/SweepCounterparty.php b/src/Adyen/Model/BalancePlatform/SweepCounterparty.php index fe1e9cbf6..aaf4e58c5 100644 --- a/src/Adyen/Model/BalancePlatform/SweepCounterparty.php +++ b/src/Adyen/Model/BalancePlatform/SweepCounterparty.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/BalancePlatform/SweepSchedule.php b/src/Adyen/Model/BalancePlatform/SweepSchedule.php index ffbea35d4..6189c4318 100644 --- a/src/Adyen/Model/BalancePlatform/SweepSchedule.php +++ b/src/Adyen/Model/BalancePlatform/SweepSchedule.php @@ -445,6 +445,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 * diff --git a/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php b/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php index f8be61e14..2f0daedc0 100644 --- a/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php +++ b/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/BalancePlatform/TimeOfDay.php b/src/Adyen/Model/BalancePlatform/TimeOfDay.php index d4a6e566f..0b75bb181 100644 --- a/src/Adyen/Model/BalancePlatform/TimeOfDay.php +++ b/src/Adyen/Model/BalancePlatform/TimeOfDay.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php b/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php index 2237f5317..78efb34b5 100644 --- a/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php b/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php index 7fa1a6713..5e216281d 100644 --- a/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRule.php b/src/Adyen/Model/BalancePlatform/TransactionRule.php index 0e8b9f95e..7ce540e7d 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRule.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRule.php @@ -969,6 +969,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php b/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php index 9252d99cb..7db4dd966 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php b/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php index 7ab59cf4f..7163b92fe 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php @@ -935,6 +935,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php b/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php index 3f832d0eb..243e16d77 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php @@ -626,6 +626,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php b/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php index 39056765d..3f1cfaa55 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 13f02509a..7104d2fad 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -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 * diff --git a/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php b/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php index 8af9753a7..b79d68f9a 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index 45d43dbb7..abbd5dce3 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -48,7 +48,7 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable 'country' => 'string', 'currency' => 'string', 'priority' => 'string', - 'requirements' => '\Adyen\Model\BalancePlatform\TransferRouteRequirements' + 'requirements' => '\Adyen\Model\BalancePlatform\TransferRouteRequirementsInner[]' ]; /** @@ -503,7 +503,7 @@ public function setPriority($priority) /** * Gets requirements * - * @return \Adyen\Model\BalancePlatform\TransferRouteRequirements|null + * @return \Adyen\Model\BalancePlatform\TransferRouteRequirementsInner[]|null */ public function getRequirements() { @@ -513,7 +513,7 @@ public function getRequirements() /** * Sets requirements * - * @param \Adyen\Model\BalancePlatform\TransferRouteRequirements|null $requirements requirements + * @param \Adyen\Model\BalancePlatform\TransferRouteRequirementsInner[]|null $requirements A set of rules defined by clearing houses and banking partners. Your transfer request must adhere to these rules to ensure successful initiation of transfer. Based on the priority, one or more requirements may be returned. Each requirement is defined with a `type` and `description`. * * @return self */ @@ -593,6 +593,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php index 755f3109a..2377fccc7 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php @@ -644,6 +644,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 * diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php new file mode 100644 index 000000000..f947d28c7 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php @@ -0,0 +1,720 @@ + + */ +class TransferRouteRequirementsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferRoute_requirements_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'requiredAddressFields' => 'string[]', + 'type' => 'string', + 'max' => 'int', + 'min' => 'int', + 'bankAccountIdentificationTypes' => 'string[]', + 'issuingCountryCode' => 'string', + 'issuingCountryCodes' => 'string[]', + 'onlyForCrossBalancePlatform' => 'bool', + 'paymentInstrumentType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'requiredAddressFields' => null, + 'type' => null, + 'max' => 'int64', + 'min' => 'int64', + 'bankAccountIdentificationTypes' => null, + 'issuingCountryCode' => null, + 'issuingCountryCodes' => null, + 'onlyForCrossBalancePlatform' => null, + 'paymentInstrumentType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'requiredAddressFields' => false, + 'type' => false, + 'max' => false, + 'min' => false, + 'bankAccountIdentificationTypes' => false, + 'issuingCountryCode' => false, + 'issuingCountryCodes' => false, + 'onlyForCrossBalancePlatform' => false, + 'paymentInstrumentType' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', + 'requiredAddressFields' => 'requiredAddressFields', + 'type' => 'type', + 'max' => 'max', + 'min' => 'min', + 'bankAccountIdentificationTypes' => 'bankAccountIdentificationTypes', + 'issuingCountryCode' => 'issuingCountryCode', + 'issuingCountryCodes' => 'issuingCountryCodes', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', + 'paymentInstrumentType' => 'paymentInstrumentType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'requiredAddressFields' => 'setRequiredAddressFields', + 'type' => 'setType', + 'max' => 'setMax', + 'min' => 'setMin', + 'bankAccountIdentificationTypes' => 'setBankAccountIdentificationTypes', + 'issuingCountryCode' => 'setIssuingCountryCode', + 'issuingCountryCodes' => 'setIssuingCountryCodes', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', + 'paymentInstrumentType' => 'setPaymentInstrumentType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'requiredAddressFields' => 'getRequiredAddressFields', + 'type' => 'getType', + 'max' => 'getMax', + 'min' => 'getMin', + 'bankAccountIdentificationTypes' => 'getBankAccountIdentificationTypes', + 'issuingCountryCode' => 'getIssuingCountryCode', + 'issuingCountryCodes' => 'getIssuingCountryCodes', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', + 'paymentInstrumentType' => 'getPaymentInstrumentType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('requiredAddressFields', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('max', $data ?? [], null); + $this->setIfExists('min', $data ?? [], null); + $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); + $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('issuingCountryCodes', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); + $this->setIfExists('paymentInstrumentType', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Specifies the requirements for the payment instrument that need to be included in the request for a particular route. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets requiredAddressFields + * + * @return string[]|null + */ + public function getRequiredAddressFields() + { + return $this->container['requiredAddressFields']; + } + + /** + * Sets requiredAddressFields + * + * @param string[]|null $requiredAddressFields List of address fields. + * + * @return self + */ + public function setRequiredAddressFields($requiredAddressFields) + { + if (is_null($requiredAddressFields)) { + throw new \InvalidArgumentException('non-nullable requiredAddressFields cannot be null'); + } + $this->container['requiredAddressFields'] = $requiredAddressFields; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **paymentInstrumentRequirement** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets max + * + * @return int|null + */ + public function getMax() + { + return $this->container['max']; + } + + /** + * Sets max + * + * @param int|null $max Maximum amount. + * + * @return self + */ + public function setMax($max) + { + if (is_null($max)) { + throw new \InvalidArgumentException('non-nullable max cannot be null'); + } + $this->container['max'] = $max; + + return $this; + } + + /** + * Gets min + * + * @return int|null + */ + public function getMin() + { + return $this->container['min']; + } + + /** + * Sets min + * + * @param int|null $min Minimum amount. + * + * @return self + */ + public function setMin($min) + { + if (is_null($min)) { + throw new \InvalidArgumentException('non-nullable min cannot be null'); + } + $this->container['min'] = $min; + + return $this; + } + + /** + * Gets bankAccountIdentificationTypes + * + * @return string[]|null + */ + public function getBankAccountIdentificationTypes() + { + return $this->container['bankAccountIdentificationTypes']; + } + + /** + * Sets bankAccountIdentificationTypes + * + * @param string[]|null $bankAccountIdentificationTypes List of bank account identification types: eg.; [iban , numberAndBic] + * + * @return self + */ + public function setBankAccountIdentificationTypes($bankAccountIdentificationTypes) + { + if (is_null($bankAccountIdentificationTypes)) { + throw new \InvalidArgumentException('non-nullable bankAccountIdentificationTypes cannot be null'); + } + $this->container['bankAccountIdentificationTypes'] = $bankAccountIdentificationTypes; + + return $this; + } + + /** + * Gets issuingCountryCode + * + * @return string|null + */ + public function getIssuingCountryCode() + { + return $this->container['issuingCountryCode']; + } + + /** + * Sets issuingCountryCode + * + * @param string|null $issuingCountryCode The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. + * + * @return self + */ + public function setIssuingCountryCode($issuingCountryCode) + { + if (is_null($issuingCountryCode)) { + throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); + } + $this->container['issuingCountryCode'] = $issuingCountryCode; + + return $this; + } + + /** + * Gets issuingCountryCodes + * + * @return string[]|null + */ + public function getIssuingCountryCodes() + { + return $this->container['issuingCountryCodes']; + } + + /** + * Sets issuingCountryCodes + * + * @param string[]|null $issuingCountryCodes The two-character ISO-3166-1 alpha-2 country code list for payment instruments. + * + * @return self + */ + public function setIssuingCountryCodes($issuingCountryCodes) + { + if (is_null($issuingCountryCodes)) { + throw new \InvalidArgumentException('non-nullable issuingCountryCodes cannot be null'); + } + $this->container['issuingCountryCodes'] = $issuingCountryCodes; + + return $this; + } + + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + + /** + * Gets paymentInstrumentType + * + * @return string|null + */ + public function getPaymentInstrumentType() + { + return $this->container['paymentInstrumentType']; + } + + /** + * Sets paymentInstrumentType + * + * @param string|null $paymentInstrumentType The type of the payment instrument. For example, \"BankAccount\" or \"Card\". + * + * @return self + */ + public function setPaymentInstrumentType($paymentInstrumentType) + { + if (is_null($paymentInstrumentType)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentType cannot be null'); + } + $this->container['paymentInstrumentType'] = $paymentInstrumentType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php b/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php index 83c1460b4..0932d90d9 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php index 744972ae8..d51b9eaac 100644 --- a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php @@ -45,6 +45,7 @@ class UKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'formFactor' => 'string', 'sortCode' => 'string', 'type' => 'string' ]; @@ -58,6 +59,7 @@ class UKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'formFactor' => null, 'sortCode' => null, 'type' => null ]; @@ -69,6 +71,7 @@ class UKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, + 'formFactor' => true, 'sortCode' => false, 'type' => false ]; @@ -160,6 +163,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'formFactor' => 'formFactor', 'sortCode' => 'sortCode', 'type' => 'type' ]; @@ -171,6 +175,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'formFactor' => 'setFormFactor', 'sortCode' => 'setSortCode', 'type' => 'setType' ]; @@ -182,6 +187,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'formFactor' => 'getFormFactor', 'sortCode' => 'getSortCode', 'type' => 'getType' ]; @@ -256,6 +262,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -347,6 +354,40 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 sortCode * @@ -477,6 +518,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 * diff --git a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php index 2dd1c304e..2cecc374c 100644 --- a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php @@ -46,6 +46,7 @@ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'accountType' => 'string', + 'formFactor' => 'string', 'routingNumber' => 'string', 'type' => 'string' ]; @@ -60,6 +61,7 @@ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'accountType' => null, + 'formFactor' => null, 'routingNumber' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'accountType' => false, + 'formFactor' => true, 'routingNumber' => false, 'type' => false ]; @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'accountType' => 'accountType', + 'formFactor' => 'formFactor', 'routingNumber' => 'routingNumber', 'type' => 'type' ]; @@ -176,6 +180,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'accountType' => 'setAccountType', + 'formFactor' => 'setFormFactor', 'routingNumber' => 'setRoutingNumber', 'type' => 'setType' ]; @@ -188,6 +193,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'accountType' => 'getAccountType', + 'formFactor' => 'getFormFactor', 'routingNumber' => 'getRoutingNumber', 'type' => 'getType' ]; @@ -277,6 +283,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -414,6 +421,40 @@ public function setAccountType($accountType) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 routingNumber * @@ -544,6 +585,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 * diff --git a/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php b/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php index 5a5689e2a..88ac7d00e 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php +++ b/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php @@ -404,6 +404,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 * diff --git a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php index 93dbae0ab..b8560f3fd 100644 --- a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php @@ -872,6 +872,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 * diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index be12417ce..b064e5f77 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -970,6 +970,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 * diff --git a/src/Adyen/Model/BalancePlatform/VerificationDeadline.php b/src/Adyen/Model/BalancePlatform/VerificationDeadline.php index 0c1152dee..ed619605a 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationDeadline.php +++ b/src/Adyen/Model/BalancePlatform/VerificationDeadline.php @@ -562,6 +562,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 * diff --git a/src/Adyen/Model/BalancePlatform/VerificationError.php b/src/Adyen/Model/BalancePlatform/VerificationError.php index 5bf4ae7b7..7bec25145 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationError.php +++ b/src/Adyen/Model/BalancePlatform/VerificationError.php @@ -693,6 +693,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 * diff --git a/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php b/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php index 022023081..5b9218ba6 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php +++ b/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php @@ -659,6 +659,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 * diff --git a/src/Adyen/Model/BinLookup/Amount.php b/src/Adyen/Model/BinLookup/Amount.php index eca0e656d..4acfe6943 100644 --- a/src/Adyen/Model/BinLookup/Amount.php +++ b/src/Adyen/Model/BinLookup/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/BinLookup/BinDetail.php b/src/Adyen/Model/BinLookup/BinDetail.php index 3b463c2bc..3abec2024 100644 --- a/src/Adyen/Model/BinLookup/BinDetail.php +++ b/src/Adyen/Model/BinLookup/BinDetail.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/BinLookup/CardBin.php b/src/Adyen/Model/BinLookup/CardBin.php index 938310f90..f0f616e5e 100644 --- a/src/Adyen/Model/BinLookup/CardBin.php +++ b/src/Adyen/Model/BinLookup/CardBin.php @@ -709,6 +709,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 * diff --git a/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php b/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php index 609dbb314..8023cc7e7 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php +++ b/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php @@ -435,6 +435,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 * diff --git a/src/Adyen/Model/BinLookup/CostEstimateRequest.php b/src/Adyen/Model/BinLookup/CostEstimateRequest.php index d29b4373b..2296e5334 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateRequest.php +++ b/src/Adyen/Model/BinLookup/CostEstimateRequest.php @@ -718,6 +718,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 * diff --git a/src/Adyen/Model/BinLookup/CostEstimateResponse.php b/src/Adyen/Model/BinLookup/CostEstimateResponse.php index 3b2e18fdd..9ab90fb9d 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateResponse.php +++ b/src/Adyen/Model/BinLookup/CostEstimateResponse.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 2499a4783..277d4ede4 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/BinLookup/MerchantDetails.php b/src/Adyen/Model/BinLookup/MerchantDetails.php index ebcc5dd96..2c5fed256 100644 --- a/src/Adyen/Model/BinLookup/MerchantDetails.php +++ b/src/Adyen/Model/BinLookup/MerchantDetails.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index b480f9c44..af968f01a 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -577,6 +577,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 * diff --git a/src/Adyen/Model/BinLookup/ServiceError.php b/src/Adyen/Model/BinLookup/ServiceError.php index 36af9c8ba..f3289e1af 100644 --- a/src/Adyen/Model/BinLookup/ServiceError.php +++ b/src/Adyen/Model/BinLookup/ServiceError.php @@ -537,6 +537,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 * diff --git a/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php b/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php index 3f1999520..96ba2bf13 100644 --- a/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php +++ b/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php index 733c83bff..b59cd6aa0 100644 --- a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php +++ b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php index c9d363cfb..2376fe6dc 100644 --- a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php +++ b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Checkout/AccountInfo.php b/src/Adyen/Model/Checkout/AccountInfo.php index f61373f81..64d8fed01 100644 --- a/src/Adyen/Model/Checkout/AccountInfo.php +++ b/src/Adyen/Model/Checkout/AccountInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AcctInfo.php b/src/Adyen/Model/Checkout/AcctInfo.php index bd5c4a3c4..acff6e60d 100644 --- a/src/Adyen/Model/Checkout/AcctInfo.php +++ b/src/Adyen/Model/Checkout/AcctInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index f2592da7f..5c117e38a 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index 696db3d17..a89105094 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataAirline.php b/src/Adyen/Model/Checkout/AdditionalDataAirline.php index bcae308a0..72566f5d8 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataAirline.php +++ b/src/Adyen/Model/Checkout/AdditionalDataAirline.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php index 571351604..49de58f9c 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataCommon.php b/src/Adyen/Model/Checkout/AdditionalDataCommon.php index 12ed56c13..b2905d68a 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCommon.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index a3a766c96..47d789255 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataLodging.php b/src/Adyen/Model/Checkout/AdditionalDataLodging.php index e80968e3c..f509dbb0b 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLodging.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLodging.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php b/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php index 20230ecb0..1139a4b1b 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php +++ b/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataOpi.php b/src/Adyen/Model/Checkout/AdditionalDataOpi.php index f6e85253f..4f6a9a5a8 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataOpi.php +++ b/src/Adyen/Model/Checkout/AdditionalDataOpi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRatepay.php b/src/Adyen/Model/Checkout/AdditionalDataRatepay.php index 6ba300859..e0d036926 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRatepay.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRatepay.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRetry.php b/src/Adyen/Model/Checkout/AdditionalDataRetry.php index 2bb2e0b2a..62011ee9a 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRetry.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRetry.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRisk.php b/src/Adyen/Model/Checkout/AdditionalDataRisk.php index 27830bc3e..6b202b0f7 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRisk.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRisk.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php b/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php index 3bb5c51d0..1e741f073 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php index 240b2fe26..20bdba4df 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php index fce5490d1..c131c4374 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataWallets.php b/src/Adyen/Model/Checkout/AdditionalDataWallets.php index 1bd47121d..acf5d7154 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataWallets.php +++ b/src/Adyen/Model/Checkout/AdditionalDataWallets.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Address.php b/src/Adyen/Model/Checkout/Address.php index 29cb61d98..082e8f957 100644 --- a/src/Adyen/Model/Checkout/Address.php +++ b/src/Adyen/Model/Checkout/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index 7b7a45008..bcce83df2 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AmazonPayDetails.php b/src/Adyen/Model/Checkout/AmazonPayDetails.php index 2c28be87b..9444f642f 100644 --- a/src/Adyen/Model/Checkout/AmazonPayDetails.php +++ b/src/Adyen/Model/Checkout/AmazonPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Amount.php b/src/Adyen/Model/Checkout/Amount.php index 720e36adf..b57dcb927 100644 --- a/src/Adyen/Model/Checkout/Amount.php +++ b/src/Adyen/Model/Checkout/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AndroidPayDetails.php b/src/Adyen/Model/Checkout/AndroidPayDetails.php index baa458730..c7fc1cd74 100644 --- a/src/Adyen/Model/Checkout/AndroidPayDetails.php +++ b/src/Adyen/Model/Checkout/AndroidPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index 43cacf792..ce31f2f22 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_APPLEPAY = 'applepay'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/ApplePayDonations.php b/src/Adyen/Model/Checkout/ApplePayDonations.php new file mode 100644 index 000000000..eee209dad --- /dev/null +++ b/src/Adyen/Model/Checkout/ApplePayDonations.php @@ -0,0 +1,649 @@ + + */ +class ApplePayDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ApplePayDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'applePayToken' => 'string', + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'applePayToken' => null, + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'applePayToken' => false, + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applePayToken' => 'applePayToken', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applePayToken' => 'setApplePayToken', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applePayToken' => 'getApplePayToken', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_APPLEPAY = 'applepay'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_APPLEPAY, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('applePayToken', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['applePayToken'] === null) { + $invalidProperties[] = "'applePayToken' can't be null"; + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applePayToken + * + * @return string + */ + public function getApplePayToken() + { + return $this->container['applePayToken']; + } + + /** + * Sets applePayToken + * + * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + * + * @return self + */ + public function setApplePayToken($applePayToken) + { + if (is_null($applePayToken)) { + throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); + } + $this->container['applePayToken'] = $applePayToken; + + return $this; + } + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **applepay** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/ApplePaySessionRequest.php b/src/Adyen/Model/Checkout/ApplePaySessionRequest.php index 0b9ba4d98..8cbd1e55c 100644 --- a/src/Adyen/Model/Checkout/ApplePaySessionRequest.php +++ b/src/Adyen/Model/Checkout/ApplePaySessionRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplePaySessionResponse.php b/src/Adyen/Model/Checkout/ApplePaySessionResponse.php index a8fa4967b..d71f35373 100644 --- a/src/Adyen/Model/Checkout/ApplePaySessionResponse.php +++ b/src/Adyen/Model/Checkout/ApplePaySessionResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplicationInfo.php b/src/Adyen/Model/Checkout/ApplicationInfo.php index 4c0c5d014..b87f00ecb 100644 --- a/src/Adyen/Model/Checkout/ApplicationInfo.php +++ b/src/Adyen/Model/Checkout/ApplicationInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AuthenticationData.php b/src/Adyen/Model/Checkout/AuthenticationData.php index 0cd2af6ee..1b18b576f 100644 --- a/src/Adyen/Model/Checkout/AuthenticationData.php +++ b/src/Adyen/Model/Checkout/AuthenticationData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Avs.php b/src/Adyen/Model/Checkout/Avs.php index d80a02412..20e82c167 100644 --- a/src/Adyen/Model/Checkout/Avs.php +++ b/src/Adyen/Model/Checkout/Avs.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index 303f20107..3c093bf01 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index ef4e4d8c2..85b60f505 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -1693,7 +1693,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * @param string|null $store Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. * * @return self */ diff --git a/src/Adyen/Model/Checkout/BalanceCheckResponse.php b/src/Adyen/Model/Checkout/BalanceCheckResponse.php index a9720e0e7..a66598ea4 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckResponse.php +++ b/src/Adyen/Model/Checkout/BalanceCheckResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BankAccount.php b/src/Adyen/Model/Checkout/BankAccount.php index 909c20cd2..1987c93a9 100644 --- a/src/Adyen/Model/Checkout/BankAccount.php +++ b/src/Adyen/Model/Checkout/BankAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BillDeskDetails.php b/src/Adyen/Model/Checkout/BillDeskDetails.php index d58730905..431b97324 100644 --- a/src/Adyen/Model/Checkout/BillDeskDetails.php +++ b/src/Adyen/Model/Checkout/BillDeskDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -227,10 +227,8 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_BILLDESK_ONLINE = 'billdesk_online'; - public const TYPE_BILLDESK_WALLET = 'billdesk_wallet'; - public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; - public const TYPE_WALLET_IN = 'wallet_IN'; + public const TYPE_ONLINE = 'billdesk_online'; + public const TYPE_WALLET = 'billdesk_wallet'; /** * Gets allowable values of the enum @@ -240,10 +238,8 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_BILLDESK_ONLINE, - self::TYPE_BILLDESK_WALLET, - self::TYPE_ONLINEBANKING_IN, - self::TYPE_WALLET_IN, + self::TYPE_ONLINE, + self::TYPE_WALLET, ]; } /** diff --git a/src/Adyen/Model/Checkout/BillingAddress.php b/src/Adyen/Model/Checkout/BillingAddress.php index 08a5f7620..e4f5dbf7c 100644 --- a/src/Adyen/Model/Checkout/BillingAddress.php +++ b/src/Adyen/Model/Checkout/BillingAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BlikDetails.php b/src/Adyen/Model/Checkout/BlikDetails.php index 596e61821..8ce47f5df 100644 --- a/src/Adyen/Model/Checkout/BlikDetails.php +++ b/src/Adyen/Model/Checkout/BlikDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BrowserInfo.php b/src/Adyen/Model/Checkout/BrowserInfo.php index 1356ea750..947c9d78d 100644 --- a/src/Adyen/Model/Checkout/BrowserInfo.php +++ b/src/Adyen/Model/Checkout/BrowserInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CancelOrderRequest.php b/src/Adyen/Model/Checkout/CancelOrderRequest.php index 61691fad1..7697cbf52 100644 --- a/src/Adyen/Model/Checkout/CancelOrderRequest.php +++ b/src/Adyen/Model/Checkout/CancelOrderRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CancelOrderResponse.php b/src/Adyen/Model/Checkout/CancelOrderResponse.php index bf07b0e70..282a1a957 100644 --- a/src/Adyen/Model/Checkout/CancelOrderResponse.php +++ b/src/Adyen/Model/Checkout/CancelOrderResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Card.php b/src/Adyen/Model/Checkout/Card.php index 56ed6fa41..46e56ff7b 100644 --- a/src/Adyen/Model/Checkout/Card.php +++ b/src/Adyen/Model/Checkout/Card.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardBrandDetails.php b/src/Adyen/Model/Checkout/CardBrandDetails.php index f092506d3..e97d36a85 100644 --- a/src/Adyen/Model/Checkout/CardBrandDetails.php +++ b/src/Adyen/Model/Checkout/CardBrandDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 2ae33c582..62bd62714 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -323,9 +323,12 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_BCMC = 'bcmc'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; + public const TYPE_GIFTCARD = 'giftcard'; public const TYPE_CARD = 'card'; /** @@ -336,6 +339,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } @@ -347,8 +351,10 @@ public function getFundingSourceAllowableValues() public function getTypeAllowableValues() { return [ + self::TYPE_BCMC, self::TYPE_SCHEME, self::TYPE_NETWORK_TOKEN, + self::TYPE_GIFTCARD, self::TYPE_CARD, ]; } diff --git a/src/Adyen/Model/Checkout/CardDetailsRequest.php b/src/Adyen/Model/Checkout/CardDetailsRequest.php index 5285a9b0d..b1896e9e8 100644 --- a/src/Adyen/Model/Checkout/CardDetailsRequest.php +++ b/src/Adyen/Model/Checkout/CardDetailsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardDetailsResponse.php b/src/Adyen/Model/Checkout/CardDetailsResponse.php index af3fc80ce..c1d808747 100644 --- a/src/Adyen/Model/Checkout/CardDetailsResponse.php +++ b/src/Adyen/Model/Checkout/CardDetailsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php new file mode 100644 index 000000000..34dfc88ea --- /dev/null +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -0,0 +1,1098 @@ + + */ +class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'brand' => 'string', + 'checkoutAttemptId' => 'string', + 'cupsecureplusSmscode' => 'string', + 'cvc' => 'string', + 'encryptedCardNumber' => 'string', + 'encryptedExpiryMonth' => 'string', + 'encryptedExpiryYear' => 'string', + 'encryptedSecurityCode' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'fundingSource' => 'string', + 'holderName' => 'string', + 'networkPaymentReference' => 'string', + 'number' => 'string', + 'recurringDetailReference' => 'string', + 'shopperNotificationReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'threeDS2SdkVersion' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'brand' => null, + 'checkoutAttemptId' => null, + 'cupsecureplusSmscode' => null, + 'cvc' => null, + 'encryptedCardNumber' => null, + 'encryptedExpiryMonth' => null, + 'encryptedExpiryYear' => null, + 'encryptedSecurityCode' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'fundingSource' => null, + 'holderName' => null, + 'networkPaymentReference' => null, + 'number' => null, + 'recurringDetailReference' => null, + 'shopperNotificationReference' => null, + 'storedPaymentMethodId' => null, + 'threeDS2SdkVersion' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'brand' => false, + 'checkoutAttemptId' => false, + 'cupsecureplusSmscode' => false, + 'cvc' => false, + 'encryptedCardNumber' => false, + 'encryptedExpiryMonth' => false, + 'encryptedExpiryYear' => false, + 'encryptedSecurityCode' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'fundingSource' => false, + 'holderName' => false, + 'networkPaymentReference' => false, + 'number' => false, + 'recurringDetailReference' => false, + 'shopperNotificationReference' => false, + 'storedPaymentMethodId' => false, + 'threeDS2SdkVersion' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'brand' => 'brand', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'cupsecureplusSmscode' => 'cupsecureplus.smscode', + 'cvc' => 'cvc', + 'encryptedCardNumber' => 'encryptedCardNumber', + 'encryptedExpiryMonth' => 'encryptedExpiryMonth', + 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedSecurityCode' => 'encryptedSecurityCode', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'fundingSource' => 'fundingSource', + 'holderName' => 'holderName', + 'networkPaymentReference' => 'networkPaymentReference', + 'number' => 'number', + 'recurringDetailReference' => 'recurringDetailReference', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'threeDS2SdkVersion' => 'threeDS2SdkVersion', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'brand' => 'setBrand', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', + 'cvc' => 'setCvc', + 'encryptedCardNumber' => 'setEncryptedCardNumber', + 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedSecurityCode' => 'setEncryptedSecurityCode', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'fundingSource' => 'setFundingSource', + 'holderName' => 'setHolderName', + 'networkPaymentReference' => 'setNetworkPaymentReference', + 'number' => 'setNumber', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'brand' => 'getBrand', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', + 'cvc' => 'getCvc', + 'encryptedCardNumber' => 'getEncryptedCardNumber', + 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedSecurityCode' => 'getEncryptedSecurityCode', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'fundingSource' => 'getFundingSource', + 'holderName' => 'getHolderName', + 'networkPaymentReference' => 'getNetworkPaymentReference', + 'number' => 'getNumber', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_BCMC = 'bcmc'; + public const TYPE_SCHEME = 'scheme'; + public const TYPE_NETWORK_TOKEN = 'networkToken'; + public const TYPE_GIFTCARD = 'giftcard'; + public const TYPE_CARD = 'card'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BCMC, + self::TYPE_SCHEME, + self::TYPE_NETWORK_TOKEN, + self::TYPE_GIFTCARD, + self::TYPE_CARD, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); + $this->setIfExists('encryptedCardNumber', $data ?? [], null); + $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); + $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedSecurityCode', $data ?? [], null); + $this->setIfExists('expiryMonth', $data ?? [], null); + $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('networkPaymentReference', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets brand + * + * @return string|null + */ + public function getBrand() + { + return $this->container['brand']; + } + + /** + * Sets brand + * + * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. + * + * @return self + */ + public function setBrand($brand) + { + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); + } + $this->container['brand'] = $brand; + + return $this; + } + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets cupsecureplusSmscode + * + * @return string|null + * @deprecated + */ + public function getCupsecureplusSmscode() + { + return $this->container['cupsecureplusSmscode']; + } + + /** + * Sets cupsecureplusSmscode + * + * @param string|null $cupsecureplusSmscode cupsecureplusSmscode + * + * @return self + * @deprecated + */ + public function setCupsecureplusSmscode($cupsecureplusSmscode) + { + if (is_null($cupsecureplusSmscode)) { + throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); + } + $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; + + return $this; + } + + /** + * Gets cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setCvc($cvc) + { + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); + } + $this->container['cvc'] = $cvc; + + return $this; + } + + /** + * Gets encryptedCardNumber + * + * @return string|null + */ + public function getEncryptedCardNumber() + { + return $this->container['encryptedCardNumber']; + } + + /** + * Sets encryptedCardNumber + * + * @param string|null $encryptedCardNumber The encrypted card number. + * + * @return self + */ + public function setEncryptedCardNumber($encryptedCardNumber) + { + if (is_null($encryptedCardNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); + } + $this->container['encryptedCardNumber'] = $encryptedCardNumber; + + return $this; + } + + /** + * Gets encryptedExpiryMonth + * + * @return string|null + */ + public function getEncryptedExpiryMonth() + { + return $this->container['encryptedExpiryMonth']; + } + + /** + * Sets encryptedExpiryMonth + * + * @param string|null $encryptedExpiryMonth The encrypted card expiry month. + * + * @return self + */ + public function setEncryptedExpiryMonth($encryptedExpiryMonth) + { + if (is_null($encryptedExpiryMonth)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); + } + $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; + + return $this; + } + + /** + * Gets encryptedExpiryYear + * + * @return string|null + */ + public function getEncryptedExpiryYear() + { + return $this->container['encryptedExpiryYear']; + } + + /** + * Sets encryptedExpiryYear + * + * @param string|null $encryptedExpiryYear The encrypted card expiry year. + * + * @return self + */ + public function setEncryptedExpiryYear($encryptedExpiryYear) + { + if (is_null($encryptedExpiryYear)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); + } + $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; + + return $this; + } + + /** + * Gets encryptedSecurityCode + * + * @return string|null + */ + public function getEncryptedSecurityCode() + { + return $this->container['encryptedSecurityCode']; + } + + /** + * Sets encryptedSecurityCode + * + * @param string|null $encryptedSecurityCode The encrypted card verification code. + * + * @return self + */ + public function setEncryptedSecurityCode($encryptedSecurityCode) + { + if (is_null($encryptedSecurityCode)) { + throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); + } + $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; + + return $this; + } + + /** + * Gets expiryMonth + * + * @return string|null + */ + public function getExpiryMonth() + { + return $this->container['expiryMonth']; + } + + /** + * Sets expiryMonth + * + * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryMonth($expiryMonth) + { + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); + } + $this->container['expiryMonth'] = $expiryMonth; + + return $this; + } + + /** + * Gets expiryYear + * + * @return string|null + */ + public function getExpiryYear() + { + return $this->container['expiryYear']; + } + + /** + * Sets expiryYear + * + * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryYear($expiryYear) + { + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); + } + $this->container['expiryYear'] = $expiryYear; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets holderName + * + * @return string|null + */ + public function getHolderName() + { + return $this->container['holderName']; + } + + /** + * Sets holderName + * + * @param string|null $holderName The name of the card holder. + * + * @return self + */ + public function setHolderName($holderName) + { + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); + } + $this->container['holderName'] = $holderName; + + return $this; + } + + /** + * Gets networkPaymentReference + * + * @return string|null + */ + public function getNetworkPaymentReference() + { + return $this->container['networkPaymentReference']; + } + + /** + * Sets networkPaymentReference + * + * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + * + * @return self + */ + public function setNetworkPaymentReference($networkPaymentReference) + { + if (is_null($networkPaymentReference)) { + throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); + } + $this->container['networkPaymentReference'] = $networkPaymentReference; + + return $this; + } + + /** + * Gets number + * + * @return string|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets shopperNotificationReference + * + * @return string|null + */ + public function getShopperNotificationReference() + { + return $this->container['shopperNotificationReference']; + } + + /** + * Sets shopperNotificationReference + * + * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. + * + * @return self + */ + public function setShopperNotificationReference($shopperNotificationReference) + { + if (is_null($shopperNotificationReference)) { + throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); + } + $this->container['shopperNotificationReference'] = $shopperNotificationReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets threeDS2SdkVersion + * + * @return string|null + */ + public function getThreeDS2SdkVersion() + { + return $this->container['threeDS2SdkVersion']; + } + + /** + * Sets threeDS2SdkVersion + * + * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. + * + * @return self + */ + public function setThreeDS2SdkVersion($threeDS2SdkVersion) + { + if (is_null($threeDS2SdkVersion)) { + throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); + } + $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Default payment method details. Common for scheme payment methods, and for simple payment method details. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/CellulantDetails.php b/src/Adyen/Model/Checkout/CellulantDetails.php index a29de0cc8..b03a57fa7 100644 --- a/src/Adyen/Model/Checkout/CellulantDetails.php +++ b/src/Adyen/Model/Checkout/CellulantDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php index 7910952d3..1bace49c3 100644 --- a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php +++ b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -334,7 +334,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php index bde74f03c..bb5698f13 100644 --- a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php +++ b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -375,7 +375,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php b/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php index 990bc48d3..e7b03e0d9 100644 --- a/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php +++ b/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutOrderResponse.php b/src/Adyen/Model/Checkout/CheckoutOrderResponse.php index 3354cfcc8..96c97e259 100644 --- a/src/Adyen/Model/Checkout/CheckoutOrderResponse.php +++ b/src/Adyen/Model/Checkout/CheckoutOrderResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index a89cbd5ed..1524e72f1 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -82,6 +82,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'lastName' => 'string', 'shopperEmail' => 'string', 'telephoneNumber' => 'string', + 'googlePayCardNetwork' => 'string', 'googlePayToken' => 'string', 'subtype' => 'string', 'masterpassTransactionId' => 'string', @@ -144,6 +145,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'lastName' => null, 'shopperEmail' => null, 'telephoneNumber' => null, + 'googlePayCardNetwork' => null, 'googlePayToken' => null, 'subtype' => null, 'masterpassTransactionId' => null, @@ -204,6 +206,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'lastName' => false, 'shopperEmail' => false, 'telephoneNumber' => false, + 'googlePayCardNetwork' => false, 'googlePayToken' => false, 'subtype' => false, 'masterpassTransactionId' => false, @@ -344,6 +347,7 @@ public function isNullableSetToNull(string $property): bool 'lastName' => 'lastName', 'shopperEmail' => 'shopperEmail', 'telephoneNumber' => 'telephoneNumber', + 'googlePayCardNetwork' => 'googlePayCardNetwork', 'googlePayToken' => 'googlePayToken', 'subtype' => 'subtype', 'masterpassTransactionId' => 'masterpassTransactionId', @@ -404,6 +408,7 @@ public function isNullableSetToNull(string $property): bool 'lastName' => 'setLastName', 'shopperEmail' => 'setShopperEmail', 'telephoneNumber' => 'setTelephoneNumber', + 'googlePayCardNetwork' => 'setGooglePayCardNetwork', 'googlePayToken' => 'setGooglePayToken', 'subtype' => 'setSubtype', 'masterpassTransactionId' => 'setMasterpassTransactionId', @@ -464,6 +469,7 @@ public function isNullableSetToNull(string $property): bool 'lastName' => 'getLastName', 'shopperEmail' => 'getShopperEmail', 'telephoneNumber' => 'getTelephoneNumber', + 'googlePayCardNetwork' => 'getGooglePayCardNetwork', 'googlePayToken' => 'getGooglePayToken', 'subtype' => 'getSubtype', 'masterpassTransactionId' => 'getMasterpassTransactionId', @@ -574,6 +580,7 @@ public function __construct(array $data = null) $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('googlePayCardNetwork', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); @@ -1685,6 +1692,33 @@ public function setTelephoneNumber($telephoneNumber) return $this; } + /** + * Gets googlePayCardNetwork + * + * @return string|null + */ + public function getGooglePayCardNetwork() + { + return $this->container['googlePayCardNetwork']; + } + + /** + * Sets googlePayCardNetwork + * + * @param string|null $googlePayCardNetwork The selected payment card network. + * + * @return self + */ + public function setGooglePayCardNetwork($googlePayCardNetwork) + { + if (is_null($googlePayCardNetwork)) { + throw new \InvalidArgumentException('non-nullable googlePayCardNetwork cannot be null'); + } + $this->container['googlePayCardNetwork'] = $googlePayCardNetwork; + + return $this; + } + /** * Gets googlePayToken * diff --git a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php index a435317bb..d17d89ae6 100644 --- a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php +++ b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -375,7 +375,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutRedirectAction.php b/src/Adyen/Model/Checkout/CheckoutRedirectAction.php index 379be6ea5..77ca93dfc 100644 --- a/src/Adyen/Model/Checkout/CheckoutRedirectAction.php +++ b/src/Adyen/Model/Checkout/CheckoutRedirectAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutSDKAction.php b/src/Adyen/Model/Checkout/CheckoutSDKAction.php index ece4f0754..8d280ca10 100644 --- a/src/Adyen/Model/Checkout/CheckoutSDKAction.php +++ b/src/Adyen/Model/Checkout/CheckoutSDKAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -343,7 +343,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php b/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php index 4c33a5905..94b0f803b 100644 --- a/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php +++ b/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php index 3e07b22e0..03b383fc1 100644 --- a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php +++ b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -382,7 +382,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php index 6e4930d14..67b083cf5 100644 --- a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php +++ b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -777,7 +777,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CommonField.php b/src/Adyen/Model/Checkout/CommonField.php index 3220a2379..a86cb1c26 100644 --- a/src/Adyen/Model/Checkout/CommonField.php +++ b/src/Adyen/Model/Checkout/CommonField.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Company.php b/src/Adyen/Model/Checkout/Company.php index e178cb605..f5b92d299 100644 --- a/src/Adyen/Model/Checkout/Company.php +++ b/src/Adyen/Model/Checkout/Company.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Configuration.php b/src/Adyen/Model/Checkout/Configuration.php index bcd93bc6b..85f7cf0b4 100644 --- a/src/Adyen/Model/Checkout/Configuration.php +++ b/src/Adyen/Model/Checkout/Configuration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index fb8ae3758..b92dbf04a 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -92,6 +92,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', + 'showRemovePaymentMethodButton' => 'bool', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', 'splits' => '\Adyen\Model\Checkout\Split[]', @@ -99,6 +100,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'storePaymentMethod' => 'bool', 'storePaymentMethodMode' => 'string', 'telephoneNumber' => 'string', + 'themeId' => 'string', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -159,6 +161,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperReference' => null, 'shopperStatement' => null, 'showInstallmentAmount' => null, + 'showRemovePaymentMethodButton' => null, 'socialSecurityNumber' => null, 'splitCardFundingSources' => null, 'splits' => null, @@ -166,6 +169,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'storePaymentMethod' => null, 'storePaymentMethodMode' => null, 'telephoneNumber' => null, + 'themeId' => null, 'threeDSAuthenticationOnly' => null, 'trustedShopper' => null ]; @@ -224,6 +228,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperReference' => false, 'shopperStatement' => false, 'showInstallmentAmount' => false, + 'showRemovePaymentMethodButton' => false, 'socialSecurityNumber' => false, 'splitCardFundingSources' => false, 'splits' => false, @@ -231,6 +236,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'storePaymentMethod' => false, 'storePaymentMethodMode' => false, 'telephoneNumber' => false, + 'themeId' => false, 'threeDSAuthenticationOnly' => false, 'trustedShopper' => false ]; @@ -369,6 +375,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'shopperReference', 'shopperStatement' => 'shopperStatement', 'showInstallmentAmount' => 'showInstallmentAmount', + 'showRemovePaymentMethodButton' => 'showRemovePaymentMethodButton', 'socialSecurityNumber' => 'socialSecurityNumber', 'splitCardFundingSources' => 'splitCardFundingSources', 'splits' => 'splits', @@ -376,6 +383,7 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'storePaymentMethod', 'storePaymentMethodMode' => 'storePaymentMethodMode', 'telephoneNumber' => 'telephoneNumber', + 'themeId' => 'themeId', 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', 'trustedShopper' => 'trustedShopper' ]; @@ -434,6 +442,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'setShopperReference', 'shopperStatement' => 'setShopperStatement', 'showInstallmentAmount' => 'setShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'setShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'setSocialSecurityNumber', 'splitCardFundingSources' => 'setSplitCardFundingSources', 'splits' => 'setSplits', @@ -441,6 +450,7 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'setStorePaymentMethod', 'storePaymentMethodMode' => 'setStorePaymentMethodMode', 'telephoneNumber' => 'setTelephoneNumber', + 'themeId' => 'setThemeId', 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', 'trustedShopper' => 'setTrustedShopper' ]; @@ -499,6 +509,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'getShopperReference', 'shopperStatement' => 'getShopperStatement', 'showInstallmentAmount' => 'getShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'getShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'getSocialSecurityNumber', 'splitCardFundingSources' => 'getSplitCardFundingSources', 'splits' => 'getSplits', @@ -506,6 +517,7 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'getStorePaymentMethod', 'storePaymentMethodMode' => 'getStorePaymentMethodMode', 'telephoneNumber' => 'getTelephoneNumber', + 'themeId' => 'getThemeId', 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', 'trustedShopper' => 'getTrustedShopper' ]; @@ -695,6 +707,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('showInstallmentAmount', $data ?? [], null); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); @@ -702,6 +715,7 @@ public function __construct(array $data = null) $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('themeId', $data ?? [], null); $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } @@ -2139,6 +2153,33 @@ public function setShowInstallmentAmount($showInstallmentAmount) return $this; } + /** + * Gets showRemovePaymentMethodButton + * + * @return bool|null + */ + public function getShowRemovePaymentMethodButton() + { + return $this->container['showRemovePaymentMethodButton']; + } + + /** + * Sets showRemovePaymentMethodButton + * + * @param bool|null $showRemovePaymentMethodButton Set to **true** to show a button that lets the shopper remove a stored payment method. + * + * @return self + */ + public function setShowRemovePaymentMethodButton($showRemovePaymentMethodButton) + { + if (is_null($showRemovePaymentMethodButton)) { + throw new \InvalidArgumentException('non-nullable showRemovePaymentMethodButton cannot be null'); + } + $this->container['showRemovePaymentMethodButton'] = $showRemovePaymentMethodButton; + + return $this; + } + /** * Gets socialSecurityNumber * @@ -2233,7 +2274,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * @param string|null $store Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. * * @return self */ @@ -2338,6 +2379,33 @@ public function setTelephoneNumber($telephoneNumber) return $this; } + /** + * Gets themeId + * + * @return string|null + */ + public function getThemeId() + { + return $this->container['themeId']; + } + + /** + * Sets themeId + * + * @param string|null $themeId Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. + * + * @return self + */ + public function setThemeId($themeId) + { + if (is_null($themeId)) { + throw new \InvalidArgumentException('non-nullable themeId cannot be null'); + } + $this->container['themeId'] = $themeId; + + return $this; + } + /** * Gets threeDSAuthenticationOnly * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index a58e36447..e3b853db5 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -94,6 +94,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', + 'showRemovePaymentMethodButton' => 'bool', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', 'splits' => '\Adyen\Model\Checkout\Split[]', @@ -101,8 +102,10 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'storePaymentMethod' => 'bool', 'storePaymentMethodMode' => 'string', 'telephoneNumber' => 'string', + 'themeId' => 'string', 'threeDSAuthenticationOnly' => 'bool', - 'trustedShopper' => 'bool' + 'trustedShopper' => 'bool', + 'url' => 'string' ]; /** @@ -163,6 +166,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperReference' => null, 'shopperStatement' => null, 'showInstallmentAmount' => null, + 'showRemovePaymentMethodButton' => null, 'socialSecurityNumber' => null, 'splitCardFundingSources' => null, 'splits' => null, @@ -170,8 +174,10 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'storePaymentMethod' => null, 'storePaymentMethodMode' => null, 'telephoneNumber' => null, + 'themeId' => null, 'threeDSAuthenticationOnly' => null, - 'trustedShopper' => null + 'trustedShopper' => null, + 'url' => null ]; /** @@ -230,6 +236,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperReference' => false, 'shopperStatement' => false, 'showInstallmentAmount' => false, + 'showRemovePaymentMethodButton' => false, 'socialSecurityNumber' => false, 'splitCardFundingSources' => false, 'splits' => false, @@ -237,8 +244,10 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'storePaymentMethod' => false, 'storePaymentMethodMode' => false, 'telephoneNumber' => false, + 'themeId' => false, 'threeDSAuthenticationOnly' => false, - 'trustedShopper' => false + 'trustedShopper' => false, + 'url' => false ]; /** @@ -377,6 +386,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'shopperReference', 'shopperStatement' => 'shopperStatement', 'showInstallmentAmount' => 'showInstallmentAmount', + 'showRemovePaymentMethodButton' => 'showRemovePaymentMethodButton', 'socialSecurityNumber' => 'socialSecurityNumber', 'splitCardFundingSources' => 'splitCardFundingSources', 'splits' => 'splits', @@ -384,8 +394,10 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'storePaymentMethod', 'storePaymentMethodMode' => 'storePaymentMethodMode', 'telephoneNumber' => 'telephoneNumber', + 'themeId' => 'themeId', 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', - 'trustedShopper' => 'trustedShopper' + 'trustedShopper' => 'trustedShopper', + 'url' => 'url' ]; /** @@ -444,6 +456,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'setShopperReference', 'shopperStatement' => 'setShopperStatement', 'showInstallmentAmount' => 'setShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'setShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'setSocialSecurityNumber', 'splitCardFundingSources' => 'setSplitCardFundingSources', 'splits' => 'setSplits', @@ -451,8 +464,10 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'setStorePaymentMethod', 'storePaymentMethodMode' => 'setStorePaymentMethodMode', 'telephoneNumber' => 'setTelephoneNumber', + 'themeId' => 'setThemeId', 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', - 'trustedShopper' => 'setTrustedShopper' + 'trustedShopper' => 'setTrustedShopper', + 'url' => 'setUrl' ]; /** @@ -511,6 +526,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'getShopperReference', 'shopperStatement' => 'getShopperStatement', 'showInstallmentAmount' => 'getShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'getShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'getSocialSecurityNumber', 'splitCardFundingSources' => 'getSplitCardFundingSources', 'splits' => 'getSplits', @@ -518,8 +534,10 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'getStorePaymentMethod', 'storePaymentMethodMode' => 'getStorePaymentMethodMode', 'telephoneNumber' => 'getTelephoneNumber', + 'themeId' => 'getThemeId', 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', - 'trustedShopper' => 'getTrustedShopper' + 'trustedShopper' => 'getTrustedShopper', + 'url' => 'getUrl' ]; /** @@ -709,6 +727,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('showInstallmentAmount', $data ?? [], null); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); @@ -716,8 +735,10 @@ public function __construct(array $data = null) $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('themeId', $data ?? [], null); $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -2213,6 +2234,33 @@ public function setShowInstallmentAmount($showInstallmentAmount) return $this; } + /** + * Gets showRemovePaymentMethodButton + * + * @return bool|null + */ + public function getShowRemovePaymentMethodButton() + { + return $this->container['showRemovePaymentMethodButton']; + } + + /** + * Sets showRemovePaymentMethodButton + * + * @param bool|null $showRemovePaymentMethodButton Set to **true** to show a button that lets the shopper remove a stored payment method. + * + * @return self + */ + public function setShowRemovePaymentMethodButton($showRemovePaymentMethodButton) + { + if (is_null($showRemovePaymentMethodButton)) { + throw new \InvalidArgumentException('non-nullable showRemovePaymentMethodButton cannot be null'); + } + $this->container['showRemovePaymentMethodButton'] = $showRemovePaymentMethodButton; + + return $this; + } + /** * Gets socialSecurityNumber * @@ -2307,7 +2355,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * @param string|null $store Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. * * @return self */ @@ -2412,6 +2460,33 @@ public function setTelephoneNumber($telephoneNumber) return $this; } + /** + * Gets themeId + * + * @return string|null + */ + public function getThemeId() + { + return $this->container['themeId']; + } + + /** + * Sets themeId + * + * @param string|null $themeId Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. + * + * @return self + */ + public function setThemeId($themeId) + { + if (is_null($themeId)) { + throw new \InvalidArgumentException('non-nullable themeId cannot be null'); + } + $this->container['themeId'] = $themeId; + + return $this; + } + /** * Gets threeDSAuthenticationOnly * @@ -2467,6 +2542,33 @@ public function setTrustedShopper($trustedShopper) return $this; } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url The URL for the Hosted Checkout page. Redirect the shopper to this URL so they can make the payment. + * + * @return self + */ + public function setUrl($url) + { + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/CreateOrderRequest.php b/src/Adyen/Model/Checkout/CreateOrderRequest.php index ff9900089..e2ab4a207 100644 --- a/src/Adyen/Model/Checkout/CreateOrderRequest.php +++ b/src/Adyen/Model/Checkout/CreateOrderRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CreateOrderResponse.php b/src/Adyen/Model/Checkout/CreateOrderResponse.php index e3d62d13f..4d768d9cf 100644 --- a/src/Adyen/Model/Checkout/CreateOrderResponse.php +++ b/src/Adyen/Model/Checkout/CreateOrderResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DeliveryAddress.php b/src/Adyen/Model/Checkout/DeliveryAddress.php index de08f1acc..285fa8f6f 100644 --- a/src/Adyen/Model/Checkout/DeliveryAddress.php +++ b/src/Adyen/Model/Checkout/DeliveryAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php index 31ccbb35b..d70c7255b 100644 --- a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php +++ b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DeviceRenderOptions.php b/src/Adyen/Model/Checkout/DeviceRenderOptions.php index 52f6d5006..2e6b2a41c 100644 --- a/src/Adyen/Model/Checkout/DeviceRenderOptions.php +++ b/src/Adyen/Model/Checkout/DeviceRenderOptions.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DokuDetails.php b/src/Adyen/Model/Checkout/DokuDetails.php index 90ca95079..aced98464 100644 --- a/src/Adyen/Model/Checkout/DokuDetails.php +++ b/src/Adyen/Model/Checkout/DokuDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index 7201dd587..e5728f121 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,6 +65,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => 'string', 'shopperNotificationReference' => 'string', 'threeDS2SdkVersion' => 'string', + 'googlePayCardNetwork' => 'string', 'googlePayToken' => 'string', 'issuer' => 'string' ]; @@ -97,6 +98,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => null, 'shopperNotificationReference' => null, 'threeDS2SdkVersion' => null, + 'googlePayCardNetwork' => null, 'googlePayToken' => null, 'issuer' => null ]; @@ -127,6 +129,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => false, 'shopperNotificationReference' => false, 'threeDS2SdkVersion' => false, + 'googlePayCardNetwork' => false, 'googlePayToken' => false, 'issuer' => false ]; @@ -237,6 +240,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', + 'googlePayCardNetwork' => 'googlePayCardNetwork', 'googlePayToken' => 'googlePayToken', 'issuer' => 'issuer' ]; @@ -267,6 +271,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', + 'googlePayCardNetwork' => 'setGooglePayCardNetwork', 'googlePayToken' => 'setGooglePayToken', 'issuer' => 'setIssuer' ]; @@ -297,6 +302,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', + 'googlePayCardNetwork' => 'getGooglePayCardNetwork', 'googlePayToken' => 'getGooglePayToken', 'issuer' => 'getIssuer' ]; @@ -377,6 +383,7 @@ public function __construct(array $data = null) $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); + $this->setIfExists('googlePayCardNetwork', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); } @@ -978,6 +985,33 @@ public function setThreeDS2SdkVersion($threeDS2SdkVersion) return $this; } + /** + * Gets googlePayCardNetwork + * + * @return string|null + */ + public function getGooglePayCardNetwork() + { + return $this->container['googlePayCardNetwork']; + } + + /** + * Sets googlePayCardNetwork + * + * @param string|null $googlePayCardNetwork The selected payment card network. + * + * @return self + */ + public function setGooglePayCardNetwork($googlePayCardNetwork) + { + if (is_null($googlePayCardNetwork)) { + throw new \InvalidArgumentException('non-nullable googlePayCardNetwork cannot be null'); + } + $this->container['googlePayCardNetwork'] = $googlePayCardNetwork; + + return $this; + } + /** * Gets googlePayToken * diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 0aede4647..1fb7ec456 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -603,9 +603,6 @@ public function listInvalidProperties() ); } - if ($this->container['donationAccount'] === null) { - $invalidProperties[] = "'donationAccount' can't be null"; - } if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -1071,7 +1068,7 @@ public function setDeviceFingerprint($deviceFingerprint) /** * Gets donationAccount * - * @return string + * @return string|null */ public function getDonationAccount() { @@ -1081,7 +1078,7 @@ public function getDonationAccount() /** * Sets donationAccount * - * @param string $donationAccount Donation account to which the transaction is credited. + * @param string|null $donationAccount Donation account to which the transaction is credited. * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentResponse.php b/src/Adyen/Model/Checkout/DonationPaymentResponse.php index 0b849f6e3..acc5f2cc8 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentResponse.php +++ b/src/Adyen/Model/Checkout/DonationPaymentResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DotpayDetails.php b/src/Adyen/Model/Checkout/DotpayDetails.php index 94b172b4c..081288824 100644 --- a/src/Adyen/Model/Checkout/DotpayDetails.php +++ b/src/Adyen/Model/Checkout/DotpayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DragonpayDetails.php b/src/Adyen/Model/Checkout/DragonpayDetails.php index 28842394f..abad7bcb2 100644 --- a/src/Adyen/Model/Checkout/DragonpayDetails.php +++ b/src/Adyen/Model/Checkout/DragonpayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php index fab1a244a..8be09c4e5 100644 --- a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php +++ b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/EncryptedOrderData.php b/src/Adyen/Model/Checkout/EncryptedOrderData.php index fe12e9910..0bc334c3b 100644 --- a/src/Adyen/Model/Checkout/EncryptedOrderData.php +++ b/src/Adyen/Model/Checkout/EncryptedOrderData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ExternalPlatform.php b/src/Adyen/Model/Checkout/ExternalPlatform.php index ddf5df76e..5cbd27a35 100644 --- a/src/Adyen/Model/Checkout/ExternalPlatform.php +++ b/src/Adyen/Model/Checkout/ExternalPlatform.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ForexQuote.php b/src/Adyen/Model/Checkout/ForexQuote.php index d975c28f9..42ff96732 100644 --- a/src/Adyen/Model/Checkout/ForexQuote.php +++ b/src/Adyen/Model/Checkout/ForexQuote.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FraudCheckResult.php b/src/Adyen/Model/Checkout/FraudCheckResult.php index 31368e236..84da4ba9c 100644 --- a/src/Adyen/Model/Checkout/FraudCheckResult.php +++ b/src/Adyen/Model/Checkout/FraudCheckResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FraudResult.php b/src/Adyen/Model/Checkout/FraudResult.php index 3671e0621..81941a200 100644 --- a/src/Adyen/Model/Checkout/FraudResult.php +++ b/src/Adyen/Model/Checkout/FraudResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FundOrigin.php b/src/Adyen/Model/Checkout/FundOrigin.php index d17b49b22..6a9be7973 100644 --- a/src/Adyen/Model/Checkout/FundOrigin.php +++ b/src/Adyen/Model/Checkout/FundOrigin.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -45,7 +45,10 @@ class FundOrigin implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'billingAddress' => '\Adyen\Model\Checkout\Address', - 'shopperName' => '\Adyen\Model\Checkout\Name' + 'shopperEmail' => 'string', + 'shopperName' => '\Adyen\Model\Checkout\Name', + 'telephoneNumber' => 'string', + 'walletIdentifier' => 'string' ]; /** @@ -57,7 +60,10 @@ class FundOrigin implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'billingAddress' => null, - 'shopperName' => null + 'shopperEmail' => null, + 'shopperName' => null, + 'telephoneNumber' => null, + 'walletIdentifier' => null ]; /** @@ -67,7 +73,10 @@ class FundOrigin implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'billingAddress' => false, - 'shopperName' => false + 'shopperEmail' => false, + 'shopperName' => false, + 'telephoneNumber' => false, + 'walletIdentifier' => false ]; /** @@ -157,7 +166,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'billingAddress' => 'billingAddress', - 'shopperName' => 'shopperName' + 'shopperEmail' => 'shopperEmail', + 'shopperName' => 'shopperName', + 'telephoneNumber' => 'telephoneNumber', + 'walletIdentifier' => 'walletIdentifier' ]; /** @@ -167,7 +179,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'billingAddress' => 'setBillingAddress', - 'shopperName' => 'setShopperName' + 'shopperEmail' => 'setShopperEmail', + 'shopperName' => 'setShopperName', + 'telephoneNumber' => 'setTelephoneNumber', + 'walletIdentifier' => 'setWalletIdentifier' ]; /** @@ -177,7 +192,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'billingAddress' => 'getBillingAddress', - 'shopperName' => 'getShopperName' + 'shopperEmail' => 'getShopperEmail', + 'shopperName' => 'getShopperName', + 'telephoneNumber' => 'getTelephoneNumber', + 'walletIdentifier' => 'getWalletIdentifier' ]; /** @@ -238,7 +256,10 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('walletIdentifier', $data ?? [], null); } /** @@ -310,6 +331,33 @@ public function setBillingAddress($billingAddress) return $this; } + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail Email address of the person. + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + /** * Gets shopperName * @@ -336,6 +384,60 @@ public function setShopperName($shopperName) return $this; } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber Phone number of the person + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + + /** + * Gets walletIdentifier + * + * @return string|null + */ + public function getWalletIdentifier() + { + return $this->container['walletIdentifier']; + } + + /** + * Sets walletIdentifier + * + * @param string|null $walletIdentifier walletIdentifier + * + * @return self + */ + public function setWalletIdentifier($walletIdentifier) + { + if (is_null($walletIdentifier)) { + throw new \InvalidArgumentException('non-nullable walletIdentifier cannot be null'); + } + $this->container['walletIdentifier'] = $walletIdentifier; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/FundRecipient.php b/src/Adyen/Model/Checkout/FundRecipient.php index d5b48f54b..2a4eb9e6a 100644 --- a/src/Adyen/Model/Checkout/FundRecipient.php +++ b/src/Adyen/Model/Checkout/FundRecipient.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php index 727b9474e..b9ef41f1f 100644 --- a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/GiropayDetails.php b/src/Adyen/Model/Checkout/GiropayDetails.php index 728476592..abc78141f 100644 --- a/src/Adyen/Model/Checkout/GiropayDetails.php +++ b/src/Adyen/Model/Checkout/GiropayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index b37370b84..fb827ce37 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -46,6 +46,7 @@ class GooglePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'fundingSource' => 'string', + 'googlePayCardNetwork' => 'string', 'googlePayToken' => 'string', 'recurringDetailReference' => 'string', 'storedPaymentMethodId' => 'string', @@ -62,6 +63,7 @@ class GooglePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'fundingSource' => null, + 'googlePayCardNetwork' => null, 'googlePayToken' => null, 'recurringDetailReference' => null, 'storedPaymentMethodId' => null, @@ -76,6 +78,7 @@ class GooglePayDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'fundingSource' => false, + 'googlePayCardNetwork' => false, 'googlePayToken' => false, 'recurringDetailReference' => false, 'storedPaymentMethodId' => false, @@ -170,6 +173,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'fundingSource' => 'fundingSource', + 'googlePayCardNetwork' => 'googlePayCardNetwork', 'googlePayToken' => 'googlePayToken', 'recurringDetailReference' => 'recurringDetailReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', @@ -184,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'fundingSource' => 'setFundingSource', + 'googlePayCardNetwork' => 'setGooglePayCardNetwork', 'googlePayToken' => 'setGooglePayToken', 'recurringDetailReference' => 'setRecurringDetailReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', @@ -198,6 +203,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'fundingSource' => 'getFundingSource', + 'googlePayCardNetwork' => 'getGooglePayCardNetwork', 'googlePayToken' => 'getGooglePayToken', 'recurringDetailReference' => 'getRecurringDetailReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', @@ -245,6 +251,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_GOOGLEPAY = 'googlepay'; @@ -256,6 +263,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } @@ -287,6 +295,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('googlePayCardNetwork', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); @@ -420,6 +429,33 @@ public function setFundingSource($fundingSource) return $this; } + /** + * Gets googlePayCardNetwork + * + * @return string|null + */ + public function getGooglePayCardNetwork() + { + return $this->container['googlePayCardNetwork']; + } + + /** + * Sets googlePayCardNetwork + * + * @param string|null $googlePayCardNetwork The selected payment card network. + * + * @return self + */ + public function setGooglePayCardNetwork($googlePayCardNetwork) + { + if (is_null($googlePayCardNetwork)) { + throw new \InvalidArgumentException('non-nullable googlePayCardNetwork cannot be null'); + } + $this->container['googlePayCardNetwork'] = $googlePayCardNetwork; + + return $this; + } + /** * Gets googlePayToken * diff --git a/src/Adyen/Model/Checkout/GooglePayDonations.php b/src/Adyen/Model/Checkout/GooglePayDonations.php new file mode 100644 index 000000000..4012f729e --- /dev/null +++ b/src/Adyen/Model/Checkout/GooglePayDonations.php @@ -0,0 +1,683 @@ + + */ +class GooglePayDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GooglePayDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'googlePayCardNetwork' => 'string', + 'googlePayToken' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'googlePayCardNetwork' => null, + 'googlePayToken' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'googlePayCardNetwork' => false, + 'googlePayToken' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'googlePayCardNetwork' => 'googlePayCardNetwork', + 'googlePayToken' => 'googlePayToken', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'googlePayCardNetwork' => 'setGooglePayCardNetwork', + 'googlePayToken' => 'setGooglePayToken', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'googlePayCardNetwork' => 'getGooglePayCardNetwork', + 'googlePayToken' => 'getGooglePayToken', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_GOOGLEPAY = 'googlepay'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_GOOGLEPAY, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('googlePayCardNetwork', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets googlePayCardNetwork + * + * @return string|null + */ + public function getGooglePayCardNetwork() + { + return $this->container['googlePayCardNetwork']; + } + + /** + * Sets googlePayCardNetwork + * + * @param string|null $googlePayCardNetwork The selected payment card network. + * + * @return self + */ + public function setGooglePayCardNetwork($googlePayCardNetwork) + { + if (is_null($googlePayCardNetwork)) { + throw new \InvalidArgumentException('non-nullable googlePayCardNetwork cannot be null'); + } + $this->container['googlePayCardNetwork'] = $googlePayCardNetwork; + + return $this; + } + + /** + * Gets googlePayToken + * + * @return string + */ + public function getGooglePayToken() + { + return $this->container['googlePayToken']; + } + + /** + * Sets googlePayToken + * + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + * + * @return self + */ + public function setGooglePayToken($googlePayToken) + { + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + } + $this->container['googlePayToken'] = $googlePayToken; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **googlepay**, **paywithgoogle** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index 35c5566c3..e8290f6b6 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php new file mode 100644 index 000000000..bb3472cb0 --- /dev/null +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -0,0 +1,582 @@ + + */ +class IdealDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'IdealDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'issuer' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'issuer' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'issuer' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'issuer' => 'issuer', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'issuer' => 'setIssuer', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'issuer' => 'getIssuer', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_IDEAL = 'ideal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_IDEAL, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets issuer + * + * @return string + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * + * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + * + * @return self + */ + public function setIssuer($issuer) + { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } + $this->container['issuer'] = $issuer; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **ideal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/InputDetail.php b/src/Adyen/Model/Checkout/InputDetail.php index 4160ffadf..d0f613356 100644 --- a/src/Adyen/Model/Checkout/InputDetail.php +++ b/src/Adyen/Model/Checkout/InputDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/InstallmentOption.php b/src/Adyen/Model/Checkout/InstallmentOption.php index 140cf4422..d3ae37889 100644 --- a/src/Adyen/Model/Checkout/InstallmentOption.php +++ b/src/Adyen/Model/Checkout/InstallmentOption.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Installments.php b/src/Adyen/Model/Checkout/Installments.php index ae625800e..aa0275b92 100644 --- a/src/Adyen/Model/Checkout/Installments.php +++ b/src/Adyen/Model/Checkout/Installments.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/InstallmentsNumber.php b/src/Adyen/Model/Checkout/InstallmentsNumber.php index 061894318..593078cd9 100644 --- a/src/Adyen/Model/Checkout/InstallmentsNumber.php +++ b/src/Adyen/Model/Checkout/InstallmentsNumber.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Item.php b/src/Adyen/Model/Checkout/Item.php index cb78573ec..747b15c02 100644 --- a/src/Adyen/Model/Checkout/Item.php +++ b/src/Adyen/Model/Checkout/Item.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 23eefe315..217a04b52 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/LineItem.php b/src/Adyen/Model/Checkout/LineItem.php index 346452e57..7e18f262f 100644 --- a/src/Adyen/Model/Checkout/LineItem.php +++ b/src/Adyen/Model/Checkout/LineItem.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php b/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php index 5a44e39ba..f176b50f2 100644 --- a/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php +++ b/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Mandate.php b/src/Adyen/Model/Checkout/Mandate.php index 9bb093c34..e300c52e3 100644 --- a/src/Adyen/Model/Checkout/Mandate.php +++ b/src/Adyen/Model/Checkout/Mandate.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index b6cf7914c..b069f1610 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -233,6 +233,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_MASTERPASS = 'masterpass'; @@ -244,6 +245,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index 40b1ecd69..b55de8e2f 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MerchantDevice.php b/src/Adyen/Model/Checkout/MerchantDevice.php index e6d220583..fdcd4e186 100644 --- a/src/Adyen/Model/Checkout/MerchantDevice.php +++ b/src/Adyen/Model/Checkout/MerchantDevice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php index b6d6c3fad..c2c045224 100644 --- a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MobilePayDetails.php b/src/Adyen/Model/Checkout/MobilePayDetails.php index 2795c76e9..54d924dce 100644 --- a/src/Adyen/Model/Checkout/MobilePayDetails.php +++ b/src/Adyen/Model/Checkout/MobilePayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ModelInterface.php b/src/Adyen/Model/Checkout/ModelInterface.php index 661c821be..db5493a75 100644 --- a/src/Adyen/Model/Checkout/ModelInterface.php +++ b/src/Adyen/Model/Checkout/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MolPayDetails.php b/src/Adyen/Model/Checkout/MolPayDetails.php index f9168907f..85f553177 100644 --- a/src/Adyen/Model/Checkout/MolPayDetails.php +++ b/src/Adyen/Model/Checkout/MolPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Name.php b/src/Adyen/Model/Checkout/Name.php index ec413e9fc..f1b79cadd 100644 --- a/src/Adyen/Model/Checkout/Name.php +++ b/src/Adyen/Model/Checkout/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 29dd654c7..2b682c18f 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -261,7 +261,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index e8f68ed9b..58ada5135 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index 431344c60..f1ae70649 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index 21a4e36f0..87c448386 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index face3c089..f44168993 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_PAYWITHGOOGLE = 'paywithgoogle'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php new file mode 100644 index 000000000..d283478bf --- /dev/null +++ b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php @@ -0,0 +1,649 @@ + + */ +class PayWithGoogleDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PayWithGoogleDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'googlePayToken' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'googlePayToken' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'googlePayToken' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'googlePayToken' => 'googlePayToken', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'googlePayToken' => 'setGooglePayToken', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'googlePayToken' => 'getGooglePayToken', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_PAYWITHGOOGLE = 'paywithgoogle'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYWITHGOOGLE, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets googlePayToken + * + * @return string + */ + public function getGooglePayToken() + { + return $this->container['googlePayToken']; + } + + /** + * Sets googlePayToken + * + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + * + * @return self + */ + public function setGooglePayToken($googlePayToken) + { + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + } + $this->container['googlePayToken'] = $googlePayToken; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **paywithgoogle** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php b/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php index a5c8fa504..8cd4af208 100644 --- a/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php +++ b/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php b/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php index 780a69965..27d1f1d6a 100644 --- a/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php +++ b/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCancelRequest.php b/src/Adyen/Model/Checkout/PaymentCancelRequest.php index 461043cc9..419380354 100644 --- a/src/Adyen/Model/Checkout/PaymentCancelRequest.php +++ b/src/Adyen/Model/Checkout/PaymentCancelRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCancelResponse.php b/src/Adyen/Model/Checkout/PaymentCancelResponse.php index 552d50cbe..9f102b88c 100644 --- a/src/Adyen/Model/Checkout/PaymentCancelResponse.php +++ b/src/Adyen/Model/Checkout/PaymentCancelResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCaptureRequest.php b/src/Adyen/Model/Checkout/PaymentCaptureRequest.php index 1e6c1517a..86ed4a8c6 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureRequest.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCaptureResponse.php b/src/Adyen/Model/Checkout/PaymentCaptureResponse.php index 6623b1813..996c2d2cd 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureResponse.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php index ec34ddb8c..5dc7df871 100644 --- a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php +++ b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 71757b294..c744616a5 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php index a1059faaa..6764840f8 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -367,7 +367,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData The `paymentData` value from the `/payments` response. Required if the `/payments` response returns this value. + * @param string|null $paymentData Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php index 8a38f094e..00e2dc882 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index 9e4afc0d2..0480088f8 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index 7a2ec2bb8..1407c7c1a 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethod.php b/src/Adyen/Model/Checkout/PaymentMethod.php index a27915740..faf17b42f 100644 --- a/src/Adyen/Model/Checkout/PaymentMethod.php +++ b/src/Adyen/Model/Checkout/PaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -263,6 +263,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; /** @@ -273,6 +274,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/PaymentMethodGroup.php b/src/Adyen/Model/Checkout/PaymentMethodGroup.php index 500cda0fb..b37334519 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodGroup.php +++ b/src/Adyen/Model/Checkout/PaymentMethodGroup.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php index 82e63a005..040b84f31 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php +++ b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index f2d1e4386..abeef1a59 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -701,7 +701,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * @param string|null $store Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentMethodsResponse.php b/src/Adyen/Model/Checkout/PaymentMethodsResponse.php index 0f1fbe07d..3b2c2c280 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentRefundRequest.php b/src/Adyen/Model/Checkout/PaymentRefundRequest.php index 47fc9a76f..7f202be32 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRefundRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -50,7 +50,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', 'reference' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]' + 'splits' => '\Adyen\Model\Checkout\Split[]', + 'store' => 'string' ]; /** @@ -67,7 +68,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => null, 'merchantRefundReason' => null, 'reference' => null, - 'splits' => null + 'splits' => null, + 'store' => null ]; /** @@ -82,7 +84,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => false, 'merchantRefundReason' => false, 'reference' => false, - 'splits' => false + 'splits' => false, + 'store' => false ]; /** @@ -177,7 +180,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', 'reference' => 'reference', - 'splits' => 'splits' + 'splits' => 'splits', + 'store' => 'store' ]; /** @@ -192,7 +196,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', 'reference' => 'setReference', - 'splits' => 'setSplits' + 'splits' => 'setSplits', + 'store' => 'setStore' ]; /** @@ -207,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', 'reference' => 'getReference', - 'splits' => 'getSplits' + 'splits' => 'getSplits', + 'store' => 'getStore' ]; /** @@ -294,6 +300,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantRefundReason', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); } /** @@ -551,6 +558,33 @@ public function setSplits($splits) return $this; } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/PaymentRefundResponse.php b/src/Adyen/Model/Checkout/PaymentRefundResponse.php index 061a857bd..9dca7b795 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundResponse.php +++ b/src/Adyen/Model/Checkout/PaymentRefundResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -52,7 +52,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => 'string', 'reference' => 'string', 'splits' => '\Adyen\Model\Checkout\Split[]', - 'status' => 'string' + 'status' => 'string', + 'store' => 'string' ]; /** @@ -71,7 +72,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => null, 'reference' => null, 'splits' => null, - 'status' => null + 'status' => null, + 'store' => null ]; /** @@ -88,7 +90,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => false, 'reference' => false, 'splits' => false, - 'status' => false + 'status' => false, + 'store' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'pspReference', 'reference' => 'reference', 'splits' => 'splits', - 'status' => 'status' + 'status' => 'status', + 'store' => 'store' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'setPspReference', 'reference' => 'setReference', 'splits' => 'setSplits', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'store' => 'setStore' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'getPspReference', 'reference' => 'getReference', 'splits' => 'getSplits', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'store' => 'getStore' ]; /** @@ -320,6 +326,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); } /** @@ -659,6 +666,33 @@ public function setStatus($status) return $this; } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 36baa7571..22f8228fd 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -2588,7 +2588,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * @param string|null $store Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentResponse.php b/src/Adyen/Model/Checkout/PaymentResponse.php index 48ba79562..fba8f58db 100644 --- a/src/Adyen/Model/Checkout/PaymentResponse.php +++ b/src/Adyen/Model/Checkout/PaymentResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index fc604a4c6..430813bf3 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -489,7 +489,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentReversalRequest.php b/src/Adyen/Model/Checkout/PaymentReversalRequest.php index d4be8565d..fb40a106f 100644 --- a/src/Adyen/Model/Checkout/PaymentReversalRequest.php +++ b/src/Adyen/Model/Checkout/PaymentReversalRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentReversalResponse.php b/src/Adyen/Model/Checkout/PaymentReversalResponse.php index 63fb75b1f..d87d48939 100644 --- a/src/Adyen/Model/Checkout/PaymentReversalResponse.php +++ b/src/Adyen/Model/Checkout/PaymentReversalResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index ec6330fea..2c0f6051f 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -2142,7 +2142,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * @param string|null $store Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentSetupResponse.php b/src/Adyen/Model/Checkout/PaymentSetupResponse.php index c7d02291d..bc7a5939a 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupResponse.php +++ b/src/Adyen/Model/Checkout/PaymentSetupResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentVerificationRequest.php b/src/Adyen/Model/Checkout/PaymentVerificationRequest.php index 443f7f864..c8f4a44bf 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationRequest.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php index c9b977d2a..6e39d647e 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Phone.php b/src/Adyen/Model/Checkout/Phone.php index 4aa0a5146..46e953f04 100644 --- a/src/Adyen/Model/Checkout/Phone.php +++ b/src/Adyen/Model/Checkout/Phone.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php index 644e700d3..9a8a9a9d6 100644 --- a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index dbebc29e2..3199e027a 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Recurring.php b/src/Adyen/Model/Checkout/Recurring.php index cf97d5983..ed32b6e4e 100644 --- a/src/Adyen/Model/Checkout/Recurring.php +++ b/src/Adyen/Model/Checkout/Recurring.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/RecurringDetail.php b/src/Adyen/Model/Checkout/RecurringDetail.php index 73afd110a..707898987 100644 --- a/src/Adyen/Model/Checkout/RecurringDetail.php +++ b/src/Adyen/Model/Checkout/RecurringDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -275,6 +275,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; /** @@ -285,6 +286,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php index 8de34deac..1ab39830c 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php index 0fddc94e8..3a0085bc5 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php index 0a1bc3ed2..939c53a34 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index 029d37da3..d759f685a 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php new file mode 100644 index 000000000..72d8c8954 --- /dev/null +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php @@ -0,0 +1,444 @@ + + */ +class ResponseAdditionalDataDomesticError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataDomesticError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'domesticRefusalReasonRaw' => 'string', + 'domesticShopperAdvice' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'domesticRefusalReasonRaw' => null, + 'domesticShopperAdvice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'domesticRefusalReasonRaw' => false, + 'domesticShopperAdvice' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domesticRefusalReasonRaw' => 'domesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'domesticShopperAdvice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domesticRefusalReasonRaw' => 'setDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'setDomesticShopperAdvice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domesticRefusalReasonRaw' => 'getDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'getDomesticShopperAdvice' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('domesticRefusalReasonRaw', $data ?? [], null); + $this->setIfExists('domesticShopperAdvice', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domesticRefusalReasonRaw + * + * @return string|null + */ + public function getDomesticRefusalReasonRaw() + { + return $this->container['domesticRefusalReasonRaw']; + } + + /** + * Sets domesticRefusalReasonRaw + * + * @param string|null $domesticRefusalReasonRaw The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + * + * @return self + */ + public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) + { + if (is_null($domesticRefusalReasonRaw)) { + throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); + } + $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; + + return $this; + } + + /** + * Gets domesticShopperAdvice + * + * @return string|null + */ + public function getDomesticShopperAdvice() + { + return $this->container['domesticShopperAdvice']; + } + + /** + * Sets domesticShopperAdvice + * + * @param string|null $domesticShopperAdvice The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + * + * @return self + */ + public function setDomesticShopperAdvice($domesticShopperAdvice) + { + if (is_null($domesticShopperAdvice)) { + throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); + } + $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + 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 + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php index 4da777372..496f1f62c 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php index 80886a6ab..9232b3464 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php index d277ba45b..1c9faaefc 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php index ec54984a0..f187eaef8 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponsePaymentMethod.php b/src/Adyen/Model/Checkout/ResponsePaymentMethod.php index 11aa38a7e..ce2166366 100644 --- a/src/Adyen/Model/Checkout/ResponsePaymentMethod.php +++ b/src/Adyen/Model/Checkout/ResponsePaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/RiskData.php b/src/Adyen/Model/Checkout/RiskData.php index ac4ef78ee..19f293e8c 100644 --- a/src/Adyen/Model/Checkout/RiskData.php +++ b/src/Adyen/Model/Checkout/RiskData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SDKEphemPubKey.php b/src/Adyen/Model/Checkout/SDKEphemPubKey.php index fbce1da2c..a316c5d1a 100644 --- a/src/Adyen/Model/Checkout/SDKEphemPubKey.php +++ b/src/Adyen/Model/Checkout/SDKEphemPubKey.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index cc922c894..7c1ef8bdc 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_SAMSUNGPAY = 'samsungpay'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index 0635420c6..e39115595 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ServiceError.php b/src/Adyen/Model/Checkout/ServiceError.php index 2f97c4743..b432bf940 100644 --- a/src/Adyen/Model/Checkout/ServiceError.php +++ b/src/Adyen/Model/Checkout/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ServiceErrorDetails.php b/src/Adyen/Model/Checkout/ServiceErrorDetails.php index 701138745..561f535f5 100644 --- a/src/Adyen/Model/Checkout/ServiceErrorDetails.php +++ b/src/Adyen/Model/Checkout/ServiceErrorDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SessionResultResponse.php b/src/Adyen/Model/Checkout/SessionResultResponse.php index 44d1ebe2a..bc3ddc442 100644 --- a/src/Adyen/Model/Checkout/SessionResultResponse.php +++ b/src/Adyen/Model/Checkout/SessionResultResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ShopperInput.php b/src/Adyen/Model/Checkout/ShopperInput.php index c04ab46c5..bda383fde 100644 --- a/src/Adyen/Model/Checkout/ShopperInput.php +++ b/src/Adyen/Model/Checkout/ShopperInput.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ShopperInteractionDevice.php b/src/Adyen/Model/Checkout/ShopperInteractionDevice.php index 14f142286..19131fd56 100644 --- a/src/Adyen/Model/Checkout/ShopperInteractionDevice.php +++ b/src/Adyen/Model/Checkout/ShopperInteractionDevice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Split.php b/src/Adyen/Model/Checkout/Split.php index 8cf9df6fd..dc9187aba 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -450,7 +450,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + * @param string|null $reference Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. * * @return self */ diff --git a/src/Adyen/Model/Checkout/SplitAmount.php b/src/Adyen/Model/Checkout/SplitAmount.php index 39578e506..9437d3690 100644 --- a/src/Adyen/Model/Checkout/SplitAmount.php +++ b/src/Adyen/Model/Checkout/SplitAmount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php b/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php index 7e17bd29d..f597e7696 100644 --- a/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php +++ b/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php b/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php index 4f289532e..ed614af1d 100644 --- a/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php +++ b/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StoredDetails.php b/src/Adyen/Model/Checkout/StoredDetails.php index 50df03522..f9c0ea234 100644 --- a/src/Adyen/Model/Checkout/StoredDetails.php +++ b/src/Adyen/Model/Checkout/StoredDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethod.php b/src/Adyen/Model/Checkout/StoredPaymentMethod.php index ce75d3d85..d8c629542 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethod.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -44,12 +44,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankLocationId' => 'string', 'brand' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', 'holderName' => 'string', 'iban' => 'string', 'id' => 'string', + 'label' => 'string', 'lastFour' => 'string', 'name' => 'string', 'networkTxReference' => 'string', @@ -68,12 +71,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ + 'bankAccountNumber' => null, + 'bankLocationId' => null, 'brand' => null, 'expiryMonth' => null, 'expiryYear' => null, 'holderName' => null, 'iban' => null, 'id' => null, + 'label' => null, 'lastFour' => null, 'name' => null, 'networkTxReference' => null, @@ -90,12 +96,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankLocationId' => false, 'brand' => false, 'expiryMonth' => false, 'expiryYear' => false, 'holderName' => false, 'iban' => false, 'id' => false, + 'label' => false, 'lastFour' => false, 'name' => false, 'networkTxReference' => false, @@ -192,12 +201,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankLocationId' => 'bankLocationId', 'brand' => 'brand', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', 'holderName' => 'holderName', 'iban' => 'iban', 'id' => 'id', + 'label' => 'label', 'lastFour' => 'lastFour', 'name' => 'name', 'networkTxReference' => 'networkTxReference', @@ -214,12 +226,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankLocationId' => 'setBankLocationId', 'brand' => 'setBrand', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', 'holderName' => 'setHolderName', 'iban' => 'setIban', 'id' => 'setId', + 'label' => 'setLabel', 'lastFour' => 'setLastFour', 'name' => 'setName', 'networkTxReference' => 'setNetworkTxReference', @@ -236,12 +251,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankLocationId' => 'getBankLocationId', 'brand' => 'getBrand', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', 'holderName' => 'getHolderName', 'iban' => 'getIban', 'id' => 'getId', + 'label' => 'getLabel', 'lastFour' => 'getLastFour', 'name' => 'getName', 'networkTxReference' => 'getNetworkTxReference', @@ -309,12 +327,15 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); $this->setIfExists('lastFour', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('networkTxReference', $data ?? [], null); @@ -367,6 +388,60 @@ public function valid() } + /** + * Gets bankAccountNumber + * + * @return string|null + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string|null $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + if (is_null($bankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); + } + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The location id of the bank. The field value is `nil` in most cases. + * + * @return self + */ + public function setBankLocationId($bankLocationId) + { + if (is_null($bankLocationId)) { + throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + } + $this->container['bankLocationId'] = $bankLocationId; + + return $this; + } + /** * Gets brand * @@ -529,6 +604,33 @@ public function setId($id) return $this; } + /** + * Gets label + * + * @return string|null + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label The shopper’s issuer account label + * + * @return self + */ + public function setLabel($label) + { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** * Gets lastFour * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index e6b79cebf..db1eca156 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php index 4ce608b05..2646a5678 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SubInputDetail.php b/src/Adyen/Model/Checkout/SubInputDetail.php index 482b0cb87..d380d302e 100644 --- a/src/Adyen/Model/Checkout/SubInputDetail.php +++ b/src/Adyen/Model/Checkout/SubInputDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SubMerchant.php b/src/Adyen/Model/Checkout/SubMerchant.php index c668999b9..56ac38965 100644 --- a/src/Adyen/Model/Checkout/SubMerchant.php +++ b/src/Adyen/Model/Checkout/SubMerchant.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SubMerchantInfo.php b/src/Adyen/Model/Checkout/SubMerchantInfo.php index 99e694db2..cc9ee57b1 100644 --- a/src/Adyen/Model/Checkout/SubMerchantInfo.php +++ b/src/Adyen/Model/Checkout/SubMerchantInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index 17a4cf692..b1e4a18a8 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -61,6 +61,7 @@ class ThreeDS2RequestData implements ModelInterface, ArrayAccess, \JsonSerializa 'notificationURL' => 'string', 'payTokenInd' => 'bool', 'paymentAuthenticationUseCase' => 'string', + 'platform' => 'string', 'purchaseInstalData' => 'string', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -110,6 +111,7 @@ class ThreeDS2RequestData implements ModelInterface, ArrayAccess, \JsonSerializa 'notificationURL' => null, 'payTokenInd' => null, 'paymentAuthenticationUseCase' => null, + 'platform' => null, 'purchaseInstalData' => null, 'recurringExpiry' => null, 'recurringFrequency' => null, @@ -157,6 +159,7 @@ class ThreeDS2RequestData implements ModelInterface, ArrayAccess, \JsonSerializa 'notificationURL' => false, 'payTokenInd' => false, 'paymentAuthenticationUseCase' => false, + 'platform' => false, 'purchaseInstalData' => false, 'recurringExpiry' => false, 'recurringFrequency' => false, @@ -284,6 +287,7 @@ public function isNullableSetToNull(string $property): bool 'notificationURL' => 'notificationURL', 'payTokenInd' => 'payTokenInd', 'paymentAuthenticationUseCase' => 'paymentAuthenticationUseCase', + 'platform' => 'platform', 'purchaseInstalData' => 'purchaseInstalData', 'recurringExpiry' => 'recurringExpiry', 'recurringFrequency' => 'recurringFrequency', @@ -331,6 +335,7 @@ public function isNullableSetToNull(string $property): bool 'notificationURL' => 'setNotificationURL', 'payTokenInd' => 'setPayTokenInd', 'paymentAuthenticationUseCase' => 'setPaymentAuthenticationUseCase', + 'platform' => 'setPlatform', 'purchaseInstalData' => 'setPurchaseInstalData', 'recurringExpiry' => 'setRecurringExpiry', 'recurringFrequency' => 'setRecurringFrequency', @@ -378,6 +383,7 @@ public function isNullableSetToNull(string $property): bool 'notificationURL' => 'getNotificationURL', 'payTokenInd' => 'getPayTokenInd', 'paymentAuthenticationUseCase' => 'getPaymentAuthenticationUseCase', + 'platform' => 'getPlatform', 'purchaseInstalData' => 'getPurchaseInstalData', 'recurringExpiry' => 'getRecurringExpiry', 'recurringFrequency' => 'getRecurringFrequency', @@ -452,6 +458,9 @@ public function getModelName() public const CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE = 'requestNoChallenge'; public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE = 'requestChallenge'; public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE = 'requestChallengeAsMandate'; + public const PLATFORM_I_OS = 'iOS'; + public const PLATFORM_ANDROID = 'android'; + public const PLATFORM_BROWSER = 'browser'; public const THREE_DS_REQUESTOR_CHALLENGE_IND__01 = '01'; public const THREE_DS_REQUESTOR_CHALLENGE_IND__02 = '02'; public const THREE_DS_REQUESTOR_CHALLENGE_IND__03 = '03'; @@ -508,6 +517,19 @@ public function getChallengeIndicatorAllowableValues() self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_I_OS, + self::PLATFORM_ANDROID, + self::PLATFORM_BROWSER, + ]; + } /** * Gets allowable values of the enum * @@ -586,6 +608,7 @@ public function __construct(array $data = null) $this->setIfExists('notificationURL', $data ?? [], null); $this->setIfExists('payTokenInd', $data ?? [], null); $this->setIfExists('paymentAuthenticationUseCase', $data ?? [], null); + $this->setIfExists('platform', $data ?? [], null); $this->setIfExists('purchaseInstalData', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); $this->setIfExists('recurringFrequency', $data ?? [], null); @@ -667,6 +690,15 @@ public function listInvalidProperties() if ($this->container['deviceChannel'] === null) { $invalidProperties[] = "'deviceChannel' can't be null"; } + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'platform', must be one of '%s'", + $this->container['platform'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); if (!is_null($this->container['threeDSRequestorChallengeInd']) && !in_array($this->container['threeDSRequestorChallengeInd'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -1202,6 +1234,43 @@ public function setPaymentAuthenticationUseCase($paymentAuthenticationUseCase) return $this; } + /** + * Gets platform + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform The platform of the shopper. Allowed values: * `iOS` * `android` * `browser` + * + * @return self + */ + public function setPlatform($platform) + { + if (is_null($platform)) { + throw new \InvalidArgumentException('non-nullable platform cannot be null'); + } + $allowedValues = $this->getPlatformAllowableValues(); + if (!in_array($platform, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'platform', must be one of '%s'", + $platform, + implode("', '", $allowedValues) + ) + ); + } + $this->container['platform'] = $platform; + + return $this; + } + /** * Gets purchaseInstalData * diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php index b5dc0fa01..0d48bb8e0 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -60,6 +60,7 @@ class ThreeDS2RequestFields implements ModelInterface, ArrayAccess, \JsonSeriali 'notificationURL' => 'string', 'payTokenInd' => 'bool', 'paymentAuthenticationUseCase' => 'string', + 'platform' => 'string', 'purchaseInstalData' => 'string', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -106,6 +107,7 @@ class ThreeDS2RequestFields implements ModelInterface, ArrayAccess, \JsonSeriali 'notificationURL' => null, 'payTokenInd' => null, 'paymentAuthenticationUseCase' => null, + 'platform' => null, 'purchaseInstalData' => null, 'recurringExpiry' => null, 'recurringFrequency' => null, @@ -150,6 +152,7 @@ class ThreeDS2RequestFields implements ModelInterface, ArrayAccess, \JsonSeriali 'notificationURL' => false, 'payTokenInd' => false, 'paymentAuthenticationUseCase' => false, + 'platform' => false, 'purchaseInstalData' => false, 'recurringExpiry' => false, 'recurringFrequency' => false, @@ -274,6 +277,7 @@ public function isNullableSetToNull(string $property): bool 'notificationURL' => 'notificationURL', 'payTokenInd' => 'payTokenInd', 'paymentAuthenticationUseCase' => 'paymentAuthenticationUseCase', + 'platform' => 'platform', 'purchaseInstalData' => 'purchaseInstalData', 'recurringExpiry' => 'recurringExpiry', 'recurringFrequency' => 'recurringFrequency', @@ -318,6 +322,7 @@ public function isNullableSetToNull(string $property): bool 'notificationURL' => 'setNotificationURL', 'payTokenInd' => 'setPayTokenInd', 'paymentAuthenticationUseCase' => 'setPaymentAuthenticationUseCase', + 'platform' => 'setPlatform', 'purchaseInstalData' => 'setPurchaseInstalData', 'recurringExpiry' => 'setRecurringExpiry', 'recurringFrequency' => 'setRecurringFrequency', @@ -362,6 +367,7 @@ public function isNullableSetToNull(string $property): bool 'notificationURL' => 'getNotificationURL', 'payTokenInd' => 'getPayTokenInd', 'paymentAuthenticationUseCase' => 'getPaymentAuthenticationUseCase', + 'platform' => 'getPlatform', 'purchaseInstalData' => 'getPurchaseInstalData', 'recurringExpiry' => 'getRecurringExpiry', 'recurringFrequency' => 'getRecurringFrequency', @@ -434,6 +440,9 @@ public function getModelName() public const CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE = 'requestNoChallenge'; public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE = 'requestChallenge'; public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE = 'requestChallengeAsMandate'; + public const PLATFORM_I_OS = 'iOS'; + public const PLATFORM_ANDROID = 'android'; + public const PLATFORM_BROWSER = 'browser'; public const THREE_DS_REQUESTOR_CHALLENGE_IND__01 = '01'; public const THREE_DS_REQUESTOR_CHALLENGE_IND__02 = '02'; public const THREE_DS_REQUESTOR_CHALLENGE_IND__03 = '03'; @@ -490,6 +499,19 @@ public function getChallengeIndicatorAllowableValues() self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformAllowableValues() + { + return [ + self::PLATFORM_I_OS, + self::PLATFORM_ANDROID, + self::PLATFORM_BROWSER, + ]; + } /** * Gets allowable values of the enum * @@ -567,6 +589,7 @@ public function __construct(array $data = null) $this->setIfExists('notificationURL', $data ?? [], null); $this->setIfExists('payTokenInd', $data ?? [], null); $this->setIfExists('paymentAuthenticationUseCase', $data ?? [], null); + $this->setIfExists('platform', $data ?? [], null); $this->setIfExists('purchaseInstalData', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); $this->setIfExists('recurringFrequency', $data ?? [], null); @@ -643,6 +666,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getPlatformAllowableValues(); + if (!is_null($this->container['platform']) && !in_array($this->container['platform'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'platform', must be one of '%s'", + $this->container['platform'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); if (!is_null($this->container['threeDSRequestorChallengeInd']) && !in_array($this->container['threeDSRequestorChallengeInd'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -1151,6 +1183,43 @@ public function setPaymentAuthenticationUseCase($paymentAuthenticationUseCase) return $this; } + /** + * Gets platform + * + * @return string|null + */ + public function getPlatform() + { + return $this->container['platform']; + } + + /** + * Sets platform + * + * @param string|null $platform The platform of the shopper. Allowed values: * `iOS` * `android` * `browser` + * + * @return self + */ + public function setPlatform($platform) + { + if (is_null($platform)) { + throw new \InvalidArgumentException('non-nullable platform cannot be null'); + } + $allowedValues = $this->getPlatformAllowableValues(); + if (!in_array($platform, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'platform', must be one of '%s'", + $platform, + implode("', '", $allowedValues) + ) + ); + } + $this->container['platform'] = $platform; + + return $this; + } + /** * Gets purchaseInstalData * diff --git a/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php b/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php index 814d2b134..d19380ac2 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDS2Result.php b/src/Adyen/Model/Checkout/ThreeDS2Result.php index 1816fd270..34650bcc2 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2Result.php +++ b/src/Adyen/Model/Checkout/ThreeDS2Result.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestData.php b/src/Adyen/Model/Checkout/ThreeDSRequestData.php index 75877b11a..a6eea8561 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php b/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php index dfd93fbc8..b2a5def84 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php b/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php index f5f907a99..d5dd0f3b2 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSecureData.php b/src/Adyen/Model/Checkout/ThreeDSecureData.php index b094aa93e..3cd9e6ea8 100644 --- a/src/Adyen/Model/Checkout/ThreeDSecureData.php +++ b/src/Adyen/Model/Checkout/ThreeDSecureData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php b/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php index fd4bbb2a2..81569e3b0 100644 --- a/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index e30da7837..ba94f7caa 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index 7d102001c..31d3a03b5 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UtilityRequest.php b/src/Adyen/Model/Checkout/UtilityRequest.php index 7779c2e39..3d7e80011 100644 --- a/src/Adyen/Model/Checkout/UtilityRequest.php +++ b/src/Adyen/Model/Checkout/UtilityRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UtilityResponse.php b/src/Adyen/Model/Checkout/UtilityResponse.php index 471b73471..317109d5d 100644 --- a/src/Adyen/Model/Checkout/UtilityResponse.php +++ b/src/Adyen/Model/Checkout/UtilityResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 620d0cb87..143c331a7 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index 527280fc8..4149d2ac0 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -233,6 +233,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_VISACHECKOUT = 'visacheckout'; @@ -244,6 +245,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/WeChatPayDetails.php b/src/Adyen/Model/Checkout/WeChatPayDetails.php index 2d98f3caf..b86c01e76 100644 --- a/src/Adyen/Model/Checkout/WeChatPayDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index bed02e9b2..d6c39a7d6 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index b84b68f42..40a3ea6bf 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php index 8c3906f5b..3b67f1ca0 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php @@ -820,6 +820,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php index d9894366a..1f74586a8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php @@ -786,6 +786,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php index a250dfd5b..5a7954cb8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php index e79ae279b..94b9d9afe 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php @@ -479,6 +479,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php index ea459e334..6ebb54753 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php @@ -684,6 +684,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Address.php b/src/Adyen/Model/ConfigurationWebhooks/Address.php index 787645886..927c30fbf 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Address.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Address.php @@ -554,6 +554,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Amount.php b/src/Adyen/Model/ConfigurationWebhooks/Amount.php index 4ffa0dd5d..cb21123d0 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Amount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Authentication.php b/src/Adyen/Model/ConfigurationWebhooks/Authentication.php index 122458187..411453ae7 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Authentication.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Authentication.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Balance.php b/src/Adyen/Model/ConfigurationWebhooks/Balance.php index e0b3ef81c..31a4660c9 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Balance.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Balance.php @@ -517,6 +517,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php index c90037367..42caf2cf6 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php @@ -786,6 +786,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php index ec202005b..5132009b0 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php index 2f02eca24..651ad07e0 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php @@ -479,6 +479,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php index 89b65a0bd..7ddd77978 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php b/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php index c56e87742..ec3739725 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php @@ -644,6 +644,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php index f71abfb4f..4b78e2b8f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php index 51b831b8e..e26aea7fe 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php @@ -506,6 +506,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php index 2f3d4b3a8..e96d057e3 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php @@ -472,6 +472,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 6c852042d..13a31e24c 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -565,6 +565,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Card.php b/src/Adyen/Model/ConfigurationWebhooks/Card.php index 168c5f6d8..a4ba0ed42 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Card.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Card.php @@ -827,6 +827,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php index 94d3cf388..1f7b91848 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php @@ -814,6 +814,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php index 196fd2c05..4272fa87f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php index 352b3a060..94dd81ed5 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php @@ -482,6 +482,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php index 3ccffe510..b47ddcb4b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php @@ -479,6 +479,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Contact.php b/src/Adyen/Model/ConfigurationWebhooks/Contact.php index b83261da9..e83c5ad97 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Contact.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Contact.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php b/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php index 4957ef197..fb005e0ac 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php @@ -480,6 +480,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Expiry.php b/src/Adyen/Model/ConfigurationWebhooks/Expiry.php index f5fd98fc5..06abdb1a1 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Expiry.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Expiry.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php index e042d075e..6cb755626 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php @@ -44,6 +44,7 @@ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ + 'formFactor' => 'string', 'iban' => 'string', 'type' => 'string' ]; @@ -56,6 +57,7 @@ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ + 'formFactor' => null, 'iban' => null, 'type' => null ]; @@ -66,6 +68,7 @@ class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static $openAPINullables = [ + 'formFactor' => true, 'iban' => false, 'type' => false ]; @@ -156,6 +159,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'formFactor' => 'formFactor', 'iban' => 'iban', 'type' => 'type' ]; @@ -166,6 +170,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'formFactor' => 'setFormFactor', 'iban' => 'setIban', 'type' => 'setType' ]; @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'formFactor' => 'getFormFactor', 'iban' => 'getIban', 'type' => 'getType' ]; @@ -249,6 +255,7 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -310,6 +317,40 @@ public function valid() } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 iban * @@ -440,6 +481,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Name.php b/src/Adyen/Model/ConfigurationWebhooks/Name.php index f225a122c..541b549cd 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Name.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Name.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php index 01648d10d..70585e7cd 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php @@ -767,6 +767,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php index d648d8fce..878ce648f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php @@ -45,6 +45,7 @@ class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ + 'formFactor' => 'string', 'iban' => 'string', 'type' => 'string', 'accountNumber' => 'string', @@ -60,6 +61,7 @@ class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'formFactor' => null, 'iban' => null, 'type' => null, 'accountNumber' => null, @@ -73,6 +75,7 @@ class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \Json * @var boolean[] */ protected static $openAPINullables = [ + 'formFactor' => true, 'iban' => false, 'type' => false, 'accountNumber' => false, @@ -166,6 +169,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'formFactor' => 'formFactor', 'iban' => 'iban', 'type' => 'type', 'accountNumber' => 'accountNumber', @@ -179,6 +183,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'formFactor' => 'setFormFactor', 'iban' => 'setIban', 'type' => 'setType', 'accountNumber' => 'setAccountNumber', @@ -192,6 +197,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'formFactor' => 'getFormFactor', 'iban' => 'getIban', 'type' => 'getType', 'accountNumber' => 'getAccountNumber', @@ -255,6 +261,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); @@ -318,6 +325,40 @@ public function valid() } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 iban * @@ -519,6 +560,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php index 9369138ee..39c982ae1 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentReference.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentReference.php index fcc91b2dc..42fdde78b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentReference.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentReference.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php index 09947cd8f..6965730a1 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php @@ -479,6 +479,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PersonalData.php b/src/Adyen/Model/ConfigurationWebhooks/PersonalData.php index 8f7aa4c38..e6a8ac037 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PersonalData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PersonalData.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Phone.php b/src/Adyen/Model/ConfigurationWebhooks/Phone.php index efe48cf3a..df0b1ae8a 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Phone.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Phone.php @@ -442,6 +442,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php b/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php index c2fc00ab9..8a7f85b39 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php index 1af47ae07..8b927e20e 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php @@ -401,6 +401,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php b/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php index a64f2d9a1..126a78b34 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php +++ b/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/Resource.php b/src/Adyen/Model/ConfigurationWebhooks/Resource.php index 60bee0855..6b1516e31 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Resource.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Resource.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php index 662709830..b3ed5650f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php index 1c9cab705..7801290fa 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php @@ -481,6 +481,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index 63499f5e8..89b6fcf65 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -848,6 +848,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php b/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php index 32e7041b2..d6a2f90eb 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php b/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php index 857fb0a7d..ce7b42fee 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php @@ -445,6 +445,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php index 9a4af774a..dd32e6973 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php @@ -46,6 +46,7 @@ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'accountNumber' => 'string', 'accountType' => 'string', + 'formFactor' => 'string', 'routingNumber' => 'string', 'type' => 'string' ]; @@ -60,6 +61,7 @@ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'accountNumber' => null, 'accountType' => null, + 'formFactor' => null, 'routingNumber' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'accountNumber' => false, 'accountType' => false, + 'formFactor' => true, 'routingNumber' => false, 'type' => false ]; @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountNumber' => 'accountNumber', 'accountType' => 'accountType', + 'formFactor' => 'formFactor', 'routingNumber' => 'routingNumber', 'type' => 'type' ]; @@ -176,6 +180,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountNumber' => 'setAccountNumber', 'accountType' => 'setAccountType', + 'formFactor' => 'setFormFactor', 'routingNumber' => 'setRoutingNumber', 'type' => 'setType' ]; @@ -188,6 +193,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountNumber' => 'getAccountNumber', 'accountType' => 'getAccountType', + 'formFactor' => 'getFormFactor', 'routingNumber' => 'getRoutingNumber', 'type' => 'getType' ]; @@ -277,6 +283,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -414,6 +421,40 @@ public function setAccountType($accountType) return $this; } + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor The form factor of bank account. + * + * @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 routingNumber * @@ -544,6 +585,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php index b5de6ad6c..78d607ee4 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php @@ -562,6 +562,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php index d81176b13..dee6e43f6 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php @@ -693,6 +693,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 * diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php index b575ee35c..8ffeb999b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php @@ -659,6 +659,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 * diff --git a/src/Adyen/Model/DataProtection/ServiceError.php b/src/Adyen/Model/DataProtection/ServiceError.php index 27dd410e6..f214ee555 100644 --- a/src/Adyen/Model/DataProtection/ServiceError.php +++ b/src/Adyen/Model/DataProtection/ServiceError.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php b/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php index 6d7032426..eb4446c35 100644 --- a/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php +++ b/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/DataProtection/SubjectErasureResponse.php b/src/Adyen/Model/DataProtection/SubjectErasureResponse.php index 628ef2260..79c486df1 100644 --- a/src/Adyen/Model/DataProtection/SubjectErasureResponse.php +++ b/src/Adyen/Model/DataProtection/SubjectErasureResponse.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Disputes/AcceptDisputeRequest.php b/src/Adyen/Model/Disputes/AcceptDisputeRequest.php index 551e630dd..bcacbc2bd 100644 --- a/src/Adyen/Model/Disputes/AcceptDisputeRequest.php +++ b/src/Adyen/Model/Disputes/AcceptDisputeRequest.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Disputes/AcceptDisputeResponse.php b/src/Adyen/Model/Disputes/AcceptDisputeResponse.php index 492a140e0..0bbeebbb6 100644 --- a/src/Adyen/Model/Disputes/AcceptDisputeResponse.php +++ b/src/Adyen/Model/Disputes/AcceptDisputeResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Disputes/DefendDisputeRequest.php b/src/Adyen/Model/Disputes/DefendDisputeRequest.php index 64a255824..51f562014 100644 --- a/src/Adyen/Model/Disputes/DefendDisputeRequest.php +++ b/src/Adyen/Model/Disputes/DefendDisputeRequest.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Disputes/DefendDisputeResponse.php b/src/Adyen/Model/Disputes/DefendDisputeResponse.php index 76e43fc2f..d3fd5a4ee 100644 --- a/src/Adyen/Model/Disputes/DefendDisputeResponse.php +++ b/src/Adyen/Model/Disputes/DefendDisputeResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Disputes/DefenseDocument.php b/src/Adyen/Model/Disputes/DefenseDocument.php index 9a148627d..0355f258b 100644 --- a/src/Adyen/Model/Disputes/DefenseDocument.php +++ b/src/Adyen/Model/Disputes/DefenseDocument.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Disputes/DefenseDocumentType.php b/src/Adyen/Model/Disputes/DefenseDocumentType.php index bc4814653..71a56a253 100644 --- a/src/Adyen/Model/Disputes/DefenseDocumentType.php +++ b/src/Adyen/Model/Disputes/DefenseDocumentType.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Disputes/DefenseReason.php b/src/Adyen/Model/Disputes/DefenseReason.php index 50788717b..011835b31 100644 --- a/src/Adyen/Model/Disputes/DefenseReason.php +++ b/src/Adyen/Model/Disputes/DefenseReason.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/Disputes/DefenseReasonsRequest.php b/src/Adyen/Model/Disputes/DefenseReasonsRequest.php index 9d4d2e258..92edfae60 100644 --- a/src/Adyen/Model/Disputes/DefenseReasonsRequest.php +++ b/src/Adyen/Model/Disputes/DefenseReasonsRequest.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Disputes/DefenseReasonsResponse.php b/src/Adyen/Model/Disputes/DefenseReasonsResponse.php index d645f0456..9b2e7243e 100644 --- a/src/Adyen/Model/Disputes/DefenseReasonsResponse.php +++ b/src/Adyen/Model/Disputes/DefenseReasonsResponse.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php b/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php index c8d6464da..d4c21d8a4 100644 --- a/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php +++ b/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php b/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php index fb087b0aa..42e9eb4d0 100644 --- a/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php +++ b/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Disputes/DisputeServiceResult.php b/src/Adyen/Model/Disputes/DisputeServiceResult.php index 3989ff076..6d21cc453 100644 --- a/src/Adyen/Model/Disputes/DisputeServiceResult.php +++ b/src/Adyen/Model/Disputes/DisputeServiceResult.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Disputes/ServiceError.php b/src/Adyen/Model/Disputes/ServiceError.php index 811062597..42312758c 100644 --- a/src/Adyen/Model/Disputes/ServiceError.php +++ b/src/Adyen/Model/Disputes/ServiceError.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php b/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php index 79a9bc138..57b7c7a57 100644 --- a/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php +++ b/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php b/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php index e31e97dfc..46f5c521a 100644 --- a/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php +++ b/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php index e194c1878..bfffb3d05 100644 --- a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php index 94a7ec489..cf2b705eb 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php index 080605537..181b59f62 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php @@ -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 * diff --git a/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php b/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php index 676c8a433..28ffd6d90 100644 --- a/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php @@ -436,6 +436,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Address.php b/src/Adyen/Model/LegalEntityManagement/Address.php index d4cefb518..5e3225e9b 100644 --- a/src/Adyen/Model/LegalEntityManagement/Address.php +++ b/src/Adyen/Model/LegalEntityManagement/Address.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Amount.php b/src/Adyen/Model/LegalEntityManagement/Amount.php index b071d39a5..9dc680928 100644 --- a/src/Adyen/Model/LegalEntityManagement/Amount.php +++ b/src/Adyen/Model/LegalEntityManagement/Amount.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Attachment.php b/src/Adyen/Model/LegalEntityManagement/Attachment.php index 02bec2207..32d8a1db8 100644 --- a/src/Adyen/Model/LegalEntityManagement/Attachment.php +++ b/src/Adyen/Model/LegalEntityManagement/Attachment.php @@ -512,6 +512,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 2333f2037..c7aaf2285 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -507,6 +507,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php index 920877be4..5970b4547 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php @@ -849,6 +849,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BirthData.php b/src/Adyen/Model/LegalEntityManagement/BirthData.php index 6adbfe991..2ea36e674 100644 --- a/src/Adyen/Model/LegalEntityManagement/BirthData.php +++ b/src/Adyen/Model/LegalEntityManagement/BirthData.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 0b2215644..b104fe1d8 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -757,6 +757,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index 4b28ccdd1..bb495a7a9 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -686,6 +686,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php index 29bcef54d..9229f0aae 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php @@ -677,6 +677,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLines.php b/src/Adyen/Model/LegalEntityManagement/BusinessLines.php index d45f532d7..c01988ce2 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLines.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLines.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php index 02cd58953..25e0be251 100644 --- a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php @@ -581,6 +581,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php index c21d3687c..2557e462f 100644 --- a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php index 0c10246a1..790ee1131 100644 --- a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php @@ -402,6 +402,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php index d2a681c1c..6e08ff224 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php index b3c3d08c2..fb072cfc4 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php @@ -508,6 +508,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php index 82a4924b4..d312109a0 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php b/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php index bf867e805..a4b601ae7 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php @@ -565,6 +565,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php index 46d3dc8f2..cb9af917c 100644 --- a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php index a3190a287..56e2daf46 100644 --- a/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index e2e5ec13c..ee2dab0a4 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -846,6 +846,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentPage.php b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php index 8c95e946f..c4cf5ea97 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentPage.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php @@ -470,6 +470,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php index d24052b90..aa723279c 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/EntityReference.php b/src/Adyen/Model/LegalEntityManagement/EntityReference.php index 50012c626..10c7f659d 100644 --- a/src/Adyen/Model/LegalEntityManagement/EntityReference.php +++ b/src/Adyen/Model/LegalEntityManagement/EntityReference.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php index 310815ec2..b638b8296 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php @@ -430,6 +430,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php index 9bda141f6..8ffcd2f67 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php index 3b04bf07f..d04331515 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php index a978ccb83..7b85e1cff 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php index 3fba7582d..bd773de3d 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index 6056932dd..e19d58838 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -452,6 +452,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index 280f3b304..6acacc0a0 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -548,6 +548,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index 9e31f1ade..e3e770710 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php index 72ed39f5b..6212e3566 100644 --- a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php index 2f16170ea..368779a23 100644 --- a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index bab2a7281..cdebc4e75 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -609,6 +609,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Individual.php b/src/Adyen/Model/LegalEntityManagement/Individual.php index 8feba1db5..219960f33 100644 --- a/src/Adyen/Model/LegalEntityManagement/Individual.php +++ b/src/Adyen/Model/LegalEntityManagement/Individual.php @@ -647,6 +647,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 1dfb0f322..6a37cf9fb 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -923,6 +923,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 35992e935..edb900bd9 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -636,6 +636,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php index 7ba6346ba..446a56dff 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php @@ -681,6 +681,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 7ea2abf94..1dbbc4f9a 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -714,6 +714,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 21af57d0b..61c917ee1 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -717,6 +717,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php index 28a6281cd..92df37778 100644 --- a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php index 049146da9..a643325f2 100644 --- a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Name.php b/src/Adyen/Model/LegalEntityManagement/Name.php index c0a3bc849..ef0a284de 100644 --- a/src/Adyen/Model/LegalEntityManagement/Name.php +++ b/src/Adyen/Model/LegalEntityManagement/Name.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php index e1782360f..6ff8ea1bf 100644 --- a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php @@ -511,6 +511,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php index 10b241e94..877cc33b9 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index 909ccc343..2fe4359be 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php b/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php index 3072104b7..46fcf1e92 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php b/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php index 38d5c58cb..03e9a266a 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index f0616c5f2..c3c052dbf 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -959,6 +959,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php b/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php index f45606a92..4224ab381 100644 --- a/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php index a750b1a18..876f046c3 100644 --- a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php b/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php index 6e200137e..44c53e971 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php b/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php index 8f460058f..f7baadfb2 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php b/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php index d2aecfca8..7ee59bddb 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php b/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php index 7b81931a7..13453daf2 100644 --- a/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php +++ b/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php b/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php index 13829c620..49bcfb6f7 100644 --- a/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php +++ b/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php index e80a7ca90..38ea6f97b 100644 --- a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php index 9a1375a9f..2c71cebfe 100644 --- a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/ServiceError.php b/src/Adyen/Model/LegalEntityManagement/ServiceError.php index 665c8f9a6..38bb01c60 100644 --- a/src/Adyen/Model/LegalEntityManagement/ServiceError.php +++ b/src/Adyen/Model/LegalEntityManagement/ServiceError.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index c3bb83849..994f4f7f8 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -751,6 +751,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php index 0d148cc16..f2bd1761e 100644 --- a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php +++ b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php @@ -504,6 +504,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/StockData.php b/src/Adyen/Model/LegalEntityManagement/StockData.php index 9a5f157c3..a43d3c0c0 100644 --- a/src/Adyen/Model/LegalEntityManagement/StockData.php +++ b/src/Adyen/Model/LegalEntityManagement/StockData.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php index a48b4269e..0dcc3bfed 100644 --- a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/TaxInformation.php b/src/Adyen/Model/LegalEntityManagement/TaxInformation.php index e661f8637..edd4a0436 100644 --- a/src/Adyen/Model/LegalEntityManagement/TaxInformation.php +++ b/src/Adyen/Model/LegalEntityManagement/TaxInformation.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php b/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php index 786efd19e..ec65bd65d 100644 --- a/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php +++ b/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php @@ -588,6 +588,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php index 0a1c5c0d5..ebf77e7a9 100644 --- a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php @@ -548,6 +548,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php index 4fa7d1c74..be950df92 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php @@ -618,6 +618,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php index 466793228..457d51187 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php @@ -479,6 +479,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php index f6f43352a..9ecd17eae 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/Trust.php b/src/Adyen/Model/LegalEntityManagement/Trust.php index 38293579d..50ec3d221 100644 --- a/src/Adyen/Model/LegalEntityManagement/Trust.php +++ b/src/Adyen/Model/LegalEntityManagement/Trust.php @@ -881,6 +881,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php index 72f26d9bf..74dc8611f 100644 --- a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php index e1f100e15..924e50527 100644 --- a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php @@ -544,6 +544,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php index ef290e6ca..46a0c5d5c 100644 --- a/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php +++ b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php index bddb66382..3d3088e1a 100644 --- a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php +++ b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php @@ -847,6 +847,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php index 5e6ef5eea..e9ad92f21 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php @@ -562,6 +562,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationError.php b/src/Adyen/Model/LegalEntityManagement/VerificationError.php index e58f91b95..fb6a8cccb 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationError.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationError.php @@ -697,6 +697,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php index 74af27830..b867127a9 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php @@ -663,6 +663,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php index 96dda6e49..813908555 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/WebData.php b/src/Adyen/Model/LegalEntityManagement/WebData.php index ce592265c..a6d370a50 100644 --- a/src/Adyen/Model/LegalEntityManagement/WebData.php +++ b/src/Adyen/Model/LegalEntityManagement/WebData.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php b/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php index e2d27d8b5..e61f6987e 100644 --- a/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php +++ b/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php @@ -402,6 +402,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 * diff --git a/src/Adyen/Model/Management/AdditionalCommission.php b/src/Adyen/Model/Management/AdditionalCommission.php index f777f9a43..07afc2959 100644 --- a/src/Adyen/Model/Management/AdditionalCommission.php +++ b/src/Adyen/Model/Management/AdditionalCommission.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/AdditionalSettings.php b/src/Adyen/Model/Management/AdditionalSettings.php index 4b380b1be..a6cb7f891 100644 --- a/src/Adyen/Model/Management/AdditionalSettings.php +++ b/src/Adyen/Model/Management/AdditionalSettings.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/AdditionalSettingsResponse.php b/src/Adyen/Model/Management/AdditionalSettingsResponse.php index 59eae83b9..e9919040c 100644 --- a/src/Adyen/Model/Management/AdditionalSettingsResponse.php +++ b/src/Adyen/Model/Management/AdditionalSettingsResponse.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/Address.php b/src/Adyen/Model/Management/Address.php index c67bf9062..cf7e987ad 100644 --- a/src/Adyen/Model/Management/Address.php +++ b/src/Adyen/Model/Management/Address.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/Management/AfterpayTouchInfo.php b/src/Adyen/Model/Management/AfterpayTouchInfo.php index 60d9a2c65..896c2f093 100644 --- a/src/Adyen/Model/Management/AfterpayTouchInfo.php +++ b/src/Adyen/Model/Management/AfterpayTouchInfo.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/AllowedOrigin.php b/src/Adyen/Model/Management/AllowedOrigin.php index 549d67dbd..892c9cd23 100644 --- a/src/Adyen/Model/Management/AllowedOrigin.php +++ b/src/Adyen/Model/Management/AllowedOrigin.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Management/AllowedOriginsResponse.php b/src/Adyen/Model/Management/AllowedOriginsResponse.php index 40f263181..8565121ea 100644 --- a/src/Adyen/Model/Management/AllowedOriginsResponse.php +++ b/src/Adyen/Model/Management/AllowedOriginsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Amount.php b/src/Adyen/Model/Management/Amount.php index ccaf8f2ff..326940096 100644 --- a/src/Adyen/Model/Management/Amount.php +++ b/src/Adyen/Model/Management/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index a557147a2..4789848e0 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -611,6 +611,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 * diff --git a/src/Adyen/Model/Management/AndroidAppsResponse.php b/src/Adyen/Model/Management/AndroidAppsResponse.php index 967ceb43a..3192b5afb 100644 --- a/src/Adyen/Model/Management/AndroidAppsResponse.php +++ b/src/Adyen/Model/Management/AndroidAppsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/AndroidCertificate.php b/src/Adyen/Model/Management/AndroidCertificate.php index f7fc70286..6ef978cb6 100644 --- a/src/Adyen/Model/Management/AndroidCertificate.php +++ b/src/Adyen/Model/Management/AndroidCertificate.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/Management/AndroidCertificatesResponse.php b/src/Adyen/Model/Management/AndroidCertificatesResponse.php index 3cba386a8..94dc61bbe 100644 --- a/src/Adyen/Model/Management/AndroidCertificatesResponse.php +++ b/src/Adyen/Model/Management/AndroidCertificatesResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/ApiCredential.php b/src/Adyen/Model/Management/ApiCredential.php index 6c107e472..a87bd2d31 100644 --- a/src/Adyen/Model/Management/ApiCredential.php +++ b/src/Adyen/Model/Management/ApiCredential.php @@ -659,6 +659,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 * diff --git a/src/Adyen/Model/Management/ApiCredentialLinks.php b/src/Adyen/Model/Management/ApiCredentialLinks.php index 29b9e8728..1783ba269 100644 --- a/src/Adyen/Model/Management/ApiCredentialLinks.php +++ b/src/Adyen/Model/Management/ApiCredentialLinks.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/Management/ApplePayInfo.php b/src/Adyen/Model/Management/ApplePayInfo.php index 221f57f5a..0ca9f334e 100644 --- a/src/Adyen/Model/Management/ApplePayInfo.php +++ b/src/Adyen/Model/Management/ApplePayInfo.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/BcmcInfo.php b/src/Adyen/Model/Management/BcmcInfo.php index 03fbff963..09487fd0c 100644 --- a/src/Adyen/Model/Management/BcmcInfo.php +++ b/src/Adyen/Model/Management/BcmcInfo.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/BillingEntitiesResponse.php b/src/Adyen/Model/Management/BillingEntitiesResponse.php index 5d1bda016..7cca776cf 100644 --- a/src/Adyen/Model/Management/BillingEntitiesResponse.php +++ b/src/Adyen/Model/Management/BillingEntitiesResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/BillingEntity.php b/src/Adyen/Model/Management/BillingEntity.php index 8604d13d9..d4d24ca2e 100644 --- a/src/Adyen/Model/Management/BillingEntity.php +++ b/src/Adyen/Model/Management/BillingEntity.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Management/CardholderReceipt.php b/src/Adyen/Model/Management/CardholderReceipt.php index 9d8362799..0345558bc 100644 --- a/src/Adyen/Model/Management/CardholderReceipt.php +++ b/src/Adyen/Model/Management/CardholderReceipt.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/CartesBancairesInfo.php b/src/Adyen/Model/Management/CartesBancairesInfo.php index b5af56633..0bc970bfd 100644 --- a/src/Adyen/Model/Management/CartesBancairesInfo.php +++ b/src/Adyen/Model/Management/CartesBancairesInfo.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Management/ClearpayInfo.php b/src/Adyen/Model/Management/ClearpayInfo.php index 0e7337f25..5914d37e5 100644 --- a/src/Adyen/Model/Management/ClearpayInfo.php +++ b/src/Adyen/Model/Management/ClearpayInfo.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/Commission.php b/src/Adyen/Model/Management/Commission.php index 32cc56e29..9973ffe27 100644 --- a/src/Adyen/Model/Management/Commission.php +++ b/src/Adyen/Model/Management/Commission.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/Company.php b/src/Adyen/Model/Management/Company.php index 25186fa47..b91f84d1c 100644 --- a/src/Adyen/Model/Management/Company.php +++ b/src/Adyen/Model/Management/Company.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/Management/CompanyApiCredential.php b/src/Adyen/Model/Management/CompanyApiCredential.php index 680183f77..01d48aca4 100644 --- a/src/Adyen/Model/Management/CompanyApiCredential.php +++ b/src/Adyen/Model/Management/CompanyApiCredential.php @@ -693,6 +693,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 * diff --git a/src/Adyen/Model/Management/CompanyLinks.php b/src/Adyen/Model/Management/CompanyLinks.php index dfc42652a..373580a44 100644 --- a/src/Adyen/Model/Management/CompanyLinks.php +++ b/src/Adyen/Model/Management/CompanyLinks.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/Management/CompanyUser.php b/src/Adyen/Model/Management/CompanyUser.php index f3e5a6da7..82963ce8e 100644 --- a/src/Adyen/Model/Management/CompanyUser.php +++ b/src/Adyen/Model/Management/CompanyUser.php @@ -724,6 +724,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 * diff --git a/src/Adyen/Model/Management/Configuration.php b/src/Adyen/Model/Management/Configuration.php index a9f382eda..61a2ace68 100644 --- a/src/Adyen/Model/Management/Configuration.php +++ b/src/Adyen/Model/Management/Configuration.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index 0ee7039eb..7dbcfd0ac 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -402,6 +402,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 * diff --git a/src/Adyen/Model/Management/Contact.php b/src/Adyen/Model/Management/Contact.php index 746511b93..af2efaf79 100644 --- a/src/Adyen/Model/Management/Contact.php +++ b/src/Adyen/Model/Management/Contact.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Management/CreateAllowedOriginRequest.php b/src/Adyen/Model/Management/CreateAllowedOriginRequest.php index 3925f020d..5287ae56f 100644 --- a/src/Adyen/Model/Management/CreateAllowedOriginRequest.php +++ b/src/Adyen/Model/Management/CreateAllowedOriginRequest.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Management/CreateApiCredentialResponse.php b/src/Adyen/Model/Management/CreateApiCredentialResponse.php index d562b5462..d5fadaac7 100644 --- a/src/Adyen/Model/Management/CreateApiCredentialResponse.php +++ b/src/Adyen/Model/Management/CreateApiCredentialResponse.php @@ -733,6 +733,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 * diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php index eb2e65b2a..96e2813a0 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php index a4327385d..26b488eb8 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php @@ -770,6 +770,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 * diff --git a/src/Adyen/Model/Management/CreateCompanyUserRequest.php b/src/Adyen/Model/Management/CreateCompanyUserRequest.php index 4195c1cab..c4dfc07ea 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyUserRequest.php @@ -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 * diff --git a/src/Adyen/Model/Management/CreateCompanyUserResponse.php b/src/Adyen/Model/Management/CreateCompanyUserResponse.php index 70a59f175..533f33922 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyUserResponse.php @@ -724,6 +724,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 * diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index 6e8b6e1f0..37d3378de 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -1035,6 +1035,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 * diff --git a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php index 5db13d1cb..c7c174615 100644 --- a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/CreateMerchantRequest.php b/src/Adyen/Model/Management/CreateMerchantRequest.php index 8a6874c2b..80755e9f9 100644 --- a/src/Adyen/Model/Management/CreateMerchantRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantRequest.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/Management/CreateMerchantResponse.php b/src/Adyen/Model/Management/CreateMerchantResponse.php index ce91cce3c..a22cf0f09 100644 --- a/src/Adyen/Model/Management/CreateMerchantResponse.php +++ b/src/Adyen/Model/Management/CreateMerchantResponse.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/Management/CreateMerchantUserRequest.php b/src/Adyen/Model/Management/CreateMerchantUserRequest.php index 25fa87c08..227e03425 100644 --- a/src/Adyen/Model/Management/CreateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantUserRequest.php @@ -548,6 +548,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 * diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index 0fb742f5f..a9aca87a1 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -926,6 +926,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 * diff --git a/src/Adyen/Model/Management/CreateUserResponse.php b/src/Adyen/Model/Management/CreateUserResponse.php index 618975e12..78e0e7a9a 100644 --- a/src/Adyen/Model/Management/CreateUserResponse.php +++ b/src/Adyen/Model/Management/CreateUserResponse.php @@ -690,6 +690,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 * diff --git a/src/Adyen/Model/Management/Currency.php b/src/Adyen/Model/Management/Currency.php index 239103943..9a4a088ea 100644 --- a/src/Adyen/Model/Management/Currency.php +++ b/src/Adyen/Model/Management/Currency.php @@ -438,6 +438,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 * diff --git a/src/Adyen/Model/Management/CustomNotification.php b/src/Adyen/Model/Management/CustomNotification.php index a68c335be..b5ee7b316 100644 --- a/src/Adyen/Model/Management/CustomNotification.php +++ b/src/Adyen/Model/Management/CustomNotification.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/Management/DataCenter.php b/src/Adyen/Model/Management/DataCenter.php index 9294d77e9..7936ca800 100644 --- a/src/Adyen/Model/Management/DataCenter.php +++ b/src/Adyen/Model/Management/DataCenter.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/EventUrl.php b/src/Adyen/Model/Management/EventUrl.php index 02830bf2a..562b7cf71 100644 --- a/src/Adyen/Model/Management/EventUrl.php +++ b/src/Adyen/Model/Management/EventUrl.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/ExternalTerminalAction.php b/src/Adyen/Model/Management/ExternalTerminalAction.php index 9a30500a3..e3ced7bfd 100644 --- a/src/Adyen/Model/Management/ExternalTerminalAction.php +++ b/src/Adyen/Model/Management/ExternalTerminalAction.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Management/File.php b/src/Adyen/Model/Management/File.php index 159c18e57..0e1af202b 100644 --- a/src/Adyen/Model/Management/File.php +++ b/src/Adyen/Model/Management/File.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Management/GenerateApiKeyResponse.php b/src/Adyen/Model/Management/GenerateApiKeyResponse.php index 652966884..a010e6406 100644 --- a/src/Adyen/Model/Management/GenerateApiKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateApiKeyResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/GenerateClientKeyResponse.php b/src/Adyen/Model/Management/GenerateClientKeyResponse.php index a19db1457..c669d0e6f 100644 --- a/src/Adyen/Model/Management/GenerateClientKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateClientKeyResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/GenerateHmacKeyResponse.php b/src/Adyen/Model/Management/GenerateHmacKeyResponse.php index e8b980e0f..2dcc0fd62 100644 --- a/src/Adyen/Model/Management/GenerateHmacKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateHmacKeyResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/GenericPmWithTdiInfo.php b/src/Adyen/Model/Management/GenericPmWithTdiInfo.php index d5f5a6f2d..9df06b32b 100644 --- a/src/Adyen/Model/Management/GenericPmWithTdiInfo.php +++ b/src/Adyen/Model/Management/GenericPmWithTdiInfo.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/GiroPayInfo.php b/src/Adyen/Model/Management/GiroPayInfo.php index 43df4ee27..ab61e75fe 100644 --- a/src/Adyen/Model/Management/GiroPayInfo.php +++ b/src/Adyen/Model/Management/GiroPayInfo.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/GooglePayInfo.php b/src/Adyen/Model/Management/GooglePayInfo.php index 2f81200a8..50aee9869 100644 --- a/src/Adyen/Model/Management/GooglePayInfo.php +++ b/src/Adyen/Model/Management/GooglePayInfo.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Management/Gratuity.php b/src/Adyen/Model/Management/Gratuity.php index 4651d8b9e..1d435573e 100644 --- a/src/Adyen/Model/Management/Gratuity.php +++ b/src/Adyen/Model/Management/Gratuity.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/Hardware.php b/src/Adyen/Model/Management/Hardware.php index 8e44004d1..01691c51f 100644 --- a/src/Adyen/Model/Management/Hardware.php +++ b/src/Adyen/Model/Management/Hardware.php @@ -431,6 +431,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 * diff --git a/src/Adyen/Model/Management/IdName.php b/src/Adyen/Model/Management/IdName.php index 07e382ee6..454068c5a 100644 --- a/src/Adyen/Model/Management/IdName.php +++ b/src/Adyen/Model/Management/IdName.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index 1cb12dfef..a6b5f0d60 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -434,6 +434,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 * diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index 4b6aa1cfc..02a1e740d 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -434,6 +434,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 * diff --git a/src/Adyen/Model/Management/InvalidField.php b/src/Adyen/Model/Management/InvalidField.php index 81eefb4ff..9f310202f 100644 --- a/src/Adyen/Model/Management/InvalidField.php +++ b/src/Adyen/Model/Management/InvalidField.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Management/Key.php b/src/Adyen/Model/Management/Key.php index c6dc80547..4e7d93920 100644 --- a/src/Adyen/Model/Management/Key.php +++ b/src/Adyen/Model/Management/Key.php @@ -435,6 +435,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 * diff --git a/src/Adyen/Model/Management/KlarnaInfo.php b/src/Adyen/Model/Management/KlarnaInfo.php index f90ef76af..ed7d6a266 100644 --- a/src/Adyen/Model/Management/KlarnaInfo.php +++ b/src/Adyen/Model/Management/KlarnaInfo.php @@ -517,6 +517,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 * diff --git a/src/Adyen/Model/Management/Links.php b/src/Adyen/Model/Management/Links.php index 50b9d0ff0..4f23db803 100644 --- a/src/Adyen/Model/Management/Links.php +++ b/src/Adyen/Model/Management/Links.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/LinksElement.php b/src/Adyen/Model/Management/LinksElement.php index 80e6ec99d..8b158483a 100644 --- a/src/Adyen/Model/Management/LinksElement.php +++ b/src/Adyen/Model/Management/LinksElement.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php b/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php index f62020a54..ed3ca5dda 100644 --- a/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php +++ b/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListCompanyResponse.php b/src/Adyen/Model/Management/ListCompanyResponse.php index 3454c1308..9b7566543 100644 --- a/src/Adyen/Model/Management/ListCompanyResponse.php +++ b/src/Adyen/Model/Management/ListCompanyResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListCompanyUsersResponse.php b/src/Adyen/Model/Management/ListCompanyUsersResponse.php index 300bfe255..ddd46fe1b 100644 --- a/src/Adyen/Model/Management/ListCompanyUsersResponse.php +++ b/src/Adyen/Model/Management/ListCompanyUsersResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php b/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php index 299299c0c..fbe66ae12 100644 --- a/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php +++ b/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php b/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php index 48407c22f..65cd0c62c 100644 --- a/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php +++ b/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListMerchantResponse.php b/src/Adyen/Model/Management/ListMerchantResponse.php index e7acdef6e..667196d88 100644 --- a/src/Adyen/Model/Management/ListMerchantResponse.php +++ b/src/Adyen/Model/Management/ListMerchantResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListMerchantUsersResponse.php b/src/Adyen/Model/Management/ListMerchantUsersResponse.php index 245953425..df8f48ce4 100644 --- a/src/Adyen/Model/Management/ListMerchantUsersResponse.php +++ b/src/Adyen/Model/Management/ListMerchantUsersResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListStoresResponse.php b/src/Adyen/Model/Management/ListStoresResponse.php index 14ec68870..95706c604 100644 --- a/src/Adyen/Model/Management/ListStoresResponse.php +++ b/src/Adyen/Model/Management/ListStoresResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListTerminalsResponse.php b/src/Adyen/Model/Management/ListTerminalsResponse.php index 79f3acef8..7bc0c5bdf 100644 --- a/src/Adyen/Model/Management/ListTerminalsResponse.php +++ b/src/Adyen/Model/Management/ListTerminalsResponse.php @@ -473,6 +473,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 * diff --git a/src/Adyen/Model/Management/ListWebhooksResponse.php b/src/Adyen/Model/Management/ListWebhooksResponse.php index 3d6626eb8..d2901a6bb 100644 --- a/src/Adyen/Model/Management/ListWebhooksResponse.php +++ b/src/Adyen/Model/Management/ListWebhooksResponse.php @@ -507,6 +507,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 * diff --git a/src/Adyen/Model/Management/Localization.php b/src/Adyen/Model/Management/Localization.php index 8a234bf74..7ef8be02f 100644 --- a/src/Adyen/Model/Management/Localization.php +++ b/src/Adyen/Model/Management/Localization.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/Logo.php b/src/Adyen/Model/Management/Logo.php index 5ccea1755..95ccc0aa6 100644 --- a/src/Adyen/Model/Management/Logo.php +++ b/src/Adyen/Model/Management/Logo.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/MeApiCredential.php b/src/Adyen/Model/Management/MeApiCredential.php index 82ba25a7b..db1d3b229 100644 --- a/src/Adyen/Model/Management/MeApiCredential.php +++ b/src/Adyen/Model/Management/MeApiCredential.php @@ -727,6 +727,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 * diff --git a/src/Adyen/Model/Management/MealVoucherFRInfo.php b/src/Adyen/Model/Management/MealVoucherFRInfo.php index 1437fcee4..a4816b952 100644 --- a/src/Adyen/Model/Management/MealVoucherFRInfo.php +++ b/src/Adyen/Model/Management/MealVoucherFRInfo.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Management/Merchant.php b/src/Adyen/Model/Management/Merchant.php index fdf06523b..48e21ff9e 100644 --- a/src/Adyen/Model/Management/Merchant.php +++ b/src/Adyen/Model/Management/Merchant.php @@ -811,6 +811,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 * diff --git a/src/Adyen/Model/Management/MerchantLinks.php b/src/Adyen/Model/Management/MerchantLinks.php index b3ebaf4f9..7b7f4b016 100644 --- a/src/Adyen/Model/Management/MerchantLinks.php +++ b/src/Adyen/Model/Management/MerchantLinks.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php b/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php index c5e326218..bde8d0b4c 100644 --- a/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php +++ b/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php @@ -401,6 +401,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 * diff --git a/src/Adyen/Model/Management/Name.php b/src/Adyen/Model/Management/Name.php index aafda604c..27db963db 100644 --- a/src/Adyen/Model/Management/Name.php +++ b/src/Adyen/Model/Management/Name.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Management/Name2.php b/src/Adyen/Model/Management/Name2.php index c7c122d18..30f8bc7e9 100644 --- a/src/Adyen/Model/Management/Name2.php +++ b/src/Adyen/Model/Management/Name2.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/Nexo.php b/src/Adyen/Model/Management/Nexo.php index f856444fb..a26325f82 100644 --- a/src/Adyen/Model/Management/Nexo.php +++ b/src/Adyen/Model/Management/Nexo.php @@ -507,6 +507,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 * diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php index 468470eba..89681102f 100644 --- a/src/Adyen/Model/Management/Notification.php +++ b/src/Adyen/Model/Management/Notification.php @@ -538,6 +538,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 * diff --git a/src/Adyen/Model/Management/NotificationUrl.php b/src/Adyen/Model/Management/NotificationUrl.php index 7fa39a79b..355c33213 100644 --- a/src/Adyen/Model/Management/NotificationUrl.php +++ b/src/Adyen/Model/Management/NotificationUrl.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/OfflineProcessing.php b/src/Adyen/Model/Management/OfflineProcessing.php index 652891f30..c7e28d1f7 100644 --- a/src/Adyen/Model/Management/OfflineProcessing.php +++ b/src/Adyen/Model/Management/OfflineProcessing.php @@ -401,6 +401,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 * diff --git a/src/Adyen/Model/Management/Opi.php b/src/Adyen/Model/Management/Opi.php index ba851a408..86f2a0e2c 100644 --- a/src/Adyen/Model/Management/Opi.php +++ b/src/Adyen/Model/Management/Opi.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/OrderItem.php b/src/Adyen/Model/Management/OrderItem.php index 91032b94a..42f668d40 100644 --- a/src/Adyen/Model/Management/OrderItem.php +++ b/src/Adyen/Model/Management/OrderItem.php @@ -469,6 +469,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 * diff --git a/src/Adyen/Model/Management/PaginationLinks.php b/src/Adyen/Model/Management/PaginationLinks.php index 720a70231..a88612616 100644 --- a/src/Adyen/Model/Management/PaginationLinks.php +++ b/src/Adyen/Model/Management/PaginationLinks.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/Management/Passcodes.php b/src/Adyen/Model/Management/Passcodes.php index 349442ca7..6131b596b 100644 --- a/src/Adyen/Model/Management/Passcodes.php +++ b/src/Adyen/Model/Management/Passcodes.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/PayAtTable.php b/src/Adyen/Model/Management/PayAtTable.php index dd81be8ad..1d60cabc9 100644 --- a/src/Adyen/Model/Management/PayAtTable.php +++ b/src/Adyen/Model/Management/PayAtTable.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/Management/PayPalInfo.php b/src/Adyen/Model/Management/PayPalInfo.php index c512005d7..ecf150d78 100644 --- a/src/Adyen/Model/Management/PayPalInfo.php +++ b/src/Adyen/Model/Management/PayPalInfo.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/Management/Payment.php b/src/Adyen/Model/Management/Payment.php index d7afd7ff6..d0d196850 100644 --- a/src/Adyen/Model/Management/Payment.php +++ b/src/Adyen/Model/Management/Payment.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index b085e45ab..a51a22f3f 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -1633,6 +1633,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 * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index bd5b4cf61..def697f9d 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -624,6 +624,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 * diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index b435f1c08..f51c8c3f2 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -1624,6 +1624,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 * diff --git a/src/Adyen/Model/Management/PayoutSettings.php b/src/Adyen/Model/Management/PayoutSettings.php index 061c8ed94..e44aa3b00 100644 --- a/src/Adyen/Model/Management/PayoutSettings.php +++ b/src/Adyen/Model/Management/PayoutSettings.php @@ -651,6 +651,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 * diff --git a/src/Adyen/Model/Management/PayoutSettingsRequest.php b/src/Adyen/Model/Management/PayoutSettingsRequest.php index b402193fb..136cfccb1 100644 --- a/src/Adyen/Model/Management/PayoutSettingsRequest.php +++ b/src/Adyen/Model/Management/PayoutSettingsRequest.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Management/PayoutSettingsResponse.php b/src/Adyen/Model/Management/PayoutSettingsResponse.php index dffc62e40..f43395011 100644 --- a/src/Adyen/Model/Management/PayoutSettingsResponse.php +++ b/src/Adyen/Model/Management/PayoutSettingsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Profile.php b/src/Adyen/Model/Management/Profile.php index 49bc164f1..13de7be6d 100644 --- a/src/Adyen/Model/Management/Profile.php +++ b/src/Adyen/Model/Management/Profile.php @@ -957,6 +957,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 * diff --git a/src/Adyen/Model/Management/ReceiptOptions.php b/src/Adyen/Model/Management/ReceiptOptions.php index d04140f63..97879f599 100644 --- a/src/Adyen/Model/Management/ReceiptOptions.php +++ b/src/Adyen/Model/Management/ReceiptOptions.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/ReceiptPrinting.php b/src/Adyen/Model/Management/ReceiptPrinting.php index b455d0478..896bdf3c8 100644 --- a/src/Adyen/Model/Management/ReceiptPrinting.php +++ b/src/Adyen/Model/Management/ReceiptPrinting.php @@ -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 * diff --git a/src/Adyen/Model/Management/Referenced.php b/src/Adyen/Model/Management/Referenced.php index 490cad6dc..6707ddd4a 100644 --- a/src/Adyen/Model/Management/Referenced.php +++ b/src/Adyen/Model/Management/Referenced.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Refunds.php b/src/Adyen/Model/Management/Refunds.php index f82a6b04d..c3fb622a8 100644 --- a/src/Adyen/Model/Management/Refunds.php +++ b/src/Adyen/Model/Management/Refunds.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index a6820dfb1..91ec532e2 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -434,6 +434,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 * diff --git a/src/Adyen/Model/Management/RequestActivationResponse.php b/src/Adyen/Model/Management/RequestActivationResponse.php index dbf593c41..fba55144d 100644 --- a/src/Adyen/Model/Management/RequestActivationResponse.php +++ b/src/Adyen/Model/Management/RequestActivationResponse.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index 1018e90fa..abfe58252 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -654,6 +654,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 * diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php index b260b14dd..d84d1df93 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php index 8a8abbdf1..e821d7db5 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php @@ -472,6 +472,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 * diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php b/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php index e7eafb082..f59c321d6 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php @@ -569,6 +569,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 * diff --git a/src/Adyen/Model/Management/Settings.php b/src/Adyen/Model/Management/Settings.php index 458814bb5..04001a20f 100644 --- a/src/Adyen/Model/Management/Settings.php +++ b/src/Adyen/Model/Management/Settings.php @@ -435,6 +435,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 * diff --git a/src/Adyen/Model/Management/ShippingLocation.php b/src/Adyen/Model/Management/ShippingLocation.php index 1e0bdf95f..22dd6d5b4 100644 --- a/src/Adyen/Model/Management/ShippingLocation.php +++ b/src/Adyen/Model/Management/ShippingLocation.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/ShippingLocationsResponse.php b/src/Adyen/Model/Management/ShippingLocationsResponse.php index 44b31efdf..78bc03bd8 100644 --- a/src/Adyen/Model/Management/ShippingLocationsResponse.php +++ b/src/Adyen/Model/Management/ShippingLocationsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Signature.php b/src/Adyen/Model/Management/Signature.php index f9945bf4b..a07c593ee 100644 --- a/src/Adyen/Model/Management/Signature.php +++ b/src/Adyen/Model/Management/Signature.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/SofortInfo.php b/src/Adyen/Model/Management/SofortInfo.php index 8ed1fd3e4..cb177767b 100644 --- a/src/Adyen/Model/Management/SofortInfo.php +++ b/src/Adyen/Model/Management/SofortInfo.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Management/SplitConfiguration.php b/src/Adyen/Model/Management/SplitConfiguration.php index 05f591df9..670083be4 100644 --- a/src/Adyen/Model/Management/SplitConfiguration.php +++ b/src/Adyen/Model/Management/SplitConfiguration.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Management/SplitConfigurationList.php b/src/Adyen/Model/Management/SplitConfigurationList.php index 87e816436..89138e384 100644 --- a/src/Adyen/Model/Management/SplitConfigurationList.php +++ b/src/Adyen/Model/Management/SplitConfigurationList.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php index cb15c2d24..f492dc42d 100644 --- a/src/Adyen/Model/Management/SplitConfigurationLogic.php +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -1246,6 +1246,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 * diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index c8141915c..9cd2e018f 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -625,6 +625,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 * diff --git a/src/Adyen/Model/Management/Standalone.php b/src/Adyen/Model/Management/Standalone.php index 8213c43e7..348720b30 100644 --- a/src/Adyen/Model/Management/Standalone.php +++ b/src/Adyen/Model/Management/Standalone.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/Store.php b/src/Adyen/Model/Management/Store.php index 949769a96..a6561a5ca 100644 --- a/src/Adyen/Model/Management/Store.php +++ b/src/Adyen/Model/Management/Store.php @@ -778,6 +778,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 * diff --git a/src/Adyen/Model/Management/StoreCreationRequest.php b/src/Adyen/Model/Management/StoreCreationRequest.php index 45ab630ba..43dd12469 100644 --- a/src/Adyen/Model/Management/StoreCreationRequest.php +++ b/src/Adyen/Model/Management/StoreCreationRequest.php @@ -619,6 +619,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 * diff --git a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php index c95213ef2..ce4b4a38c 100644 --- a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php +++ b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php @@ -656,6 +656,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 * diff --git a/src/Adyen/Model/Management/StoreLocation.php b/src/Adyen/Model/Management/StoreLocation.php index 4d1d2a0a0..2770423a3 100644 --- a/src/Adyen/Model/Management/StoreLocation.php +++ b/src/Adyen/Model/Management/StoreLocation.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/Management/StoreSplitConfiguration.php b/src/Adyen/Model/Management/StoreSplitConfiguration.php index 614f87cc5..e9ab87c7d 100644 --- a/src/Adyen/Model/Management/StoreSplitConfiguration.php +++ b/src/Adyen/Model/Management/StoreSplitConfiguration.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/Surcharge.php b/src/Adyen/Model/Management/Surcharge.php index dc2112560..2fe95f188 100644 --- a/src/Adyen/Model/Management/Surcharge.php +++ b/src/Adyen/Model/Management/Surcharge.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/SwishInfo.php b/src/Adyen/Model/Management/SwishInfo.php index 50f234095..1ca9d82b0 100644 --- a/src/Adyen/Model/Management/SwishInfo.php +++ b/src/Adyen/Model/Management/SwishInfo.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/TapToPay.php b/src/Adyen/Model/Management/TapToPay.php index 4cea528ff..22cff040c 100644 --- a/src/Adyen/Model/Management/TapToPay.php +++ b/src/Adyen/Model/Management/TapToPay.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Terminal.php b/src/Adyen/Model/Management/Terminal.php index 219cc8daa..df030fa23 100644 --- a/src/Adyen/Model/Management/Terminal.php +++ b/src/Adyen/Model/Management/Terminal.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Management/TerminalActionScheduleDetail.php b/src/Adyen/Model/Management/TerminalActionScheduleDetail.php index 1055125e6..045ad991a 100644 --- a/src/Adyen/Model/Management/TerminalActionScheduleDetail.php +++ b/src/Adyen/Model/Management/TerminalActionScheduleDetail.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index 860176e40..b4c32a11c 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -548,6 +548,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 * diff --git a/src/Adyen/Model/Management/TerminalConnectivity.php b/src/Adyen/Model/Management/TerminalConnectivity.php index cbc8cab54..7da64ba2a 100644 --- a/src/Adyen/Model/Management/TerminalConnectivity.php +++ b/src/Adyen/Model/Management/TerminalConnectivity.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php b/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php index 9b687f887..623822a38 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php +++ b/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/TerminalConnectivityCellular.php b/src/Adyen/Model/Management/TerminalConnectivityCellular.php index 429f44043..e449cc85f 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityCellular.php +++ b/src/Adyen/Model/Management/TerminalConnectivityCellular.php @@ -442,6 +442,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 * diff --git a/src/Adyen/Model/Management/TerminalConnectivityEthernet.php b/src/Adyen/Model/Management/TerminalConnectivityEthernet.php index b70de5fcd..35a6cb9f3 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityEthernet.php +++ b/src/Adyen/Model/Management/TerminalConnectivityEthernet.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/TerminalConnectivityWifi.php b/src/Adyen/Model/Management/TerminalConnectivityWifi.php index 5d82e3678..062a9adea 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityWifi.php +++ b/src/Adyen/Model/Management/TerminalConnectivityWifi.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/TerminalModelsResponse.php b/src/Adyen/Model/Management/TerminalModelsResponse.php index 9e0149aa3..644cf81a2 100644 --- a/src/Adyen/Model/Management/TerminalModelsResponse.php +++ b/src/Adyen/Model/Management/TerminalModelsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/TerminalOrder.php b/src/Adyen/Model/Management/TerminalOrder.php index a3c5c71e8..d369298fc 100644 --- a/src/Adyen/Model/Management/TerminalOrder.php +++ b/src/Adyen/Model/Management/TerminalOrder.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Management/TerminalOrderRequest.php b/src/Adyen/Model/Management/TerminalOrderRequest.php index f291e8ec0..01ffd7da5 100644 --- a/src/Adyen/Model/Management/TerminalOrderRequest.php +++ b/src/Adyen/Model/Management/TerminalOrderRequest.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Management/TerminalOrdersResponse.php b/src/Adyen/Model/Management/TerminalOrdersResponse.php index a5f4ac74a..cbe5f54b9 100644 --- a/src/Adyen/Model/Management/TerminalOrdersResponse.php +++ b/src/Adyen/Model/Management/TerminalOrdersResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/TerminalProduct.php b/src/Adyen/Model/Management/TerminalProduct.php index e204d6f0f..4b33d4b65 100644 --- a/src/Adyen/Model/Management/TerminalProduct.php +++ b/src/Adyen/Model/Management/TerminalProduct.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Management/TerminalProductPrice.php b/src/Adyen/Model/Management/TerminalProductPrice.php index f39fa4b27..098f7ba8d 100644 --- a/src/Adyen/Model/Management/TerminalProductPrice.php +++ b/src/Adyen/Model/Management/TerminalProductPrice.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/TerminalProductsResponse.php b/src/Adyen/Model/Management/TerminalProductsResponse.php index 440934e54..52b7cbf9f 100644 --- a/src/Adyen/Model/Management/TerminalProductsResponse.php +++ b/src/Adyen/Model/Management/TerminalProductsResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/TerminalReassignmentRequest.php b/src/Adyen/Model/Management/TerminalReassignmentRequest.php index 4f43be0b5..d623637e8 100644 --- a/src/Adyen/Model/Management/TerminalReassignmentRequest.php +++ b/src/Adyen/Model/Management/TerminalReassignmentRequest.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/TerminalReassignmentTarget.php b/src/Adyen/Model/Management/TerminalReassignmentTarget.php index dbe4108e0..535f75c4f 100644 --- a/src/Adyen/Model/Management/TerminalReassignmentTarget.php +++ b/src/Adyen/Model/Management/TerminalReassignmentTarget.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index 9347de8d2..c5af64608 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -1015,6 +1015,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 * diff --git a/src/Adyen/Model/Management/TestCompanyWebhookRequest.php b/src/Adyen/Model/Management/TestCompanyWebhookRequest.php index 0d7d2ce4d..bae2848a5 100644 --- a/src/Adyen/Model/Management/TestCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/TestCompanyWebhookRequest.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Management/TestOutput.php b/src/Adyen/Model/Management/TestOutput.php index e27895498..25b7d327f 100644 --- a/src/Adyen/Model/Management/TestOutput.php +++ b/src/Adyen/Model/Management/TestOutput.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/Management/TestWebhookRequest.php b/src/Adyen/Model/Management/TestWebhookRequest.php index 92d40835f..aed3166b1 100644 --- a/src/Adyen/Model/Management/TestWebhookRequest.php +++ b/src/Adyen/Model/Management/TestWebhookRequest.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Management/TestWebhookResponse.php b/src/Adyen/Model/Management/TestWebhookResponse.php index f7644e272..bb28a1761 100644 --- a/src/Adyen/Model/Management/TestWebhookResponse.php +++ b/src/Adyen/Model/Management/TestWebhookResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Timeouts.php b/src/Adyen/Model/Management/Timeouts.php index 0832484eb..6c90ae099 100644 --- a/src/Adyen/Model/Management/Timeouts.php +++ b/src/Adyen/Model/Management/Timeouts.php @@ -367,6 +367,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 * diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index 544a58f21..75f8f578c 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -438,6 +438,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 * diff --git a/src/Adyen/Model/Management/TwintInfo.php b/src/Adyen/Model/Management/TwintInfo.php index de32eac06..83f1cf480 100644 --- a/src/Adyen/Model/Management/TwintInfo.php +++ b/src/Adyen/Model/Management/TwintInfo.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index 54bdd7865..f0cb1b6ab 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -434,6 +434,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 * diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index 814758942..cd0006b58 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -434,6 +434,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 * diff --git a/src/Adyen/Model/Management/UpdatableAddress.php b/src/Adyen/Model/Management/UpdatableAddress.php index 7a06f6c75..3a63ab925 100644 --- a/src/Adyen/Model/Management/UpdatableAddress.php +++ b/src/Adyen/Model/Management/UpdatableAddress.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php index d8f7e930c..587fcca22 100644 --- a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php index 4dc6d7af0..4cc10f7f1 100644 --- a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php index f0f181706..c6bef2e46 100644 --- a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php @@ -983,6 +983,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 * diff --git a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php index a81c32556..d89b7c791 100644 --- a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php index 9dbd93bd8..82684b887 100644 --- a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php index 196304e1f..07b8f6b2d 100644 --- a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php @@ -880,6 +880,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 * diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index 5b36d671a..5ac3c3c5b 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -947,6 +947,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 * diff --git a/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php b/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php index 91312a376..3e4cf5a75 100644 --- a/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php +++ b/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php index 6eea3c1ce..a01690e0d 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -1246,6 +1246,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 * diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php index e971bbba9..ac6d4625e 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index b1b868f80..ae79fbb0d 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -480,6 +480,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 * diff --git a/src/Adyen/Model/Management/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index 97810eb8c..64eaf8c48 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -608,6 +608,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 * diff --git a/src/Adyen/Model/Management/UploadAndroidAppResponse.php b/src/Adyen/Model/Management/UploadAndroidAppResponse.php index 1c3671df0..2b47d968f 100644 --- a/src/Adyen/Model/Management/UploadAndroidAppResponse.php +++ b/src/Adyen/Model/Management/UploadAndroidAppResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Management/Url.php b/src/Adyen/Model/Management/Url.php index 487831a9d..2f4f82215 100644 --- a/src/Adyen/Model/Management/Url.php +++ b/src/Adyen/Model/Management/Url.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Management/User.php b/src/Adyen/Model/Management/User.php index caa563402..6f74aba9a 100644 --- a/src/Adyen/Model/Management/User.php +++ b/src/Adyen/Model/Management/User.php @@ -690,6 +690,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 * diff --git a/src/Adyen/Model/Management/VippsInfo.php b/src/Adyen/Model/Management/VippsInfo.php index 1584715f4..5ee851da2 100644 --- a/src/Adyen/Model/Management/VippsInfo.php +++ b/src/Adyen/Model/Management/VippsInfo.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index 6006b702e..2b3470a20 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -1233,6 +1233,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 * diff --git a/src/Adyen/Model/Management/WebhookLinks.php b/src/Adyen/Model/Management/WebhookLinks.php index 9e636532a..3ce3b9853 100644 --- a/src/Adyen/Model/Management/WebhookLinks.php +++ b/src/Adyen/Model/Management/WebhookLinks.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/Management/WifiProfiles.php b/src/Adyen/Model/Management/WifiProfiles.php index 7834a37f2..997bb53cb 100644 --- a/src/Adyen/Model/Management/WifiProfiles.php +++ b/src/Adyen/Model/Management/WifiProfiles.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php b/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php index c54ffb6c6..a46da09bb 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php @@ -613,6 +613,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php b/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php index 913eff2ec..bb71d85a4 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php @@ -517,6 +517,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php b/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php index bf5eaf19e..282e18cba 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php b/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php index 13526d3c4..8c5110260 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php @@ -480,6 +480,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php b/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php index 1e19c32f4..6fc51dccc 100644 --- a/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php +++ b/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php index f259ee653..6921e11e6 100644 --- a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php +++ b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php @@ -506,6 +506,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php index fc728fff5..508a550be 100644 --- a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php @@ -472,6 +472,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php index b0922593c..f8b09a297 100644 --- a/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php index 95e6d8c19..f0c6ae668 100644 --- a/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php index 36c82be6e..e3abd5262 100644 --- a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php @@ -729,6 +729,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php index 9cf605a60..93e57d5db 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php index 055ca7775..ea362cf76 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php index 4a60795a7..016cb54ab 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php index 02b961a02..9c21bc1a0 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php b/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php index c2f479051..793122b94 100644 --- a/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php +++ b/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/VerificationError.php b/src/Adyen/Model/ManagementWebhooks/VerificationError.php index fba045e47..bb643faf7 100644 --- a/src/Adyen/Model/ManagementWebhooks/VerificationError.php +++ b/src/Adyen/Model/ManagementWebhooks/VerificationError.php @@ -540,6 +540,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 * diff --git a/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php b/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php index 93863daab..1ad6fad97 100644 --- a/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php +++ b/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php @@ -506,6 +506,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/Address.php b/src/Adyen/Model/POSTerminalManagement/Address.php index b7e63fb41..6416abd17 100644 --- a/src/Adyen/Model/POSTerminalManagement/Address.php +++ b/src/Adyen/Model/POSTerminalManagement/Address.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php index e3bec84df..8020b041e 100644 --- a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php @@ -511,6 +511,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php index 90419d033..eeeebeaf2 100644 --- a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php b/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php index f6f82b85e..916a7c177 100644 --- a/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php b/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php index 5bfd1bfb7..b88d7f15e 100644 --- a/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php @@ -511,6 +511,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php index 4e8965181..aae0b36b5 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php index bd6c08da0..add2953e1 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php index 0405aee1b..cd5520c21 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php index f4dfb8692..7c866d576 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php @@ -1244,6 +1244,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php index 5d6777cd2..57e938b6c 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php index 29e2515ed..524d9b1ab 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php b/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php index 51d94dcc2..80af1499b 100644 --- a/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php +++ b/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/ServiceError.php b/src/Adyen/Model/POSTerminalManagement/ServiceError.php index 125ddf9d7..081691ee9 100644 --- a/src/Adyen/Model/POSTerminalManagement/ServiceError.php +++ b/src/Adyen/Model/POSTerminalManagement/ServiceError.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/POSTerminalManagement/Store.php b/src/Adyen/Model/POSTerminalManagement/Store.php index e11a908de..9f4c37500 100644 --- a/src/Adyen/Model/POSTerminalManagement/Store.php +++ b/src/Adyen/Model/POSTerminalManagement/Store.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/Payments/AccountInfo.php b/src/Adyen/Model/Payments/AccountInfo.php index 1a440c682..732f88cb7 100644 --- a/src/Adyen/Model/Payments/AccountInfo.php +++ b/src/Adyen/Model/Payments/AccountInfo.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AcctInfo.php b/src/Adyen/Model/Payments/AcctInfo.php index ad08e243c..b2b1be0b0 100644 --- a/src/Adyen/Model/Payments/AcctInfo.php +++ b/src/Adyen/Model/Payments/AcctInfo.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AdditionalData3DSecure.php b/src/Adyen/Model/Payments/AdditionalData3DSecure.php index 8419c212c..e566098c9 100644 --- a/src/Adyen/Model/Payments/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/AdditionalData3DSecure.php @@ -578,6 +578,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataAirline.php b/src/Adyen/Model/Payments/AdditionalDataAirline.php index e53647b9b..3c855939c 100644 --- a/src/Adyen/Model/Payments/AdditionalDataAirline.php +++ b/src/Adyen/Model/Payments/AdditionalDataAirline.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataCarRental.php b/src/Adyen/Model/Payments/AdditionalDataCarRental.php index cc8efafa9..e0a23f421 100644 --- a/src/Adyen/Model/Payments/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Payments/AdditionalDataCarRental.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataCommon.php b/src/Adyen/Model/Payments/AdditionalDataCommon.php index 81c6c951f..52816fabe 100644 --- a/src/Adyen/Model/Payments/AdditionalDataCommon.php +++ b/src/Adyen/Model/Payments/AdditionalDataCommon.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataLevel23.php b/src/Adyen/Model/Payments/AdditionalDataLevel23.php index c0ef36573..85f330d15 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Payments/AdditionalDataLevel23.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataLodging.php b/src/Adyen/Model/Payments/AdditionalDataLodging.php index 83349e421..936d38b1a 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLodging.php +++ b/src/Adyen/Model/Payments/AdditionalDataLodging.php @@ -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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataModifications.php b/src/Adyen/Model/Payments/AdditionalDataModifications.php index e5b3b9372..65668707f 100644 --- a/src/Adyen/Model/Payments/AdditionalDataModifications.php +++ b/src/Adyen/Model/Payments/AdditionalDataModifications.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php b/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php index e71acda2e..220f8736b 100644 --- a/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php +++ b/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php @@ -947,6 +947,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataOpi.php b/src/Adyen/Model/Payments/AdditionalDataOpi.php index 135f46b12..6fedc7acc 100644 --- a/src/Adyen/Model/Payments/AdditionalDataOpi.php +++ b/src/Adyen/Model/Payments/AdditionalDataOpi.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataRatepay.php b/src/Adyen/Model/Payments/AdditionalDataRatepay.php index 27ad73f04..308f27a66 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRatepay.php +++ b/src/Adyen/Model/Payments/AdditionalDataRatepay.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataRetry.php b/src/Adyen/Model/Payments/AdditionalDataRetry.php index ead34dd76..c7e93972a 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRetry.php +++ b/src/Adyen/Model/Payments/AdditionalDataRetry.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataRisk.php b/src/Adyen/Model/Payments/AdditionalDataRisk.php index 5ac1e78e9..52fde27f6 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRisk.php +++ b/src/Adyen/Model/Payments/AdditionalDataRisk.php @@ -1049,6 +1049,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php b/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php index 5abde54dd..0b9f5ea59 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php +++ b/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php @@ -845,6 +845,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php index fc6f06207..7613d5678 100644 --- a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php @@ -675,6 +675,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php index cc24a787e..8e4c0e060 100644 --- a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php @@ -641,6 +641,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 * diff --git a/src/Adyen/Model/Payments/AdditionalDataWallets.php b/src/Adyen/Model/Payments/AdditionalDataWallets.php index d4369e749..541b2947b 100644 --- a/src/Adyen/Model/Payments/AdditionalDataWallets.php +++ b/src/Adyen/Model/Payments/AdditionalDataWallets.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payments/Address.php b/src/Adyen/Model/Payments/Address.php index 76e9fb060..c8ac11460 100644 --- a/src/Adyen/Model/Payments/Address.php +++ b/src/Adyen/Model/Payments/Address.php @@ -554,6 +554,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 * diff --git a/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php b/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php index ea9c92e99..80825f4ad 100644 --- a/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php +++ b/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php @@ -718,6 +718,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 * diff --git a/src/Adyen/Model/Payments/Amount.php b/src/Adyen/Model/Payments/Amount.php index 994777352..d65b2d699 100644 --- a/src/Adyen/Model/Payments/Amount.php +++ b/src/Adyen/Model/Payments/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Payments/ApplicationInfo.php b/src/Adyen/Model/Payments/ApplicationInfo.php index f20eb9a59..0c6a32762 100644 --- a/src/Adyen/Model/Payments/ApplicationInfo.php +++ b/src/Adyen/Model/Payments/ApplicationInfo.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payments/AuthenticationResultRequest.php b/src/Adyen/Model/Payments/AuthenticationResultRequest.php index 1fc1a786f..b028a237e 100644 --- a/src/Adyen/Model/Payments/AuthenticationResultRequest.php +++ b/src/Adyen/Model/Payments/AuthenticationResultRequest.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Payments/AuthenticationResultResponse.php b/src/Adyen/Model/Payments/AuthenticationResultResponse.php index cf241b391..747888b24 100644 --- a/src/Adyen/Model/Payments/AuthenticationResultResponse.php +++ b/src/Adyen/Model/Payments/AuthenticationResultResponse.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Payments/BankAccount.php b/src/Adyen/Model/Payments/BankAccount.php index 02e27bbc9..ec7be5f83 100644 --- a/src/Adyen/Model/Payments/BankAccount.php +++ b/src/Adyen/Model/Payments/BankAccount.php @@ -641,6 +641,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 * diff --git a/src/Adyen/Model/Payments/BrowserInfo.php b/src/Adyen/Model/Payments/BrowserInfo.php index 668e474f1..14470bf66 100644 --- a/src/Adyen/Model/Payments/BrowserInfo.php +++ b/src/Adyen/Model/Payments/BrowserInfo.php @@ -657,6 +657,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 * diff --git a/src/Adyen/Model/Payments/CancelOrRefundRequest.php b/src/Adyen/Model/Payments/CancelOrRefundRequest.php index 4c4749b50..b867716a8 100644 --- a/src/Adyen/Model/Payments/CancelOrRefundRequest.php +++ b/src/Adyen/Model/Payments/CancelOrRefundRequest.php @@ -647,6 +647,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 * diff --git a/src/Adyen/Model/Payments/CancelRequest.php b/src/Adyen/Model/Payments/CancelRequest.php index 0d6dd6d28..b0a2335ae 100644 --- a/src/Adyen/Model/Payments/CancelRequest.php +++ b/src/Adyen/Model/Payments/CancelRequest.php @@ -681,6 +681,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 * diff --git a/src/Adyen/Model/Payments/CaptureRequest.php b/src/Adyen/Model/Payments/CaptureRequest.php index e1ed0624b..a821fd55e 100644 --- a/src/Adyen/Model/Payments/CaptureRequest.php +++ b/src/Adyen/Model/Payments/CaptureRequest.php @@ -718,6 +718,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 * diff --git a/src/Adyen/Model/Payments/Card.php b/src/Adyen/Model/Payments/Card.php index 2a31b6936..d4ca76283 100644 --- a/src/Adyen/Model/Payments/Card.php +++ b/src/Adyen/Model/Payments/Card.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Payments/CommonField.php b/src/Adyen/Model/Payments/CommonField.php index 543bcc841..e66a557d9 100644 --- a/src/Adyen/Model/Payments/CommonField.php +++ b/src/Adyen/Model/Payments/CommonField.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Payments/DeviceRenderOptions.php b/src/Adyen/Model/Payments/DeviceRenderOptions.php index d599b0a1e..9b5abf159 100644 --- a/src/Adyen/Model/Payments/DeviceRenderOptions.php +++ b/src/Adyen/Model/Payments/DeviceRenderOptions.php @@ -467,6 +467,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 * diff --git a/src/Adyen/Model/Payments/DonationRequest.php b/src/Adyen/Model/Payments/DonationRequest.php index d98155a3c..817568751 100644 --- a/src/Adyen/Model/Payments/DonationRequest.php +++ b/src/Adyen/Model/Payments/DonationRequest.php @@ -548,6 +548,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 * diff --git a/src/Adyen/Model/Payments/ExternalPlatform.php b/src/Adyen/Model/Payments/ExternalPlatform.php index 4a36ab4ef..5ce03a9ee 100644 --- a/src/Adyen/Model/Payments/ExternalPlatform.php +++ b/src/Adyen/Model/Payments/ExternalPlatform.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/ForexQuote.php b/src/Adyen/Model/Payments/ForexQuote.php index ca825425b..3298e15a4 100644 --- a/src/Adyen/Model/Payments/ForexQuote.php +++ b/src/Adyen/Model/Payments/ForexQuote.php @@ -747,6 +747,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 * diff --git a/src/Adyen/Model/Payments/FraudCheckResult.php b/src/Adyen/Model/Payments/FraudCheckResult.php index d56c0c38a..cc976d4c9 100644 --- a/src/Adyen/Model/Payments/FraudCheckResult.php +++ b/src/Adyen/Model/Payments/FraudCheckResult.php @@ -442,6 +442,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 * diff --git a/src/Adyen/Model/Payments/FraudCheckResultWrapper.php b/src/Adyen/Model/Payments/FraudCheckResultWrapper.php index 16af9bc34..6238c3b2f 100644 --- a/src/Adyen/Model/Payments/FraudCheckResultWrapper.php +++ b/src/Adyen/Model/Payments/FraudCheckResultWrapper.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payments/FraudResult.php b/src/Adyen/Model/Payments/FraudResult.php index 5431db9f4..70e6731be 100644 --- a/src/Adyen/Model/Payments/FraudResult.php +++ b/src/Adyen/Model/Payments/FraudResult.php @@ -404,6 +404,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 * diff --git a/src/Adyen/Model/Payments/FundDestination.php b/src/Adyen/Model/Payments/FundDestination.php index 74914ef96..63bd2d77a 100644 --- a/src/Adyen/Model/Payments/FundDestination.php +++ b/src/Adyen/Model/Payments/FundDestination.php @@ -641,6 +641,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 * diff --git a/src/Adyen/Model/Payments/FundSource.php b/src/Adyen/Model/Payments/FundSource.php index 76ace6f80..4fdb63b36 100644 --- a/src/Adyen/Model/Payments/FundSource.php +++ b/src/Adyen/Model/Payments/FundSource.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payments/Installments.php b/src/Adyen/Model/Payments/Installments.php index 87efe51bc..bbc24da1e 100644 --- a/src/Adyen/Model/Payments/Installments.php +++ b/src/Adyen/Model/Payments/Installments.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/Mandate.php b/src/Adyen/Model/Payments/Mandate.php index 16fad6d71..4646b438b 100644 --- a/src/Adyen/Model/Payments/Mandate.php +++ b/src/Adyen/Model/Payments/Mandate.php @@ -729,6 +729,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 * diff --git a/src/Adyen/Model/Payments/MerchantDevice.php b/src/Adyen/Model/Payments/MerchantDevice.php index a82adff5d..95d663eea 100644 --- a/src/Adyen/Model/Payments/MerchantDevice.php +++ b/src/Adyen/Model/Payments/MerchantDevice.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/MerchantRiskIndicator.php b/src/Adyen/Model/Payments/MerchantRiskIndicator.php index fe1496787..5ec23b0cc 100644 --- a/src/Adyen/Model/Payments/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Payments/MerchantRiskIndicator.php @@ -891,6 +891,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 * diff --git a/src/Adyen/Model/Payments/ModificationResult.php b/src/Adyen/Model/Payments/ModificationResult.php index 1f62496d0..a8a3b3139 100644 --- a/src/Adyen/Model/Payments/ModificationResult.php +++ b/src/Adyen/Model/Payments/ModificationResult.php @@ -488,6 +488,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 * diff --git a/src/Adyen/Model/Payments/Name.php b/src/Adyen/Model/Payments/Name.php index 174554db7..857e2cc52 100644 --- a/src/Adyen/Model/Payments/Name.php +++ b/src/Adyen/Model/Payments/Name.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index 2867e7054..a3cf211ae 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -2280,6 +2280,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 * diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index ad0bfd4b6..648f084f7 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -1942,6 +1942,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 * diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index bafef4bf3..59422c6b8 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -1942,6 +1942,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 * diff --git a/src/Adyen/Model/Payments/PaymentResult.php b/src/Adyen/Model/Payments/PaymentResult.php index b5187bb4a..487413712 100644 --- a/src/Adyen/Model/Payments/PaymentResult.php +++ b/src/Adyen/Model/Payments/PaymentResult.php @@ -766,6 +766,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 * diff --git a/src/Adyen/Model/Payments/Phone.php b/src/Adyen/Model/Payments/Phone.php index 451964de6..29e4a650d 100644 --- a/src/Adyen/Model/Payments/Phone.php +++ b/src/Adyen/Model/Payments/Phone.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Payments/PlatformChargebackLogic.php b/src/Adyen/Model/Payments/PlatformChargebackLogic.php index d218633f7..07d9bd8d8 100644 --- a/src/Adyen/Model/Payments/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Payments/PlatformChargebackLogic.php @@ -472,6 +472,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 * diff --git a/src/Adyen/Model/Payments/Recurring.php b/src/Adyen/Model/Payments/Recurring.php index 81ed21d62..66d9e5d77 100644 --- a/src/Adyen/Model/Payments/Recurring.php +++ b/src/Adyen/Model/Payments/Recurring.php @@ -577,6 +577,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 * diff --git a/src/Adyen/Model/Payments/RefundRequest.php b/src/Adyen/Model/Payments/RefundRequest.php index 94073f597..c878bafe5 100644 --- a/src/Adyen/Model/Payments/RefundRequest.php +++ b/src/Adyen/Model/Payments/RefundRequest.php @@ -718,6 +718,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php index 4b0e4c831..6025562fd 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php index 8b00ce93a..7a18dc419 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php b/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php index 211073567..b51caf9e0 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php index 0b1391c97..5951b83d6 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php @@ -2409,6 +2409,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php index ace9c7981..4c8cf8959 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php index eaf958cc0..fe7d5a4db 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php @@ -743,6 +743,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php index cf43f21be..83c1c328c 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php index 194ff99b7..9b7fe84a4 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php index 8b644efd0..799996deb 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/SDKEphemPubKey.php b/src/Adyen/Model/Payments/SDKEphemPubKey.php index 97da0cb79..732833f66 100644 --- a/src/Adyen/Model/Payments/SDKEphemPubKey.php +++ b/src/Adyen/Model/Payments/SDKEphemPubKey.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Payments/ServiceError.php b/src/Adyen/Model/Payments/ServiceError.php index 2146ea4ce..fdda5df8d 100644 --- a/src/Adyen/Model/Payments/ServiceError.php +++ b/src/Adyen/Model/Payments/ServiceError.php @@ -537,6 +537,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 * diff --git a/src/Adyen/Model/Payments/ShopperInteractionDevice.php b/src/Adyen/Model/Payments/ShopperInteractionDevice.php index 0c7c8aa57..a359b9218 100644 --- a/src/Adyen/Model/Payments/ShopperInteractionDevice.php +++ b/src/Adyen/Model/Payments/ShopperInteractionDevice.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index b41516409..55de0ecbc 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -555,6 +555,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 * diff --git a/src/Adyen/Model/Payments/SplitAmount.php b/src/Adyen/Model/Payments/SplitAmount.php index c5229017e..0a473c807 100644 --- a/src/Adyen/Model/Payments/SplitAmount.php +++ b/src/Adyen/Model/Payments/SplitAmount.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Payments/SubMerchant.php b/src/Adyen/Model/Payments/SubMerchant.php index 514737693..4396dd82b 100644 --- a/src/Adyen/Model/Payments/SubMerchant.php +++ b/src/Adyen/Model/Payments/SubMerchant.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Payments/TechnicalCancelRequest.php b/src/Adyen/Model/Payments/TechnicalCancelRequest.php index dfad24c32..85ca1ceb8 100644 --- a/src/Adyen/Model/Payments/TechnicalCancelRequest.php +++ b/src/Adyen/Model/Payments/TechnicalCancelRequest.php @@ -681,6 +681,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 * diff --git a/src/Adyen/Model/Payments/ThreeDS1Result.php b/src/Adyen/Model/Payments/ThreeDS1Result.php index 707f35039..4e31dbb93 100644 --- a/src/Adyen/Model/Payments/ThreeDS1Result.php +++ b/src/Adyen/Model/Payments/ThreeDS1Result.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payments/ThreeDS2RequestData.php b/src/Adyen/Model/Payments/ThreeDS2RequestData.php index 010245f7a..f9bc03095 100644 --- a/src/Adyen/Model/Payments/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Payments/ThreeDS2RequestData.php @@ -1890,6 +1890,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 * diff --git a/src/Adyen/Model/Payments/ThreeDS2Result.php b/src/Adyen/Model/Payments/ThreeDS2Result.php index bf2c77ced..119912480 100644 --- a/src/Adyen/Model/Payments/ThreeDS2Result.php +++ b/src/Adyen/Model/Payments/ThreeDS2Result.php @@ -932,6 +932,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 * diff --git a/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php b/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php index 7e3172102..1031706f8 100644 --- a/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php +++ b/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php b/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php index f3bdfc383..aaba993af 100644 --- a/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php +++ b/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php b/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php index f075610ec..71ac55f79 100644 --- a/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php +++ b/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php @@ -478,6 +478,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 * diff --git a/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php b/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php index 58f66a9c6..de29aa9bc 100644 --- a/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php +++ b/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php @@ -508,6 +508,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 * diff --git a/src/Adyen/Model/Payments/ThreeDSecureData.php b/src/Adyen/Model/Payments/ThreeDSecureData.php index af1540a01..87aa50849 100644 --- a/src/Adyen/Model/Payments/ThreeDSecureData.php +++ b/src/Adyen/Model/Payments/ThreeDSecureData.php @@ -868,6 +868,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 * diff --git a/src/Adyen/Model/Payments/VoidPendingRefundRequest.php b/src/Adyen/Model/Payments/VoidPendingRefundRequest.php index ad14637cb..4ee7553f7 100644 --- a/src/Adyen/Model/Payments/VoidPendingRefundRequest.php +++ b/src/Adyen/Model/Payments/VoidPendingRefundRequest.php @@ -712,6 +712,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 * diff --git a/src/Adyen/Model/Payout/Address.php b/src/Adyen/Model/Payout/Address.php index 63168faf9..3823f3a44 100644 --- a/src/Adyen/Model/Payout/Address.php +++ b/src/Adyen/Model/Payout/Address.php @@ -554,6 +554,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 * diff --git a/src/Adyen/Model/Payout/Amount.php b/src/Adyen/Model/Payout/Amount.php index 298659024..5474d285e 100644 --- a/src/Adyen/Model/Payout/Amount.php +++ b/src/Adyen/Model/Payout/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Payout/BankAccount.php b/src/Adyen/Model/Payout/BankAccount.php index 6880054d5..56c6f1d0a 100644 --- a/src/Adyen/Model/Payout/BankAccount.php +++ b/src/Adyen/Model/Payout/BankAccount.php @@ -641,6 +641,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 * diff --git a/src/Adyen/Model/Payout/Card.php b/src/Adyen/Model/Payout/Card.php index aa8537765..ddbbda3ed 100644 --- a/src/Adyen/Model/Payout/Card.php +++ b/src/Adyen/Model/Payout/Card.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Payout/FraudCheckResult.php b/src/Adyen/Model/Payout/FraudCheckResult.php index 9799f9c49..a1895c91c 100644 --- a/src/Adyen/Model/Payout/FraudCheckResult.php +++ b/src/Adyen/Model/Payout/FraudCheckResult.php @@ -442,6 +442,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 * diff --git a/src/Adyen/Model/Payout/FraudCheckResultWrapper.php b/src/Adyen/Model/Payout/FraudCheckResultWrapper.php index 6afbeea7b..50c53d390 100644 --- a/src/Adyen/Model/Payout/FraudCheckResultWrapper.php +++ b/src/Adyen/Model/Payout/FraudCheckResultWrapper.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payout/FraudResult.php b/src/Adyen/Model/Payout/FraudResult.php index 925ee3250..f742186b4 100644 --- a/src/Adyen/Model/Payout/FraudResult.php +++ b/src/Adyen/Model/Payout/FraudResult.php @@ -404,6 +404,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 * diff --git a/src/Adyen/Model/Payout/FundSource.php b/src/Adyen/Model/Payout/FundSource.php index 30cf5a62e..bb3196941 100644 --- a/src/Adyen/Model/Payout/FundSource.php +++ b/src/Adyen/Model/Payout/FundSource.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payout/ModifyRequest.php b/src/Adyen/Model/Payout/ModifyRequest.php index 9b01895f4..aa154ea2f 100644 --- a/src/Adyen/Model/Payout/ModifyRequest.php +++ b/src/Adyen/Model/Payout/ModifyRequest.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/Payout/ModifyResponse.php b/src/Adyen/Model/Payout/ModifyResponse.php index c320ad3ea..c27fd6f82 100644 --- a/src/Adyen/Model/Payout/ModifyResponse.php +++ b/src/Adyen/Model/Payout/ModifyResponse.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/Payout/Name.php b/src/Adyen/Model/Payout/Name.php index f142496bf..074bc1d2b 100644 --- a/src/Adyen/Model/Payout/Name.php +++ b/src/Adyen/Model/Payout/Name.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Payout/PayoutRequest.php b/src/Adyen/Model/Payout/PayoutRequest.php index c7321e214..dca80a631 100644 --- a/src/Adyen/Model/Payout/PayoutRequest.php +++ b/src/Adyen/Model/Payout/PayoutRequest.php @@ -855,6 +855,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 * diff --git a/src/Adyen/Model/Payout/PayoutResponse.php b/src/Adyen/Model/Payout/PayoutResponse.php index 4644bd519..24f833e6a 100644 --- a/src/Adyen/Model/Payout/PayoutResponse.php +++ b/src/Adyen/Model/Payout/PayoutResponse.php @@ -766,6 +766,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 * diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index ecb68436f..b595235c7 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -577,6 +577,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php index 22f9270ff..21babcbb2 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php index 11d4d8e5d..d2b5591c1 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php index 8a3e44688..ec633b8a4 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php index af2696011..62875e29a 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php @@ -2409,6 +2409,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php index 69e9b16c3..990001dd2 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php index 5681ca6f7..42ba8b01e 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php @@ -743,6 +743,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php index 1ff00409e..24746b7f3 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php index b2a203100..a485a6a07 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php index 65b155a79..abef93caa 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Payout/ServiceError.php b/src/Adyen/Model/Payout/ServiceError.php index e411c09c5..dcd1b6563 100644 --- a/src/Adyen/Model/Payout/ServiceError.php +++ b/src/Adyen/Model/Payout/ServiceError.php @@ -537,6 +537,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 * diff --git a/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php b/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php index 4ab07c7bc..49b2254f3 100644 --- a/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php +++ b/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php @@ -1039,6 +1039,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 * diff --git a/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php b/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php index de728ac55..0463b0ef8 100644 --- a/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php +++ b/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Payout/StoreDetailRequest.php b/src/Adyen/Model/Payout/StoreDetailRequest.php index 657fc9a86..d69970666 100644 --- a/src/Adyen/Model/Payout/StoreDetailRequest.php +++ b/src/Adyen/Model/Payout/StoreDetailRequest.php @@ -931,6 +931,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 * diff --git a/src/Adyen/Model/Payout/StoreDetailResponse.php b/src/Adyen/Model/Payout/StoreDetailResponse.php index f4189bf84..21f08f036 100644 --- a/src/Adyen/Model/Payout/StoreDetailResponse.php +++ b/src/Adyen/Model/Payout/StoreDetailResponse.php @@ -480,6 +480,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 * diff --git a/src/Adyen/Model/Payout/SubmitRequest.php b/src/Adyen/Model/Payout/SubmitRequest.php index 5dfd76eb0..4003130ad 100644 --- a/src/Adyen/Model/Payout/SubmitRequest.php +++ b/src/Adyen/Model/Payout/SubmitRequest.php @@ -897,6 +897,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 * diff --git a/src/Adyen/Model/Payout/SubmitResponse.php b/src/Adyen/Model/Payout/SubmitResponse.php index 9ab56404b..558c31d09 100644 --- a/src/Adyen/Model/Payout/SubmitResponse.php +++ b/src/Adyen/Model/Payout/SubmitResponse.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Recurring/Address.php b/src/Adyen/Model/Recurring/Address.php index a9170fe61..96b8a65ac 100644 --- a/src/Adyen/Model/Recurring/Address.php +++ b/src/Adyen/Model/Recurring/Address.php @@ -554,6 +554,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 * diff --git a/src/Adyen/Model/Recurring/Amount.php b/src/Adyen/Model/Recurring/Amount.php index 1297f73d1..dd2c4a906 100644 --- a/src/Adyen/Model/Recurring/Amount.php +++ b/src/Adyen/Model/Recurring/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Recurring/BankAccount.php b/src/Adyen/Model/Recurring/BankAccount.php index 66b22b798..1eaef0c73 100644 --- a/src/Adyen/Model/Recurring/BankAccount.php +++ b/src/Adyen/Model/Recurring/BankAccount.php @@ -641,6 +641,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 * diff --git a/src/Adyen/Model/Recurring/Card.php b/src/Adyen/Model/Recurring/Card.php index 69a9e2068..16abe5022 100644 --- a/src/Adyen/Model/Recurring/Card.php +++ b/src/Adyen/Model/Recurring/Card.php @@ -607,6 +607,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 * diff --git a/src/Adyen/Model/Recurring/CreatePermitRequest.php b/src/Adyen/Model/Recurring/CreatePermitRequest.php index 6ceb81493..e5d66d717 100644 --- a/src/Adyen/Model/Recurring/CreatePermitRequest.php +++ b/src/Adyen/Model/Recurring/CreatePermitRequest.php @@ -483,6 +483,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 * diff --git a/src/Adyen/Model/Recurring/CreatePermitResult.php b/src/Adyen/Model/Recurring/CreatePermitResult.php index e4d12f097..546361279 100644 --- a/src/Adyen/Model/Recurring/CreatePermitResult.php +++ b/src/Adyen/Model/Recurring/CreatePermitResult.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Recurring/DisablePermitRequest.php b/src/Adyen/Model/Recurring/DisablePermitRequest.php index 56a244a52..c24e12248 100644 --- a/src/Adyen/Model/Recurring/DisablePermitRequest.php +++ b/src/Adyen/Model/Recurring/DisablePermitRequest.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Recurring/DisablePermitResult.php b/src/Adyen/Model/Recurring/DisablePermitResult.php index 878d143ff..d986e5592 100644 --- a/src/Adyen/Model/Recurring/DisablePermitResult.php +++ b/src/Adyen/Model/Recurring/DisablePermitResult.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Recurring/DisableRequest.php b/src/Adyen/Model/Recurring/DisableRequest.php index 18f922963..b8a10047c 100644 --- a/src/Adyen/Model/Recurring/DisableRequest.php +++ b/src/Adyen/Model/Recurring/DisableRequest.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Recurring/DisableResult.php b/src/Adyen/Model/Recurring/DisableResult.php index 310c1add7..3e57403cb 100644 --- a/src/Adyen/Model/Recurring/DisableResult.php +++ b/src/Adyen/Model/Recurring/DisableResult.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Recurring/Name.php b/src/Adyen/Model/Recurring/Name.php index 0d17c4fb5..351d8dbe6 100644 --- a/src/Adyen/Model/Recurring/Name.php +++ b/src/Adyen/Model/Recurring/Name.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Recurring/NotifyShopperRequest.php b/src/Adyen/Model/Recurring/NotifyShopperRequest.php index 715cea6d8..eb6486326 100644 --- a/src/Adyen/Model/Recurring/NotifyShopperRequest.php +++ b/src/Adyen/Model/Recurring/NotifyShopperRequest.php @@ -653,6 +653,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 * diff --git a/src/Adyen/Model/Recurring/NotifyShopperResult.php b/src/Adyen/Model/Recurring/NotifyShopperResult.php index 8768c3c48..11832fc27 100644 --- a/src/Adyen/Model/Recurring/NotifyShopperResult.php +++ b/src/Adyen/Model/Recurring/NotifyShopperResult.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/Recurring/Permit.php b/src/Adyen/Model/Recurring/Permit.php index 49f13ed9a..2d33373fa 100644 --- a/src/Adyen/Model/Recurring/Permit.php +++ b/src/Adyen/Model/Recurring/Permit.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Recurring/PermitRestriction.php b/src/Adyen/Model/Recurring/PermitRestriction.php index 6d6fe3320..6e1f768cb 100644 --- a/src/Adyen/Model/Recurring/PermitRestriction.php +++ b/src/Adyen/Model/Recurring/PermitRestriction.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Recurring/PermitResult.php b/src/Adyen/Model/Recurring/PermitResult.php index 36dc67bc1..18fe01562 100644 --- a/src/Adyen/Model/Recurring/PermitResult.php +++ b/src/Adyen/Model/Recurring/PermitResult.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index 431dacaa0..dc0faa6ff 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -577,6 +577,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 * diff --git a/src/Adyen/Model/Recurring/RecurringDetail.php b/src/Adyen/Model/Recurring/RecurringDetail.php index 94e8c889b..3234d2115 100644 --- a/src/Adyen/Model/Recurring/RecurringDetail.php +++ b/src/Adyen/Model/Recurring/RecurringDetail.php @@ -919,6 +919,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 * diff --git a/src/Adyen/Model/Recurring/RecurringDetailWrapper.php b/src/Adyen/Model/Recurring/RecurringDetailWrapper.php index 1ea9432e2..52f3e2e4f 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailWrapper.php +++ b/src/Adyen/Model/Recurring/RecurringDetailWrapper.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Recurring/RecurringDetailsRequest.php b/src/Adyen/Model/Recurring/RecurringDetailsRequest.php index 62dd8287e..94163254d 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailsRequest.php +++ b/src/Adyen/Model/Recurring/RecurringDetailsRequest.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/Recurring/RecurringDetailsResult.php b/src/Adyen/Model/Recurring/RecurringDetailsResult.php index 3447d4774..9a0cba17b 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailsResult.php +++ b/src/Adyen/Model/Recurring/RecurringDetailsResult.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php index 4f427459b..396a5910f 100644 --- a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php +++ b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php @@ -545,6 +545,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 * diff --git a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php index bec19ca61..d31479264 100644 --- a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php +++ b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Recurring/ServiceError.php b/src/Adyen/Model/Recurring/ServiceError.php index dafb6df4a..dd438ef3a 100644 --- a/src/Adyen/Model/Recurring/ServiceError.php +++ b/src/Adyen/Model/Recurring/ServiceError.php @@ -537,6 +537,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 * diff --git a/src/Adyen/Model/Recurring/TokenDetails.php b/src/Adyen/Model/Recurring/TokenDetails.php index 11e83b8b5..3c990e772 100644 --- a/src/Adyen/Model/Recurring/TokenDetails.php +++ b/src/Adyen/Model/Recurring/TokenDetails.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php index e88e2f7d2..1d51fa657 100644 --- a/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php b/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php index 68fccf2bf..70293c325 100644 --- a/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php +++ b/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php @@ -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 * diff --git a/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php b/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php index 468c229fa..d3c23e923 100644 --- a/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php +++ b/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/ReportWebhooks/Resource.php b/src/Adyen/Model/ReportWebhooks/Resource.php index db05d0d89..0419e7a00 100644 --- a/src/Adyen/Model/ReportWebhooks/Resource.php +++ b/src/Adyen/Model/ReportWebhooks/Resource.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/ReportWebhooks/ResourceReference.php b/src/Adyen/Model/ReportWebhooks/ResourceReference.php index 8623bd866..db5557146 100644 --- a/src/Adyen/Model/ReportWebhooks/ResourceReference.php +++ b/src/Adyen/Model/ReportWebhooks/ResourceReference.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/StoredValue/Amount.php b/src/Adyen/Model/StoredValue/Amount.php index 13e882d42..0b370a910 100644 --- a/src/Adyen/Model/StoredValue/Amount.php +++ b/src/Adyen/Model/StoredValue/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/StoredValue/ServiceError.php b/src/Adyen/Model/StoredValue/ServiceError.php index 32c7e924e..eb1fab0bc 100644 --- a/src/Adyen/Model/StoredValue/ServiceError.php +++ b/src/Adyen/Model/StoredValue/ServiceError.php @@ -537,6 +537,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php index c61549851..826093c0f 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php @@ -653,6 +653,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php index 06aa6f998..9a1e34d00 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php index f58dd83f5..668617d0d 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php @@ -690,6 +690,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php index dbd5d53ef..6652e723a 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php b/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php index d45dff5fb..31eff04ee 100644 --- a/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php @@ -653,6 +653,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php b/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php index 2b54d1c3f..0ee381b20 100644 --- a/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php @@ -610,6 +610,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php b/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php index 2418e52c2..8776676ea 100644 --- a/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php @@ -723,6 +723,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php b/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php index 51315d085..4d4bed618 100644 --- a/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php b/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php index c9c329db7..19fc0a7cf 100644 --- a/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php @@ -723,6 +723,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php b/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php index a440ea4ca..3700f4e91 100644 --- a/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php @@ -576,6 +576,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php b/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php index f5127bf8d..a792440e2 100644 --- a/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php @@ -545,6 +545,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 * diff --git a/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php b/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php index 9aae687e1..50a6e1dcc 100644 --- a/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/Amount.php b/src/Adyen/Model/TransactionWebhooks/Amount.php index a4d34c47f..13bffa6f5 100644 --- a/src/Adyen/Model/TransactionWebhooks/Amount.php +++ b/src/Adyen/Model/TransactionWebhooks/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php index 5f3c052c5..7c4b9b229 100644 --- a/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/Resource.php b/src/Adyen/Model/TransactionWebhooks/Resource.php index 559b434ed..a81359b32 100644 --- a/src/Adyen/Model/TransactionWebhooks/Resource.php +++ b/src/Adyen/Model/TransactionWebhooks/Resource.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php index eccf3942c..4a378dacf 100644 --- a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php +++ b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/Transaction.php b/src/Adyen/Model/TransactionWebhooks/Transaction.php index 07b2549f6..dd7585401 100644 --- a/src/Adyen/Model/TransactionWebhooks/Transaction.php +++ b/src/Adyen/Model/TransactionWebhooks/Transaction.php @@ -732,6 +732,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php index dc264b106..5078d509b 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php +++ b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/TransactionWebhooks/TransferData.php b/src/Adyen/Model/TransactionWebhooks/TransferData.php index ecb5933a7..0e27386a2 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransferData.php +++ b/src/Adyen/Model/TransactionWebhooks/TransferData.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php index 0a526a14e..f6f35db49 100644 --- a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php b/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php index 488cc6d97..7ef7e40e0 100644 --- a/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php @@ -436,6 +436,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 * diff --git a/src/Adyen/Model/TransferWebhooks/Address.php b/src/Adyen/Model/TransferWebhooks/Address.php index e2508f560..c3ab2458d 100644 --- a/src/Adyen/Model/TransferWebhooks/Address.php +++ b/src/Adyen/Model/TransferWebhooks/Address.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/TransferWebhooks/Amount.php b/src/Adyen/Model/TransferWebhooks/Amount.php index 8a82148db..a4a866d69 100644 --- a/src/Adyen/Model/TransferWebhooks/Amount.php +++ b/src/Adyen/Model/TransferWebhooks/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php b/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php index 7c06fa38e..1c34dbffc 100644 --- a/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php +++ b/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php @@ -472,6 +472,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 * diff --git a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php index 592f24e5e..60f27c61c 100644 --- a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/TransferWebhooks/BalanceMutation.php b/src/Adyen/Model/TransferWebhooks/BalanceMutation.php index b6e8b93d8..5385f0db8 100644 --- a/src/Adyen/Model/TransferWebhooks/BalanceMutation.php +++ b/src/Adyen/Model/TransferWebhooks/BalanceMutation.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php index 0772f3597..c1e5ee6d5 100644 --- a/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3.php index 629ed9498..f312209a5 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index d255f3a3c..dc332a1ff 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -886,6 +886,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 * diff --git a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php index e5d420475..a998b2bd7 100644 --- a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php @@ -475,6 +475,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 * diff --git a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php index c0fa683cf..5a55b7011 100644 --- a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php @@ -581,6 +581,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 * diff --git a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php index 8196e08aa..02388df89 100644 --- a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php b/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php index ad1b8b4da..a88dbca6e 100644 --- a/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php +++ b/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php index 1339a0f8a..23975a0d3 100644 --- a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index d1920bdfa..8c044991e 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php index 6c3e7afd0..1104d3a2a 100644 --- a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php index b39bc3413..afdd5b7a1 100644 --- a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php index 4101a0f43..778756f35 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php @@ -468,6 +468,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 * diff --git a/src/Adyen/Model/TransferWebhooks/IssuedCard.php b/src/Adyen/Model/TransferWebhooks/IssuedCard.php index e1a1b7cd1..fab7296bc 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransferWebhooks/IssuedCard.php @@ -726,6 +726,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 * diff --git a/src/Adyen/Model/TransferWebhooks/MerchantData.php b/src/Adyen/Model/TransferWebhooks/MerchantData.php index e58fa17c5..a0c142590 100644 --- a/src/Adyen/Model/TransferWebhooks/MerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/MerchantData.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/TransferWebhooks/Modification.php b/src/Adyen/Model/TransferWebhooks/Modification.php index 96afc889c..aeeb87623 100644 --- a/src/Adyen/Model/TransferWebhooks/Modification.php +++ b/src/Adyen/Model/TransferWebhooks/Modification.php @@ -662,6 +662,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 * diff --git a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php index a6cbc63c4..7d1585575 100644 --- a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index ad924ca5f..8217c1ff0 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/TransferWebhooks/NameLocation.php b/src/Adyen/Model/TransferWebhooks/NameLocation.php index b50068c7e..a5ccf6c38 100644 --- a/src/Adyen/Model/TransferWebhooks/NameLocation.php +++ b/src/Adyen/Model/TransferWebhooks/NameLocation.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php index 9acddff57..83bc4aace 100644 --- a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php @@ -511,6 +511,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 * diff --git a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php index 9d927ab33..6127aedbb 100644 --- a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php index 0732aca7c..2b43e2380 100644 --- a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php @@ -611,6 +611,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 * diff --git a/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php b/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php index 5083d51b0..f9b275738 100644 --- a/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php index 40b2e9aab..d0aaf015d 100644 --- a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php +++ b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php @@ -625,6 +625,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 * diff --git a/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php b/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php index 8002e73e4..ba6c5f72f 100644 --- a/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php +++ b/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/TransferWebhooks/Resource.php b/src/Adyen/Model/TransferWebhooks/Resource.php index fdb7e0a9b..22ff41d7d 100644 --- a/src/Adyen/Model/TransferWebhooks/Resource.php +++ b/src/Adyen/Model/TransferWebhooks/Resource.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/TransferWebhooks/ResourceReference.php b/src/Adyen/Model/TransferWebhooks/ResourceReference.php index 008447111..b3785dd3f 100644 --- a/src/Adyen/Model/TransferWebhooks/ResourceReference.php +++ b/src/Adyen/Model/TransferWebhooks/ResourceReference.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php index 200f72c76..c783c4484 100644 --- a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php index 394d058c6..3496821fd 100644 --- a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php b/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php index bdef5e2cd..8361e7791 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php b/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php index 36828d06e..1b597654b 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php b/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php index 5936fc287..a23c36ede 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php b/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php index d8296d897..22e9133b0 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php @@ -469,6 +469,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index 1ee94f1c5..4cf371bbe 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -1475,6 +1475,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php index a9f77929e..3f8fb4d1e 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php @@ -816,6 +816,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index 15835482c..17cedffb7 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -1062,6 +1062,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php index c5bc7ef8c..86f4796e3 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php index 2d016eb72..752c3e141 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php @@ -573,6 +573,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php index 940437e17..ccf86af3a 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php @@ -476,6 +476,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationTransferTracking.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationTransferTracking.php index ae7fe4db7..312f626f6 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationTransferTracking.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationTransferTracking.php @@ -434,6 +434,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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php index ddaf7553c..702f08d6d 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php index 1c726c80b..c9456a385 100644 --- a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php index 1da7dc070..dc133729c 100644 --- a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php @@ -544,6 +544,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 * diff --git a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php index 17443b310..7c2bf9262 100644 --- a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Transfers/AdditionalBankIdentification.php b/src/Adyen/Model/Transfers/AdditionalBankIdentification.php index 2849aa165..1d3fff772 100644 --- a/src/Adyen/Model/Transfers/AdditionalBankIdentification.php +++ b/src/Adyen/Model/Transfers/AdditionalBankIdentification.php @@ -436,6 +436,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 * diff --git a/src/Adyen/Model/Transfers/Address.php b/src/Adyen/Model/Transfers/Address.php index 02c0bc1a1..06c0c4b3f 100644 --- a/src/Adyen/Model/Transfers/Address.php +++ b/src/Adyen/Model/Transfers/Address.php @@ -542,6 +542,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 * diff --git a/src/Adyen/Model/Transfers/Amount.php b/src/Adyen/Model/Transfers/Amount.php index e815d3976..a1be006d7 100644 --- a/src/Adyen/Model/Transfers/Amount.php +++ b/src/Adyen/Model/Transfers/Amount.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php index 5fde276f4..5148b6492 100644 --- a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php @@ -514,6 +514,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 * diff --git a/src/Adyen/Model/Transfers/BankAccountV3.php b/src/Adyen/Model/Transfers/BankAccountV3.php index 1517a9cac..d3026814b 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3.php +++ b/src/Adyen/Model/Transfers/BankAccountV3.php @@ -409,6 +409,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 * diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index c50f83a9d..a22da0777 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -886,6 +886,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 * diff --git a/src/Adyen/Model/Transfers/BankCategoryData.php b/src/Adyen/Model/Transfers/BankCategoryData.php index 3a60bb8e8..5ae28035c 100644 --- a/src/Adyen/Model/Transfers/BankCategoryData.php +++ b/src/Adyen/Model/Transfers/BankCategoryData.php @@ -475,6 +475,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 * diff --git a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php index 967de83cc..f50937639 100644 --- a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php @@ -581,6 +581,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 * diff --git a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php index 4e8d744ac..b0f087366 100644 --- a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Transfers/CapitalBalance.php b/src/Adyen/Model/Transfers/CapitalBalance.php index ee4190a6b..391c2af0d 100644 --- a/src/Adyen/Model/Transfers/CapitalBalance.php +++ b/src/Adyen/Model/Transfers/CapitalBalance.php @@ -483,6 +483,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 * diff --git a/src/Adyen/Model/Transfers/CapitalGrant.php b/src/Adyen/Model/Transfers/CapitalGrant.php index e600887b9..380091432 100644 --- a/src/Adyen/Model/Transfers/CapitalGrant.php +++ b/src/Adyen/Model/Transfers/CapitalGrant.php @@ -691,6 +691,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 * diff --git a/src/Adyen/Model/Transfers/CapitalGrantInfo.php b/src/Adyen/Model/Transfers/CapitalGrantInfo.php index aa362b6c0..522eafd64 100644 --- a/src/Adyen/Model/Transfers/CapitalGrantInfo.php +++ b/src/Adyen/Model/Transfers/CapitalGrantInfo.php @@ -443,6 +443,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 * diff --git a/src/Adyen/Model/Transfers/CapitalGrants.php b/src/Adyen/Model/Transfers/CapitalGrants.php index 613eb4023..2a18f1c6e 100644 --- a/src/Adyen/Model/Transfers/CapitalGrants.php +++ b/src/Adyen/Model/Transfers/CapitalGrants.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Transfers/Counterparty.php b/src/Adyen/Model/Transfers/Counterparty.php index 335d26e10..bac2a36b1 100644 --- a/src/Adyen/Model/Transfers/Counterparty.php +++ b/src/Adyen/Model/Transfers/Counterparty.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Transfers/CounterpartyInfoV3.php b/src/Adyen/Model/Transfers/CounterpartyInfoV3.php index 8913205e2..a9fa88df7 100644 --- a/src/Adyen/Model/Transfers/CounterpartyInfoV3.php +++ b/src/Adyen/Model/Transfers/CounterpartyInfoV3.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Transfers/CounterpartyV3.php b/src/Adyen/Model/Transfers/CounterpartyV3.php index 90d2c0a28..abb8eff3b 100644 --- a/src/Adyen/Model/Transfers/CounterpartyV3.php +++ b/src/Adyen/Model/Transfers/CounterpartyV3.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php index 1d864688a..bc42edab5 100644 --- a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Transfers/Fee.php b/src/Adyen/Model/Transfers/Fee.php index fbd1834ab..28fd34f5d 100644 --- a/src/Adyen/Model/Transfers/Fee.php +++ b/src/Adyen/Model/Transfers/Fee.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php index 661a76fda..92e3a65a4 100644 --- a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php index 5fea3c9a2..68a24846d 100644 --- a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Transfers/IbanAccountIdentification.php b/src/Adyen/Model/Transfers/IbanAccountIdentification.php index 74b1f654c..915278dd7 100644 --- a/src/Adyen/Model/Transfers/IbanAccountIdentification.php +++ b/src/Adyen/Model/Transfers/IbanAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Transfers/InternalCategoryData.php b/src/Adyen/Model/Transfers/InternalCategoryData.php index ab31ce17c..682141792 100644 --- a/src/Adyen/Model/Transfers/InternalCategoryData.php +++ b/src/Adyen/Model/Transfers/InternalCategoryData.php @@ -468,6 +468,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 * diff --git a/src/Adyen/Model/Transfers/InvalidField.php b/src/Adyen/Model/Transfers/InvalidField.php index d2f208b79..2ee47848e 100644 --- a/src/Adyen/Model/Transfers/InvalidField.php +++ b/src/Adyen/Model/Transfers/InvalidField.php @@ -446,6 +446,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 * diff --git a/src/Adyen/Model/Transfers/IssuedCard.php b/src/Adyen/Model/Transfers/IssuedCard.php index f1b1e5490..01637de3e 100644 --- a/src/Adyen/Model/Transfers/IssuedCard.php +++ b/src/Adyen/Model/Transfers/IssuedCard.php @@ -726,6 +726,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 * diff --git a/src/Adyen/Model/Transfers/Link.php b/src/Adyen/Model/Transfers/Link.php index 4f9ec8529..84ec99604 100644 --- a/src/Adyen/Model/Transfers/Link.php +++ b/src/Adyen/Model/Transfers/Link.php @@ -369,6 +369,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 * diff --git a/src/Adyen/Model/Transfers/Links.php b/src/Adyen/Model/Transfers/Links.php index d34293ace..3ce6a16b0 100644 --- a/src/Adyen/Model/Transfers/Links.php +++ b/src/Adyen/Model/Transfers/Links.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Transfers/MerchantData.php b/src/Adyen/Model/Transfers/MerchantData.php index f69baa932..5226a8063 100644 --- a/src/Adyen/Model/Transfers/MerchantData.php +++ b/src/Adyen/Model/Transfers/MerchantData.php @@ -505,6 +505,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 * diff --git a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php index 3100e6e92..56eaaa8e4 100644 --- a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php index 598259945..3148ea4ee 100644 --- a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Transfers/NameLocation.php b/src/Adyen/Model/Transfers/NameLocation.php index 1fe9d58bf..b7d8dd6a6 100644 --- a/src/Adyen/Model/Transfers/NameLocation.php +++ b/src/Adyen/Model/Transfers/NameLocation.php @@ -539,6 +539,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 * diff --git a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php index d0b6347a6..21da727ec 100644 --- a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php @@ -511,6 +511,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 * diff --git a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php index 9151369e9..1a77dd379 100644 --- a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php @@ -440,6 +440,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 * diff --git a/src/Adyen/Model/Transfers/PartyIdentification.php b/src/Adyen/Model/Transfers/PartyIdentification.php index 7b9eb5c0f..1b09f67b4 100644 --- a/src/Adyen/Model/Transfers/PartyIdentification.php +++ b/src/Adyen/Model/Transfers/PartyIdentification.php @@ -611,6 +611,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 * diff --git a/src/Adyen/Model/Transfers/PaymentInstrument.php b/src/Adyen/Model/Transfers/PaymentInstrument.php index c87a1e306..5c5be9796 100644 --- a/src/Adyen/Model/Transfers/PaymentInstrument.php +++ b/src/Adyen/Model/Transfers/PaymentInstrument.php @@ -471,6 +471,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 * diff --git a/src/Adyen/Model/Transfers/PlatformPayment.php b/src/Adyen/Model/Transfers/PlatformPayment.php index ff5371ead..3782fad86 100644 --- a/src/Adyen/Model/Transfers/PlatformPayment.php +++ b/src/Adyen/Model/Transfers/PlatformPayment.php @@ -625,6 +625,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 * diff --git a/src/Adyen/Model/Transfers/RelayedAuthorisationData.php b/src/Adyen/Model/Transfers/RelayedAuthorisationData.php index ddebe348d..551380508 100644 --- a/src/Adyen/Model/Transfers/RelayedAuthorisationData.php +++ b/src/Adyen/Model/Transfers/RelayedAuthorisationData.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Transfers/Repayment.php b/src/Adyen/Model/Transfers/Repayment.php index 19a030ed4..7ddeac0ab 100644 --- a/src/Adyen/Model/Transfers/Repayment.php +++ b/src/Adyen/Model/Transfers/Repayment.php @@ -438,6 +438,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 * diff --git a/src/Adyen/Model/Transfers/RepaymentTerm.php b/src/Adyen/Model/Transfers/RepaymentTerm.php index 411942e52..584cf14e4 100644 --- a/src/Adyen/Model/Transfers/RepaymentTerm.php +++ b/src/Adyen/Model/Transfers/RepaymentTerm.php @@ -402,6 +402,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 * diff --git a/src/Adyen/Model/Transfers/ResourceReference.php b/src/Adyen/Model/Transfers/ResourceReference.php index 3d03ed587..cf6576af5 100644 --- a/src/Adyen/Model/Transfers/ResourceReference.php +++ b/src/Adyen/Model/Transfers/ResourceReference.php @@ -437,6 +437,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 * diff --git a/src/Adyen/Model/Transfers/RestServiceError.php b/src/Adyen/Model/Transfers/RestServiceError.php index 1e83eb164..0c48eb9cb 100644 --- a/src/Adyen/Model/Transfers/RestServiceError.php +++ b/src/Adyen/Model/Transfers/RestServiceError.php @@ -654,6 +654,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 * diff --git a/src/Adyen/Model/Transfers/ReturnTransferRequest.php b/src/Adyen/Model/Transfers/ReturnTransferRequest.php index 1adde00b7..c7fc40f91 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferRequest.php +++ b/src/Adyen/Model/Transfers/ReturnTransferRequest.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Transfers/ReturnTransferResponse.php b/src/Adyen/Model/Transfers/ReturnTransferResponse.php index b68357fba..58dacfe76 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferResponse.php +++ b/src/Adyen/Model/Transfers/ReturnTransferResponse.php @@ -504,6 +504,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 * diff --git a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php index c64230077..294b68e36 100644 --- a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php index dbbcb2eba..2ae4691ff 100644 --- a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php @@ -474,6 +474,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 * diff --git a/src/Adyen/Model/Transfers/ServiceError.php b/src/Adyen/Model/Transfers/ServiceError.php index 00ece6de7..5219c284d 100644 --- a/src/Adyen/Model/Transfers/ServiceError.php +++ b/src/Adyen/Model/Transfers/ServiceError.php @@ -503,6 +503,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 * diff --git a/src/Adyen/Model/Transfers/ThresholdRepayment.php b/src/Adyen/Model/Transfers/ThresholdRepayment.php index 71e5ead29..408b7b7e2 100644 --- a/src/Adyen/Model/Transfers/ThresholdRepayment.php +++ b/src/Adyen/Model/Transfers/ThresholdRepayment.php @@ -372,6 +372,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 * diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index 403f416be..a31229532 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -732,6 +732,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 * diff --git a/src/Adyen/Model/Transfers/TransactionSearchResponse.php b/src/Adyen/Model/Transfers/TransactionSearchResponse.php index edb4d16f2..08b6fa163 100644 --- a/src/Adyen/Model/Transfers/TransactionSearchResponse.php +++ b/src/Adyen/Model/Transfers/TransactionSearchResponse.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index 3de4d767e..a4ffb50aa 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -1145,6 +1145,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 * diff --git a/src/Adyen/Model/Transfers/TransferCategoryData.php b/src/Adyen/Model/Transfers/TransferCategoryData.php index 02aa45793..26788be6d 100644 --- a/src/Adyen/Model/Transfers/TransferCategoryData.php +++ b/src/Adyen/Model/Transfers/TransferCategoryData.php @@ -816,6 +816,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 * diff --git a/src/Adyen/Model/Transfers/TransferData.php b/src/Adyen/Model/Transfers/TransferData.php index 5bf9a9409..4c3b8256a 100644 --- a/src/Adyen/Model/Transfers/TransferData.php +++ b/src/Adyen/Model/Transfers/TransferData.php @@ -406,6 +406,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 * diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index f1e94a103..f9cf0f4de 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -764,6 +764,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 * diff --git a/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php b/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php index a757324cf..5a1ddf4d7 100644 --- a/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php @@ -403,6 +403,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 * diff --git a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php index 8de0363f1..0b91b793b 100644 --- a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php @@ -477,6 +477,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 * diff --git a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php index daf294700..0c0d823b8 100644 --- a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php @@ -544,6 +544,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 * diff --git a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php index 4abe664ed..aff742002 100644 --- a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php +++ b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php @@ -611,6 +611,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 * diff --git a/src/Adyen/Service/BalancePlatform/ManageCardPINApi.php b/src/Adyen/Service/BalancePlatform/ManageCardPINApi.php new file mode 100644 index 000000000..6dde6b360 --- /dev/null +++ b/src/Adyen/Service/BalancePlatform/ManageCardPINApi.php @@ -0,0 +1,85 @@ +baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * Change a card PIN + * + * @param \Adyen\Model\BalancePlatform\PinChangeRequest $pinChangeRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\PinChangeResponse + * @throws AdyenException + */ + public function changeCardPin(\Adyen\Model\BalancePlatform\PinChangeRequest $pinChangeRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\PinChangeResponse + { + $endpoint = $this->baseURL . "/pins/change"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $pinChangeRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PinChangeResponse::class); + } + + /** + * Get an RSA public key + * + * @param array|null $requestOptions ['queryParams' => ['purpose'=> string, 'format'=> string]] + * @return \Adyen\Model\BalancePlatform\PublicKeyResponse + * @throws AdyenException + */ + public function publicKey(array $requestOptions = null): \Adyen\Model\BalancePlatform\PublicKeyResponse + { + $endpoint = $this->baseURL . "/publicKey"; + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PublicKeyResponse::class); + } + + /** + * Reveal a card PIN + * + * @param \Adyen\Model\BalancePlatform\RevealPinRequest $revealPinRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\RevealPinResponse + * @throws AdyenException + */ + public function revealCardPin(\Adyen\Model\BalancePlatform\RevealPinRequest $revealPinRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\RevealPinResponse + { + $endpoint = $this->baseURL . "/pins/reveal"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $revealPinRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\RevealPinResponse::class); + } +} diff --git a/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php b/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php index 77105265c..9d4f44b91 100644 --- a/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php +++ b/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php @@ -114,6 +114,21 @@ public function listNetworkTokens(string $id, array $requestOptions = null): \Ad return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\ListNetworkTokensResponse::class); } + /** + * Reveal the data of a payment instrument + * + * @param \Adyen\Model\BalancePlatform\PaymentInstrumentRevealRequest $paymentInstrumentRevealRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\PaymentInstrumentRevealResponse + * @throws AdyenException + */ + public function revealDataOfPaymentInstrument(\Adyen\Model\BalancePlatform\PaymentInstrumentRevealRequest $paymentInstrumentRevealRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrumentRevealResponse + { + $endpoint = $this->baseURL . "/paymentInstruments/reveal"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentInstrumentRevealRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaymentInstrumentRevealResponse::class); + } + /** * Update a payment instrument *