From c20a307db4915733b3674cf779ad5edc9499870a Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Wed, 24 Jul 2024 06:54:15 +0000 Subject: [PATCH] [reformat][adyen-sdk-automation] automated change --- .../Model/AcsWebhooks/ObjectSerializer.php | 9 +- .../Model/BalanceControl/ObjectSerializer.php | 9 +- .../BalancePlatform/CapabilitySettings.php | 8 +- .../BalancePlatform/ObjectSerializer.php | 9 +- .../Model/BinLookup/ObjectSerializer.php | 9 +- src/Adyen/Model/Checkout/CardDetails.php | 31 + src/Adyen/Model/Checkout/CardDonations.php | 31 + .../Model/Checkout/CheckoutPaymentMethod.php | 35 +- .../Model/Checkout/DonationPaymentMethod.php | 31 + src/Adyen/Model/Checkout/MbwayDetails.php | 4 +- src/Adyen/Model/Checkout/ObjectSerializer.php | 9 +- src/Adyen/Model/Checkout/VippsDetails.php | 2 +- .../CapabilitySettings.php | 8 +- .../ObjectSerializer.php | 9 +- .../Model/DataProtection/ObjectSerializer.php | 9 +- src/Adyen/Model/Disputes/ObjectSerializer.php | 9 +- .../Model/LegalEntityManagement/Document.php | 4 +- .../GetTermsOfServiceDocumentRequest.php | 31 + .../GetTermsOfServiceDocumentResponse.php | 31 + .../IdentificationData.php | 2 +- .../LegalEntityManagement/LegalEntity.php | 2 +- .../LegalEntityAssociation.php | 35 +- .../LegalEntityManagement/LegalEntityInfo.php | 2 +- .../LegalEntityInfoRequiredType.php | 2 +- .../ObjectSerializer.php | 9 +- .../OnboardingLinkSettings.php | 30 +- .../Model/Management/ObjectSerializer.php | 9 +- .../ManagementWebhooks/ObjectSerializer.php | 9 +- .../ObjectSerializer.php | 9 +- src/Adyen/Model/Payments/ObjectSerializer.php | 9 +- .../PaymentsApp/BoardingTokenRequest.php | 410 ++++++++++++ .../PaymentsApp/BoardingTokenResponse.php | 444 +++++++++++++ .../DefaultErrorResponseEntity.php | 625 ++++++++++++++++++ src/Adyen/Model/PaymentsApp/InvalidField.php | 478 ++++++++++++++ .../Model/PaymentsApp/ModelInterface.php | 92 +++ .../Model/PaymentsApp/ObjectSerializer.php | 316 +++++++++ .../Model/PaymentsApp/PaymentsAppDto.php | 509 ++++++++++++++ .../Model/PaymentsApp/PaymentsAppResponse.php | 410 ++++++++++++ src/Adyen/Model/Payout/ObjectSerializer.php | 9 +- .../Model/PosMobile/ObjectSerializer.php | 9 +- .../Model/Recurring/ObjectSerializer.php | 9 +- .../Model/ReportWebhooks/ObjectSerializer.php | 9 +- .../Model/StoredValue/ObjectSerializer.php | 9 +- .../TransactionWebhooks/ObjectSerializer.php | 9 +- .../Model/TransferWebhooks/Modification.php | 2 + .../TransferWebhooks/ObjectSerializer.php | 9 +- .../Model/TransferWebhooks/TransferData.php | 8 + .../Model/TransferWebhooks/TransferEvent.php | 2 + src/Adyen/Model/Transfers/Modification.php | 2 + .../Model/Transfers/ObjectSerializer.php | 9 +- src/Adyen/Model/Transfers/Transfer.php | 8 + src/Adyen/Model/Transfers/TransferData.php | 8 + src/Adyen/Model/Transfers/TransferEvent.php | 2 + .../BalancePlatform/BalanceAccountsApi.php | 3 +- .../BankAccountValidationApi.php | 3 +- .../BalancePlatform/ManageSCADevicesApi.php | 3 +- .../BalancePlatform/NetworkTokensApi.php | 3 +- src/Adyen/Service/Checkout/RecurringApi.php | 3 +- .../BusinessLinesApi.php | 3 +- .../LegalEntityManagement/DocumentsApi.php | 3 +- .../TransferInstrumentsApi.php | 3 +- .../AllowedOriginsCompanyLevelApi.php | 3 +- .../AllowedOriginsMerchantLevelApi.php | 3 +- .../Service/Management/MyAPICredentialApi.php | 3 +- .../PaymentMethodsMerchantLevelApi.php | 3 +- .../PayoutSettingsMerchantLevelApi.php | 3 +- .../Management/TerminalsTerminalLevelApi.php | 3 +- .../Management/WebhooksCompanyLevelApi.php | 3 +- .../Management/WebhooksMerchantLevelApi.php | 3 +- .../Service/PaymentsApp/PaymentsAppApi.php | 121 ++++ 70 files changed, 3808 insertions(+), 155 deletions(-) create mode 100644 src/Adyen/Model/PaymentsApp/BoardingTokenRequest.php create mode 100644 src/Adyen/Model/PaymentsApp/BoardingTokenResponse.php create mode 100644 src/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.php create mode 100644 src/Adyen/Model/PaymentsApp/InvalidField.php create mode 100644 src/Adyen/Model/PaymentsApp/ModelInterface.php create mode 100644 src/Adyen/Model/PaymentsApp/ObjectSerializer.php create mode 100644 src/Adyen/Model/PaymentsApp/PaymentsAppDto.php create mode 100644 src/Adyen/Model/PaymentsApp/PaymentsAppResponse.php create mode 100644 src/Adyen/Service/PaymentsApp/PaymentsAppApi.php diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce8..e14421342 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index b5ae3313d..2ed0eb3a0 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index 67e88b5f9..ada0db0b3 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index 141ec623e..fa9af7e82 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceeda..09437b7d8 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 951f0c626..9a369d10b 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -61,6 +61,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'recurringDetailReference' => 'string', 'shopperNotificationReference' => 'string', 'srcCorrelationId' => 'string', + 'srcDigitalCardId' => 'string', 'srcScheme' => 'string', 'srcTokenReference' => 'string', 'storedPaymentMethodId' => 'string', @@ -93,6 +94,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'recurringDetailReference' => null, 'shopperNotificationReference' => null, 'srcCorrelationId' => null, + 'srcDigitalCardId' => null, 'srcScheme' => null, 'srcTokenReference' => null, 'storedPaymentMethodId' => null, @@ -123,6 +125,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'recurringDetailReference' => false, 'shopperNotificationReference' => false, 'srcCorrelationId' => false, + 'srcDigitalCardId' => false, 'srcScheme' => false, 'srcTokenReference' => false, 'storedPaymentMethodId' => false, @@ -233,6 +236,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'recurringDetailReference', 'shopperNotificationReference' => 'shopperNotificationReference', 'srcCorrelationId' => 'srcCorrelationId', + 'srcDigitalCardId' => 'srcDigitalCardId', 'srcScheme' => 'srcScheme', 'srcTokenReference' => 'srcTokenReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', @@ -263,6 +267,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'setRecurringDetailReference', 'shopperNotificationReference' => 'setShopperNotificationReference', 'srcCorrelationId' => 'setSrcCorrelationId', + 'srcDigitalCardId' => 'setSrcDigitalCardId', 'srcScheme' => 'setSrcScheme', 'srcTokenReference' => 'setSrcTokenReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', @@ -293,6 +298,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'getRecurringDetailReference', 'shopperNotificationReference' => 'getShopperNotificationReference', 'srcCorrelationId' => 'getSrcCorrelationId', + 'srcDigitalCardId' => 'getSrcDigitalCardId', 'srcScheme' => 'getSrcScheme', 'srcTokenReference' => 'getSrcTokenReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', @@ -408,6 +414,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('srcCorrelationId', $data ?? [], null); + $this->setIfExists('srcDigitalCardId', $data ?? [], null); $this->setIfExists('srcScheme', $data ?? [], null); $this->setIfExists('srcTokenReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); @@ -897,6 +904,30 @@ public function setSrcCorrelationId($srcCorrelationId) return $this; } + /** + * Gets srcDigitalCardId + * + * @return string|null + */ + public function getSrcDigitalCardId() + { + return $this->container['srcDigitalCardId']; + } + + /** + * Sets srcDigitalCardId + * + * @param string|null $srcDigitalCardId The SRC reference for the Click to Pay token. + * + * @return self + */ + public function setSrcDigitalCardId($srcDigitalCardId) + { + $this->container['srcDigitalCardId'] = $srcDigitalCardId; + + return $this; + } + /** * Gets srcScheme * diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index a2d5ddf76..bc8a5eaee 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -61,6 +61,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'recurringDetailReference' => 'string', 'shopperNotificationReference' => 'string', 'srcCorrelationId' => 'string', + 'srcDigitalCardId' => 'string', 'srcScheme' => 'string', 'srcTokenReference' => 'string', 'storedPaymentMethodId' => 'string', @@ -93,6 +94,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'recurringDetailReference' => null, 'shopperNotificationReference' => null, 'srcCorrelationId' => null, + 'srcDigitalCardId' => null, 'srcScheme' => null, 'srcTokenReference' => null, 'storedPaymentMethodId' => null, @@ -123,6 +125,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'recurringDetailReference' => false, 'shopperNotificationReference' => false, 'srcCorrelationId' => false, + 'srcDigitalCardId' => false, 'srcScheme' => false, 'srcTokenReference' => false, 'storedPaymentMethodId' => false, @@ -233,6 +236,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'recurringDetailReference', 'shopperNotificationReference' => 'shopperNotificationReference', 'srcCorrelationId' => 'srcCorrelationId', + 'srcDigitalCardId' => 'srcDigitalCardId', 'srcScheme' => 'srcScheme', 'srcTokenReference' => 'srcTokenReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', @@ -263,6 +267,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'setRecurringDetailReference', 'shopperNotificationReference' => 'setShopperNotificationReference', 'srcCorrelationId' => 'setSrcCorrelationId', + 'srcDigitalCardId' => 'setSrcDigitalCardId', 'srcScheme' => 'setSrcScheme', 'srcTokenReference' => 'setSrcTokenReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', @@ -293,6 +298,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'getRecurringDetailReference', 'shopperNotificationReference' => 'getShopperNotificationReference', 'srcCorrelationId' => 'getSrcCorrelationId', + 'srcDigitalCardId' => 'getSrcDigitalCardId', 'srcScheme' => 'getSrcScheme', 'srcTokenReference' => 'getSrcTokenReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', @@ -408,6 +414,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('srcCorrelationId', $data ?? [], null); + $this->setIfExists('srcDigitalCardId', $data ?? [], null); $this->setIfExists('srcScheme', $data ?? [], null); $this->setIfExists('srcTokenReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); @@ -897,6 +904,30 @@ public function setSrcCorrelationId($srcCorrelationId) return $this; } + /** + * Gets srcDigitalCardId + * + * @return string|null + */ + public function getSrcDigitalCardId() + { + return $this->container['srcDigitalCardId']; + } + + /** + * Sets srcDigitalCardId + * + * @param string|null $srcDigitalCardId The SRC reference for the Click to Pay token. + * + * @return self + */ + public function setSrcDigitalCardId($srcDigitalCardId) + { + $this->container['srcDigitalCardId'] = $srcDigitalCardId; + + return $this; + } + /** * Gets srcScheme * diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 8bfe4064d..e6e4a9909 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -79,6 +79,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => 'string', 'shopperNotificationReference' => 'string', 'srcCorrelationId' => 'string', + 'srcDigitalCardId' => 'string', 'srcScheme' => 'string', 'srcTokenReference' => 'string', 'threeDS2SdkVersion' => 'string', @@ -151,6 +152,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => null, 'shopperNotificationReference' => null, 'srcCorrelationId' => null, + 'srcDigitalCardId' => null, 'srcScheme' => null, 'srcTokenReference' => null, 'threeDS2SdkVersion' => null, @@ -221,6 +223,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => false, 'shopperNotificationReference' => false, 'srcCorrelationId' => false, + 'srcDigitalCardId' => false, 'srcScheme' => false, 'srcTokenReference' => false, 'threeDS2SdkVersion' => false, @@ -371,6 +374,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', 'srcCorrelationId' => 'srcCorrelationId', + 'srcDigitalCardId' => 'srcDigitalCardId', 'srcScheme' => 'srcScheme', 'srcTokenReference' => 'srcTokenReference', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', @@ -441,6 +445,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', 'srcCorrelationId' => 'setSrcCorrelationId', + 'srcDigitalCardId' => 'setSrcDigitalCardId', 'srcScheme' => 'setSrcScheme', 'srcTokenReference' => 'setSrcTokenReference', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', @@ -511,6 +516,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', 'srcCorrelationId' => 'getSrcCorrelationId', + 'srcDigitalCardId' => 'getSrcDigitalCardId', 'srcScheme' => 'getSrcScheme', 'srcTokenReference' => 'getSrcTokenReference', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', @@ -631,6 +637,7 @@ public function __construct(array $data = null) $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('srcCorrelationId', $data ?? [], null); + $this->setIfExists('srcDigitalCardId', $data ?? [], null); $this->setIfExists('srcScheme', $data ?? [], null); $this->setIfExists('srcTokenReference', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); @@ -1569,6 +1576,30 @@ public function setSrcCorrelationId($srcCorrelationId) return $this; } + /** + * Gets srcDigitalCardId + * + * @return string|null + */ + public function getSrcDigitalCardId() + { + return $this->container['srcDigitalCardId']; + } + + /** + * Sets srcDigitalCardId + * + * @param string|null $srcDigitalCardId The SRC reference for the Click to Pay token. + * + * @return self + */ + public function setSrcDigitalCardId($srcDigitalCardId) + { + $this->container['srcDigitalCardId'] = $srcDigitalCardId; + + return $this; + } + /** * Gets srcScheme * @@ -1846,7 +1877,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1870,7 +1901,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index a8c863311..360034729 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -65,6 +65,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => 'string', 'shopperNotificationReference' => 'string', 'srcCorrelationId' => 'string', + 'srcDigitalCardId' => 'string', 'srcScheme' => 'string', 'srcTokenReference' => 'string', 'threeDS2SdkVersion' => 'string', @@ -101,6 +102,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => null, 'shopperNotificationReference' => null, 'srcCorrelationId' => null, + 'srcDigitalCardId' => null, 'srcScheme' => null, 'srcTokenReference' => null, 'threeDS2SdkVersion' => null, @@ -135,6 +137,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'number' => false, 'shopperNotificationReference' => false, 'srcCorrelationId' => false, + 'srcDigitalCardId' => false, 'srcScheme' => false, 'srcTokenReference' => false, 'threeDS2SdkVersion' => false, @@ -249,6 +252,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', 'srcCorrelationId' => 'srcCorrelationId', + 'srcDigitalCardId' => 'srcDigitalCardId', 'srcScheme' => 'srcScheme', 'srcTokenReference' => 'srcTokenReference', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', @@ -283,6 +287,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', 'srcCorrelationId' => 'setSrcCorrelationId', + 'srcDigitalCardId' => 'setSrcDigitalCardId', 'srcScheme' => 'setSrcScheme', 'srcTokenReference' => 'setSrcTokenReference', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', @@ -317,6 +322,7 @@ public function isNullableSetToNull(string $property): bool 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', 'srcCorrelationId' => 'getSrcCorrelationId', + 'srcDigitalCardId' => 'getSrcDigitalCardId', 'srcScheme' => 'getSrcScheme', 'srcTokenReference' => 'getSrcTokenReference', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', @@ -401,6 +407,7 @@ public function __construct(array $data = null) $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('srcCorrelationId', $data ?? [], null); + $this->setIfExists('srcDigitalCardId', $data ?? [], null); $this->setIfExists('srcScheme', $data ?? [], null); $this->setIfExists('srcTokenReference', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); @@ -943,6 +950,30 @@ public function setSrcCorrelationId($srcCorrelationId) return $this; } + /** + * Gets srcDigitalCardId + * + * @return string|null + */ + public function getSrcDigitalCardId() + { + return $this->container['srcDigitalCardId']; + } + + /** + * Sets srcDigitalCardId + * + * @param string|null $srcDigitalCardId The SRC reference for the Click to Pay token. + * + * @return self + */ + public function setSrcDigitalCardId($srcDigitalCardId) + { + $this->container['srcDigitalCardId'] = $srcDigitalCardId; + + return $this; + } + /** * Gets srcScheme * diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index dc73d3c30..becc716f0 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18f..628f63adc 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 6787fd034..a5087a929 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 77bba385d..478ff8914 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 6629bee4b..2d912cd58 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733ae..fe8491817 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index 5ef9f66af..d363f9e2a 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 3de4d3b27..bbb19a997 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -305,6 +305,7 @@ public function getModelName() public const TYPE_PROOF_OF_INDUSTRY = 'proofOfIndustry'; public const TYPE_CONSTITUTIONAL_DOCUMENT = 'constitutionalDocument'; public const TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE = 'proofOfFundingOrWealthSource'; + public const TYPE_PROOF_OF_RELATIONSHIP = 'proofOfRelationship'; /** * Gets allowable values of the enum @@ -332,6 +333,7 @@ public function getTypeAllowableValues() self::TYPE_PROOF_OF_INDUSTRY, self::TYPE_CONSTITUTIONAL_DOCUMENT, self::TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE, + self::TYPE_PROOF_OF_RELATIONSHIP, ]; } /** @@ -728,7 +730,7 @@ public function getType() /** * Sets type * - * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index 9cf9151fd..63b3cc739 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -45,6 +45,7 @@ class GetTermsOfServiceDocumentRequest implements ModelInterface, ArrayAccess, \ */ protected static $openAPITypes = [ 'language' => 'string', + 'termsOfServiceDocumentFormat' => 'string', 'type' => 'string' ]; @@ -57,6 +58,7 @@ class GetTermsOfServiceDocumentRequest implements ModelInterface, ArrayAccess, \ */ protected static $openAPIFormats = [ 'language' => null, + 'termsOfServiceDocumentFormat' => null, 'type' => null ]; @@ -67,6 +69,7 @@ class GetTermsOfServiceDocumentRequest implements ModelInterface, ArrayAccess, \ */ protected static $openAPINullables = [ 'language' => false, + 'termsOfServiceDocumentFormat' => false, 'type' => false ]; @@ -157,6 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'language' => 'language', + 'termsOfServiceDocumentFormat' => 'termsOfServiceDocumentFormat', 'type' => 'type' ]; @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'language' => 'setLanguage', + 'termsOfServiceDocumentFormat' => 'setTermsOfServiceDocumentFormat', 'type' => 'setType' ]; @@ -177,6 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'language' => 'getLanguage', + 'termsOfServiceDocumentFormat' => 'getTermsOfServiceDocumentFormat', 'type' => 'getType' ]; @@ -264,6 +270,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('termsOfServiceDocumentFormat', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -348,6 +355,30 @@ public function setLanguage($language) return $this; } + /** + * Gets termsOfServiceDocumentFormat + * + * @return string|null + */ + public function getTermsOfServiceDocumentFormat() + { + return $this->container['termsOfServiceDocumentFormat']; + } + + /** + * Sets termsOfServiceDocumentFormat + * + * @param string|null $termsOfServiceDocumentFormat The requested format for the Terms of Service document. Default value: JSON. + * + * @return self + */ + public function setTermsOfServiceDocumentFormat($termsOfServiceDocumentFormat) + { + $this->container['termsOfServiceDocumentFormat'] = $termsOfServiceDocumentFormat; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index 504e3a725..990a5f4e4 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -47,6 +47,7 @@ class GetTermsOfServiceDocumentResponse implements ModelInterface, ArrayAccess, 'document' => 'string', 'id' => 'string', 'language' => 'string', + 'termsOfServiceDocumentFormat' => 'string', 'termsOfServiceDocumentId' => 'string', 'type' => 'string' ]; @@ -62,6 +63,7 @@ class GetTermsOfServiceDocumentResponse implements ModelInterface, ArrayAccess, 'document' => 'byte', 'id' => null, 'language' => null, + 'termsOfServiceDocumentFormat' => null, 'termsOfServiceDocumentId' => null, 'type' => null ]; @@ -75,6 +77,7 @@ class GetTermsOfServiceDocumentResponse implements ModelInterface, ArrayAccess, 'document' => false, 'id' => false, 'language' => false, + 'termsOfServiceDocumentFormat' => false, 'termsOfServiceDocumentId' => false, 'type' => false ]; @@ -168,6 +171,7 @@ public function isNullableSetToNull(string $property): bool 'document' => 'document', 'id' => 'id', 'language' => 'language', + 'termsOfServiceDocumentFormat' => 'termsOfServiceDocumentFormat', 'termsOfServiceDocumentId' => 'termsOfServiceDocumentId', 'type' => 'type' ]; @@ -181,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'document' => 'setDocument', 'id' => 'setId', 'language' => 'setLanguage', + 'termsOfServiceDocumentFormat' => 'setTermsOfServiceDocumentFormat', 'termsOfServiceDocumentId' => 'setTermsOfServiceDocumentId', 'type' => 'setType' ]; @@ -194,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'document' => 'getDocument', 'id' => 'getId', 'language' => 'getLanguage', + 'termsOfServiceDocumentFormat' => 'getTermsOfServiceDocumentFormat', 'termsOfServiceDocumentId' => 'getTermsOfServiceDocumentId', 'type' => 'getType' ]; @@ -284,6 +290,7 @@ public function __construct(array $data = null) $this->setIfExists('document', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('termsOfServiceDocumentFormat', $data ?? [], null); $this->setIfExists('termsOfServiceDocumentId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -411,6 +418,30 @@ public function setLanguage($language) return $this; } + /** + * Gets termsOfServiceDocumentFormat + * + * @return string|null + */ + public function getTermsOfServiceDocumentFormat() + { + return $this->container['termsOfServiceDocumentFormat']; + } + + /** + * Sets termsOfServiceDocumentFormat + * + * @param string|null $termsOfServiceDocumentFormat The format of the Terms of Service document. + * + * @return self + */ + public function setTermsOfServiceDocumentFormat($termsOfServiceDocumentFormat) + { + $this->container['termsOfServiceDocumentFormat'] = $termsOfServiceDocumentFormat; + + return $this; + } + /** * Gets termsOfServiceDocumentId * diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 70d0c298f..7dcaee0df 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -507,7 +507,7 @@ public function getType() /** * Sets type * - * @param string $type Type of identity data. For individuals, the `type` value is **nationalIdNumber**. For individuals in these countries, the following types are supported. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** + * @param string $type Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index ccd961301..ae12241ca 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -767,7 +767,7 @@ public function getVerificationPlan() /** * Sets verificationPlan * - * @param string|null $verificationPlan A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + * @param string|null $verificationPlan A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index a74414730..ac4738f9c 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -49,6 +49,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => 'string', 'legalEntityId' => 'string', 'name' => 'string', + 'relationship' => 'string', 'settlorExemptionReason' => 'string[]', 'type' => 'string' ]; @@ -66,6 +67,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => null, 'legalEntityId' => null, 'name' => null, + 'relationship' => null, 'settlorExemptionReason' => null, 'type' => null ]; @@ -81,6 +83,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => false, 'legalEntityId' => false, 'name' => false, + 'relationship' => false, 'settlorExemptionReason' => false, 'type' => false ]; @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'jobTitle', 'legalEntityId' => 'legalEntityId', 'name' => 'name', + 'relationship' => 'relationship', 'settlorExemptionReason' => 'settlorExemptionReason', 'type' => 'type' ]; @@ -191,6 +195,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'setJobTitle', 'legalEntityId' => 'setLegalEntityId', 'name' => 'setName', + 'relationship' => 'setRelationship', 'settlorExemptionReason' => 'setSettlorExemptionReason', 'type' => 'setType' ]; @@ -206,6 +211,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'getJobTitle', 'legalEntityId' => 'getLegalEntityId', 'name' => 'getName', + 'relationship' => 'getRelationship', 'settlorExemptionReason' => 'getSettlorExemptionReason', 'type' => 'getType' ]; @@ -254,6 +260,7 @@ public function getModelName() public const TYPE_DEFINED_BENEFICIARY = 'definedBeneficiary'; public const TYPE_DIRECTOR = 'director'; public const TYPE_IMMEDIATE_PARENT_COMPANY = 'immediateParentCompany'; + public const TYPE_LEGAL_REPRESENTATIVE = 'legalRepresentative'; public const TYPE_PCI_SIGNATORY = 'pciSignatory'; public const TYPE_PROTECTOR = 'protector'; public const TYPE_SECONDARY_TRUSTEE = 'secondaryTrustee'; @@ -278,6 +285,7 @@ public function getTypeAllowableValues() self::TYPE_DEFINED_BENEFICIARY, self::TYPE_DIRECTOR, self::TYPE_IMMEDIATE_PARENT_COMPANY, + self::TYPE_LEGAL_REPRESENTATIVE, self::TYPE_PCI_SIGNATORY, self::TYPE_PROTECTOR, self::TYPE_SECONDARY_TRUSTEE, @@ -312,6 +320,7 @@ public function __construct(array $data = null) $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('relationship', $data ?? [], null); $this->setIfExists('settlorExemptionReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -493,6 +502,30 @@ public function setName($name) return $this; } + /** + * Gets relationship + * + * @return string|null + */ + public function getRelationship() + { + return $this->container['relationship']; + } + + /** + * Sets relationship + * + * @param string|null $relationship The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. + * + * @return self + */ + public function setRelationship($relationship) + { + $this->container['relationship'] = $relationship; + + return $this; + } + /** * Gets settlorExemptionReason * @@ -530,7 +563,7 @@ public function getType() /** * Sets type * - * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 618224dbd..5f52c1576 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -576,7 +576,7 @@ public function getVerificationPlan() /** * Sets verificationPlan * - * @param string|null $verificationPlan A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + * @param string|null $verificationPlan A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 1991f61ed..2c675ae22 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -579,7 +579,7 @@ public function getVerificationPlan() /** * Sets verificationPlan * - * @param string|null $verificationPlan A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + * @param string|null $verificationPlan A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d7..66642b915 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php index c0d5114b2..1289da95d 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php @@ -387,7 +387,7 @@ public function getAcceptedCountries() /** * Sets acceptedCountries * - * @param string[]|null $acceptedCountries acceptedCountries + * @param string[]|null $acceptedCountries The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding). * * @return self */ @@ -411,7 +411,7 @@ public function getAllowBankAccountFormatSelection() /** * Sets allowBankAccountFormatSelection * - * @param bool|null $allowBankAccountFormatSelection allowBankAccountFormatSelection + * @param bool|null $allowBankAccountFormatSelection Default value: **false** Indicates if the user can select the format for their payout account (if applicable). * * @return self */ @@ -435,7 +435,7 @@ public function getAllowIntraRegionCrossBorderPayout() /** * Sets allowIntraRegionCrossBorderPayout * - * @param bool|null $allowIntraRegionCrossBorderPayout allowIntraRegionCrossBorderPayout + * @param bool|null $allowIntraRegionCrossBorderPayout Default value: **false** Indicates if the user can select a payout account in a different EU/EEA location (including Switzerland and the UK) than the location of their legal entity. * * @return self */ @@ -459,7 +459,7 @@ public function getChangeLegalEntityType() /** * Sets changeLegalEntityType * - * @param bool|null $changeLegalEntityType changeLegalEntityType + * @param bool|null $changeLegalEntityType Default value: **true** Indicates if the user can change their legal entity type. * * @return self */ @@ -483,7 +483,7 @@ public function getEditPrefilledCountry() /** * Sets editPrefilledCountry * - * @param bool|null $editPrefilledCountry editPrefilledCountry + * @param bool|null $editPrefilledCountry Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization. * * @return self */ @@ -507,7 +507,7 @@ public function getHideOnboardingIntroductionIndividual() /** * Sets hideOnboardingIntroductionIndividual * - * @param bool|null $hideOnboardingIntroductionIndividual hideOnboardingIntroductionIndividual + * @param bool|null $hideOnboardingIntroductionIndividual Default value: **false** Indicates if the user of the individual legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. * * @return self */ @@ -531,7 +531,7 @@ public function getHideOnboardingIntroductionOrganization() /** * Sets hideOnboardingIntroductionOrganization * - * @param bool|null $hideOnboardingIntroductionOrganization hideOnboardingIntroductionOrganization + * @param bool|null $hideOnboardingIntroductionOrganization Default value: **false** Indicates if the user of the organization legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. * * @return self */ @@ -555,7 +555,7 @@ public function getHideOnboardingIntroductionSoleProprietor() /** * Sets hideOnboardingIntroductionSoleProprietor * - * @param bool|null $hideOnboardingIntroductionSoleProprietor hideOnboardingIntroductionSoleProprietor + * @param bool|null $hideOnboardingIntroductionSoleProprietor Default value: **false** Indicates if the user of the sole proprietorship legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. * * @return self */ @@ -579,7 +579,7 @@ public function getHideOnboardingIntroductionTrust() /** * Sets hideOnboardingIntroductionTrust * - * @param bool|null $hideOnboardingIntroductionTrust hideOnboardingIntroductionTrust + * @param bool|null $hideOnboardingIntroductionTrust Default value: **false** Indicates if the user of the trust legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. * * @return self */ @@ -603,7 +603,7 @@ public function getInstantBankVerification() /** * Sets instantBankVerification * - * @param bool|null $instantBankVerification instantBankVerification + * @param bool|null $instantBankVerification Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink. * * @return self */ @@ -627,7 +627,7 @@ public function getRequirePciSignEcomMoto() /** * Sets requirePciSignEcomMoto * - * @param bool|null $requirePciSignEcomMoto requirePciSignEcomMoto + * @param bool|null $requirePciSignEcomMoto Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type. * * @return self */ @@ -651,7 +651,7 @@ public function getRequirePciSignEcommerce() /** * Sets requirePciSignEcommerce * - * @param bool|null $requirePciSignEcommerce requirePciSignEcommerce + * @param bool|null $requirePciSignEcommerce Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type. * * @return self */ @@ -675,7 +675,7 @@ public function getRequirePciSignPos() /** * Sets requirePciSignPos * - * @param bool|null $requirePciSignPos requirePciSignPos + * @param bool|null $requirePciSignPos Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type. * * @return self */ @@ -699,7 +699,7 @@ public function getRequirePciSignPosMoto() /** * Sets requirePciSignPosMoto * - * @param bool|null $requirePciSignPosMoto requirePciSignPosMoto + * @param bool|null $requirePciSignPosMoto Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type. * * @return self */ @@ -723,7 +723,7 @@ public function getTransferInstrumentLimit() /** * Sets transferInstrumentLimit * - * @param int|null $transferInstrumentLimit transferInstrumentLimit + * @param int|null $transferInstrumentLimit The maximum number of transfer instruments the user can create. * * @return self */ diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf9..2ff0b7ef6 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b9..a3626e45d 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 8032f208b..b6a5027ee 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461d..ae7a870cb 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PaymentsApp/BoardingTokenRequest.php b/src/Adyen/Model/PaymentsApp/BoardingTokenRequest.php new file mode 100644 index 000000000..f296d371a --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/BoardingTokenRequest.php @@ -0,0 +1,410 @@ + + */ +class BoardingTokenRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BoardingTokenRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'boardingRequestToken' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'boardingRequestToken' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'boardingRequestToken' => 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 = [ + 'boardingRequestToken' => 'boardingRequestToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'boardingRequestToken' => 'setBoardingRequestToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'boardingRequestToken' => 'getBoardingRequestToken' + ]; + + /** + * 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('boardingRequestToken', $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['boardingRequestToken'] === null) { + $invalidProperties[] = "'boardingRequestToken' 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 boardingRequestToken + * + * @return string + */ + public function getBoardingRequestToken() + { + return $this->container['boardingRequestToken']; + } + + /** + * Sets boardingRequestToken + * + * @param string $boardingRequestToken The boardingToken request token. + * + * @return self + */ + public function setBoardingRequestToken($boardingRequestToken) + { + $this->container['boardingRequestToken'] = $boardingRequestToken; + + 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/PaymentsApp/BoardingTokenResponse.php b/src/Adyen/Model/PaymentsApp/BoardingTokenResponse.php new file mode 100644 index 000000000..7f79a9d3c --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/BoardingTokenResponse.php @@ -0,0 +1,444 @@ + + */ +class BoardingTokenResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BoardingTokenResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'boardingToken' => 'string', + 'installationId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'boardingToken' => null, + 'installationId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'boardingToken' => false, + 'installationId' => 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 = [ + 'boardingToken' => 'boardingToken', + 'installationId' => 'installationId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'boardingToken' => 'setBoardingToken', + 'installationId' => 'setInstallationId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'boardingToken' => 'getBoardingToken', + 'installationId' => 'getInstallationId' + ]; + + /** + * 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('boardingToken', $data ?? [], null); + $this->setIfExists('installationId', $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['boardingToken'] === null) { + $invalidProperties[] = "'boardingToken' can't be null"; + } + if ($this->container['installationId'] === null) { + $invalidProperties[] = "'installationId' 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 boardingToken + * + * @return string + */ + public function getBoardingToken() + { + return $this->container['boardingToken']; + } + + /** + * Sets boardingToken + * + * @param string $boardingToken The boarding token that allows the Payments App to board. + * + * @return self + */ + public function setBoardingToken($boardingToken) + { + $this->container['boardingToken'] = $boardingToken; + + return $this; + } + + /** + * Gets installationId + * + * @return string + */ + public function getInstallationId() + { + return $this->container['installationId']; + } + + /** + * Sets installationId + * + * @param string $installationId The unique identifier of the Payments App instance. + * + * @return self + */ + public function setInstallationId($installationId) + { + $this->container['installationId'] = $installationId; + + 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/PaymentsApp/DefaultErrorResponseEntity.php b/src/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.php new file mode 100644 index 000000000..70eb07c24 --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.php @@ -0,0 +1,625 @@ + + */ +class DefaultErrorResponseEntity implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DefaultErrorResponseEntity'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'detail' => 'string', + 'errorCode' => 'string', + 'instance' => 'string', + 'invalidFields' => '\Adyen\Model\PaymentsApp\InvalidField[]', + 'requestId' => 'string', + 'status' => 'int', + 'title' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'detail' => null, + 'errorCode' => null, + 'instance' => null, + 'invalidFields' => null, + 'requestId' => null, + 'status' => 'int32', + 'title' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'detail' => false, + 'errorCode' => false, + 'instance' => false, + 'invalidFields' => false, + 'requestId' => false, + 'status' => true, + 'title' => 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 = [ + 'detail' => 'detail', + 'errorCode' => 'errorCode', + 'instance' => 'instance', + 'invalidFields' => 'invalidFields', + 'requestId' => 'requestId', + 'status' => 'status', + 'title' => 'title', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'detail' => 'setDetail', + 'errorCode' => 'setErrorCode', + 'instance' => 'setInstance', + 'invalidFields' => 'setInvalidFields', + 'requestId' => 'setRequestId', + 'status' => 'setStatus', + 'title' => 'setTitle', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'detail' => 'getDetail', + 'errorCode' => 'getErrorCode', + 'instance' => 'getInstance', + 'invalidFields' => 'getInvalidFields', + 'requestId' => 'getRequestId', + 'status' => 'getStatus', + 'title' => 'getTitle', + '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; + } + + + /** + * 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('detail', $data ?? [], null); + $this->setIfExists('errorCode', $data ?? [], null); + $this->setIfExists('instance', $data ?? [], null); + $this->setIfExists('invalidFields', $data ?? [], null); + $this->setIfExists('requestId', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('title', $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 = []; + + 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 detail + * + * @return string|null + */ + public function getDetail() + { + return $this->container['detail']; + } + + /** + * Sets detail + * + * @param string|null $detail A human-readable explanation specific to this occurrence of the problem. + * + * @return self + */ + public function setDetail($detail) + { + $this->container['detail'] = $detail; + + return $this; + } + + /** + * Gets errorCode + * + * @return string|null + */ + public function getErrorCode() + { + return $this->container['errorCode']; + } + + /** + * Sets errorCode + * + * @param string|null $errorCode Unique business error code. + * + * @return self + */ + public function setErrorCode($errorCode) + { + $this->container['errorCode'] = $errorCode; + + return $this; + } + + /** + * Gets instance + * + * @return string|null + */ + public function getInstance() + { + return $this->container['instance']; + } + + /** + * Sets instance + * + * @param string|null $instance A URI that identifies the specific occurrence of the problem if applicable. + * + * @return self + */ + public function setInstance($instance) + { + $this->container['instance'] = $instance; + + return $this; + } + + /** + * Gets invalidFields + * + * @return \Adyen\Model\PaymentsApp\InvalidField[]|null + */ + public function getInvalidFields() + { + return $this->container['invalidFields']; + } + + /** + * Sets invalidFields + * + * @param \Adyen\Model\PaymentsApp\InvalidField[]|null $invalidFields Array of fields with validation errors when applicable. + * + * @return self + */ + public function setInvalidFields($invalidFields) + { + $this->container['invalidFields'] = $invalidFields; + + return $this; + } + + /** + * Gets requestId + * + * @return string|null + */ + public function getRequestId() + { + return $this->container['requestId']; + } + + /** + * Sets requestId + * + * @param string|null $requestId The unique reference for the request. + * + * @return self + */ + public function setRequestId($requestId) + { + $this->container['requestId'] = $requestId; + + return $this; + } + + /** + * Gets status + * + * @return int|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status The HTTP status code. + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title A short, human-readable summary of the problem type. + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + * + * @return self + */ + public function setType($type) + { + $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/PaymentsApp/InvalidField.php b/src/Adyen/Model/PaymentsApp/InvalidField.php new file mode 100644 index 000000000..bfa7af1f1 --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/InvalidField.php @@ -0,0 +1,478 @@ + + */ +class InvalidField implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'InvalidField'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'value' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'value' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'name' => false, + 'value' => false, + 'message' => 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 = [ + 'name' => 'name', + 'value' => 'value', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'value' => 'setValue', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'value' => 'getValue', + 'message' => 'getMessage' + ]; + + /** + * 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('name', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('message', $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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' 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 name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The field that has an invalid value. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value The invalid value. + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Description of the validation error. + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + 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/PaymentsApp/ModelInterface.php b/src/Adyen/Model/PaymentsApp/ModelInterface.php new file mode 100644 index 000000000..ae48b0b02 --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/ModelInterface.php @@ -0,0 +1,92 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + 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', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/PaymentsApp/PaymentsAppDto.php b/src/Adyen/Model/PaymentsApp/PaymentsAppDto.php new file mode 100644 index 000000000..a6cdd04d0 --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/PaymentsAppDto.php @@ -0,0 +1,509 @@ + + */ +class PaymentsAppDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentsAppDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'installationId' => 'string', + 'merchantAccountCode' => 'string', + 'merchantStoreCode' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'installationId' => null, + 'merchantAccountCode' => null, + 'merchantStoreCode' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'installationId' => false, + 'merchantAccountCode' => false, + 'merchantStoreCode' => false, + 'status' => 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 = [ + 'installationId' => 'installationId', + 'merchantAccountCode' => 'merchantAccountCode', + 'merchantStoreCode' => 'merchantStoreCode', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'installationId' => 'setInstallationId', + 'merchantAccountCode' => 'setMerchantAccountCode', + 'merchantStoreCode' => 'setMerchantStoreCode', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'installationId' => 'getInstallationId', + 'merchantAccountCode' => 'getMerchantAccountCode', + 'merchantStoreCode' => 'getMerchantStoreCode', + 'status' => 'getStatus' + ]; + + /** + * 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('installationId', $data ?? [], null); + $this->setIfExists('merchantAccountCode', $data ?? [], null); + $this->setIfExists('merchantStoreCode', $data ?? [], null); + $this->setIfExists('status', $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['installationId'] === null) { + $invalidProperties[] = "'installationId' can't be null"; + } + if ($this->container['merchantAccountCode'] === null) { + $invalidProperties[] = "'merchantAccountCode' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' 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 installationId + * + * @return string + */ + public function getInstallationId() + { + return $this->container['installationId']; + } + + /** + * Sets installationId + * + * @param string $installationId The unique identifier of the Payments App instance. + * + * @return self + */ + public function setInstallationId($installationId) + { + $this->container['installationId'] = $installationId; + + return $this; + } + + /** + * Gets merchantAccountCode + * + * @return string + */ + public function getMerchantAccountCode() + { + return $this->container['merchantAccountCode']; + } + + /** + * Sets merchantAccountCode + * + * @param string $merchantAccountCode The account code associated with the Payments App instance. + * + * @return self + */ + public function setMerchantAccountCode($merchantAccountCode) + { + $this->container['merchantAccountCode'] = $merchantAccountCode; + + return $this; + } + + /** + * Gets merchantStoreCode + * + * @return string|null + */ + public function getMerchantStoreCode() + { + return $this->container['merchantStoreCode']; + } + + /** + * Sets merchantStoreCode + * + * @param string|null $merchantStoreCode The store code associated with the Payments App instance. + * + * @return self + */ + public function setMerchantStoreCode($merchantStoreCode) + { + $this->container['merchantStoreCode'] = $merchantStoreCode; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the Payments App instance. + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + 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/PaymentsApp/PaymentsAppResponse.php b/src/Adyen/Model/PaymentsApp/PaymentsAppResponse.php new file mode 100644 index 000000000..6f427cd2d --- /dev/null +++ b/src/Adyen/Model/PaymentsApp/PaymentsAppResponse.php @@ -0,0 +1,410 @@ + + */ +class PaymentsAppResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentsAppResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'paymentsApps' => '\Adyen\Model\PaymentsApp\PaymentsAppDto[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'paymentsApps' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'paymentsApps' => 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 = [ + 'paymentsApps' => 'paymentsApps' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'paymentsApps' => 'setPaymentsApps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'paymentsApps' => 'getPaymentsApps' + ]; + + /** + * 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('paymentsApps', $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['paymentsApps'] === null) { + $invalidProperties[] = "'paymentsApps' 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 paymentsApps + * + * @return \Adyen\Model\PaymentsApp\PaymentsAppDto[] + */ + public function getPaymentsApps() + { + return $this->container['paymentsApps']; + } + + /** + * Sets paymentsApps + * + * @param \Adyen\Model\PaymentsApp\PaymentsAppDto[] $paymentsApps List of Payments Apps. + * + * @return self + */ + public function setPaymentsApps($paymentsApps) + { + $this->container['paymentsApps'] = $paymentsApps; + + 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/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index ad1c991ab..0d50f4363 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ae87baef9..ba0e91ceb 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 7adbf8e59..3b2a857bf 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index 97f670389..a8a265ce9 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index ed3372fb3..934975452 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 6592bf84d..9ccc67586 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/Modification.php b/src/Adyen/Model/TransferWebhooks/Modification.php index 41fadc1e8..b91226ec7 100644 --- a/src/Adyen/Model/TransferWebhooks/Modification.php +++ b/src/Adyen/Model/TransferWebhooks/Modification.php @@ -290,6 +290,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -364,6 +365,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index 01b25bf23..d05b26906 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index cd7b1d901..86e6b45c1 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -416,6 +416,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -444,6 +445,9 @@ public function getModelName() public const TYPE_CASH_OUT_FEE = 'cashOutFee'; public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; + public const TYPE_CASHOUT_FEE = 'cashoutFee'; + public const TYPE_CASHOUT_FUNDING = 'cashoutFunding'; + public const TYPE_CASHOUT_REPAYMENT = 'cashoutRepayment'; public const TYPE_CHARGEBACK = 'chargeback'; public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; @@ -581,6 +585,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, @@ -619,6 +624,9 @@ public function getTypeAllowableValues() self::TYPE_CASH_OUT_FEE, self::TYPE_CASH_OUT_FUNDING, self::TYPE_CASH_OUT_INSTRUCTION, + self::TYPE_CASHOUT_FEE, + self::TYPE_CASHOUT_FUNDING, + self::TYPE_CASHOUT_REPAYMENT, self::TYPE_CHARGEBACK, self::TYPE_CHARGEBACK_CORRECTION, self::TYPE_CHARGEBACK_REVERSAL, diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index cb7339370..12d52e12d 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -380,6 +380,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -484,6 +485,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, diff --git a/src/Adyen/Model/Transfers/Modification.php b/src/Adyen/Model/Transfers/Modification.php index 4ff147d04..21d73423f 100644 --- a/src/Adyen/Model/Transfers/Modification.php +++ b/src/Adyen/Model/Transfers/Modification.php @@ -290,6 +290,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -364,6 +365,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index b9cbe36bf..349b367b3 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index d27001980..d7be15bcc 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -380,6 +380,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -408,6 +409,9 @@ public function getModelName() public const TYPE_CASH_OUT_FEE = 'cashOutFee'; public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; + public const TYPE_CASHOUT_FEE = 'cashoutFee'; + public const TYPE_CASHOUT_FUNDING = 'cashoutFunding'; + public const TYPE_CASHOUT_REPAYMENT = 'cashoutRepayment'; public const TYPE_CHARGEBACK = 'chargeback'; public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; @@ -545,6 +549,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, @@ -583,6 +588,9 @@ public function getTypeAllowableValues() self::TYPE_CASH_OUT_FEE, self::TYPE_CASH_OUT_FUNDING, self::TYPE_CASH_OUT_INSTRUCTION, + self::TYPE_CASHOUT_FEE, + self::TYPE_CASHOUT_FUNDING, + self::TYPE_CASHOUT_REPAYMENT, self::TYPE_CHARGEBACK, self::TYPE_CHARGEBACK_CORRECTION, self::TYPE_CHARGEBACK_REVERSAL, diff --git a/src/Adyen/Model/Transfers/TransferData.php b/src/Adyen/Model/Transfers/TransferData.php index 6bb6ca8d6..83e464caf 100644 --- a/src/Adyen/Model/Transfers/TransferData.php +++ b/src/Adyen/Model/Transfers/TransferData.php @@ -416,6 +416,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -444,6 +445,9 @@ public function getModelName() public const TYPE_CASH_OUT_FEE = 'cashOutFee'; public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; + public const TYPE_CASHOUT_FEE = 'cashoutFee'; + public const TYPE_CASHOUT_FUNDING = 'cashoutFunding'; + public const TYPE_CASHOUT_REPAYMENT = 'cashoutRepayment'; public const TYPE_CHARGEBACK = 'chargeback'; public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; @@ -581,6 +585,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, @@ -619,6 +624,9 @@ public function getTypeAllowableValues() self::TYPE_CASH_OUT_FEE, self::TYPE_CASH_OUT_FUNDING, self::TYPE_CASH_OUT_INSTRUCTION, + self::TYPE_CASHOUT_FEE, + self::TYPE_CASHOUT_FUNDING, + self::TYPE_CASHOUT_REPAYMENT, self::TYPE_CHARGEBACK, self::TYPE_CHARGEBACK_CORRECTION, self::TYPE_CHARGEBACK_REVERSAL, diff --git a/src/Adyen/Model/Transfers/TransferEvent.php b/src/Adyen/Model/Transfers/TransferEvent.php index 99daa1c7e..f2a140d43 100644 --- a/src/Adyen/Model/Transfers/TransferEvent.php +++ b/src/Adyen/Model/Transfers/TransferEvent.php @@ -380,6 +380,7 @@ public function getModelName() public const STATUS_MISC_COST_PENDING = 'miscCostPending'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_PENDING_APPROVAL = 'pendingApproval'; public const STATUS_RECEIVED = 'received'; public const STATUS_REFUND_PENDING = 'refundPending'; public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; @@ -484,6 +485,7 @@ public function getStatusAllowableValues() self::STATUS_MISC_COST_PENDING, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_PENDING_APPROVAL, self::STATUS_RECEIVED, self::STATUS_REFUND_PENDING, self::STATUS_REFUND_REVERSAL_PENDING, diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 980edd95b..bcb0276b3 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,13 +76,14 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c61143563..99bc3b6bd 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,12 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index df3b7a28a..50ba91f10 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -60,13 +60,14 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index ad86f1206..2e704599b 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,12 +60,13 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 233c09180..72b257fdc 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed9..2551bbc54 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,13 +59,14 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index d834bf550..9a6ea1756 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 70c2e0769..3bf8aeaa4 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,13 +59,14 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index c2557d39d..608130253 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index 1b40d271f..ec0d042af 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 54005b35b..65cdadc59 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,12 +116,13 @@ public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Mo * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index f8b7cc0b0..4f955b8ba 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,13 +46,14 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index efff80b67..499e78957 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,13 +61,14 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 8a7c5e731..8b6d78c7f 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,12 +59,13 @@ public function listTerminals(array $requestOptions = null): \Adyen\Model\Manage * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index cfe85a383..6caa292a6 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $companyId, array $requestOptions = null) * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 968e9c614..7113c9c39 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $merchantId, array $requestOptions = null * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/PaymentsApp/PaymentsAppApi.php b/src/Adyen/Service/PaymentsApp/PaymentsAppApi.php new file mode 100644 index 000000000..610b7d3c0 --- /dev/null +++ b/src/Adyen/Service/PaymentsApp/PaymentsAppApi.php @@ -0,0 +1,121 @@ +baseURL = $this->createBaseUrl("https://management-live.adyen.com/v1"); + } + + /** + * Create a boarding token - merchant level + * + * @param string $merchantId + * @param \Adyen\Model\PaymentsApp\BoardingTokenRequest $boardingTokenRequest + * @param array|null $requestOptions + * @return \Adyen\Model\PaymentsApp\BoardingTokenResponse + * @throws AdyenException + */ + public function (string $merchantId, \Adyen\Model\PaymentsApp\BoardingTokenRequest $boardingTokenRequest, array $requestOptions = null): \Adyen\Model\PaymentsApp\BoardingTokenResponse + { + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/generatePaymentsAppBoardingToken"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $boardingTokenRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\PaymentsApp\BoardingTokenResponse::class); + } + + /** + * Get a list of Payments Apps - merchant level + * + * @param string $merchantId + * @param array|null $requestOptions ['queryParams' => ['statuses'=> string, 'limit'=> int, 'offset'=> int]] + * @return \Adyen\Model\PaymentsApp\PaymentsAppResponse + * @throws AdyenException + */ + public function (string $merchantId, array $requestOptions = null): \Adyen\Model\PaymentsApp\PaymentsAppResponse + { + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/paymentsApps"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\PaymentsApp\PaymentsAppResponse::class); + } + + /** + * Revoke Payments App instance authentication + * + * @param string $merchantId + * @param string $installationId + * @param array|null $requestOptions + + * @throws AdyenException + */ + public function (string $merchantId, string $installationId, array $requestOptions = null) + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{installationId}'], [$merchantId, $installationId], "/merchants/{merchantId}/paymentsApps/{installationId}/revoke"); + $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + + } + + /** + * Create a boarding token - store level + * + * @param string $merchantId + * @param string $storeId + * @param \Adyen\Model\PaymentsApp\BoardingTokenRequest $boardingTokenRequest + * @param array|null $requestOptions + * @return \Adyen\Model\PaymentsApp\BoardingTokenResponse + * @throws AdyenException + */ + public function (string $merchantId, string $storeId, \Adyen\Model\PaymentsApp\BoardingTokenRequest $boardingTokenRequest, array $requestOptions = null): \Adyen\Model\PaymentsApp\BoardingTokenResponse + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{storeId}'], [$merchantId, $storeId], "/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $boardingTokenRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\PaymentsApp\BoardingTokenResponse::class); + } + + /** + * Get a list of Payments Apps - store level + * + * @param string $merchantId + * @param string $storeId + * @param array|null $requestOptions ['queryParams' => ['statuses'=> string, 'limit'=> int, 'offset'=> int]] + * @return \Adyen\Model\PaymentsApp\PaymentsAppResponse + * @throws AdyenException + */ + public function (string $merchantId, string $storeId, array $requestOptions = null): \Adyen\Model\PaymentsApp\PaymentsAppResponse + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{storeId}'], [$merchantId, $storeId], "/merchants/{merchantId}/stores/{storeId}/paymentsApps"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\PaymentsApp\PaymentsAppResponse::class); + } +}