From 8232f769653fa7ee621c8328f133b9ef429daefd Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Mon, 22 Jan 2024 08:36:09 +0000 Subject: [PATCH] [reformat][adyen-sdk-automation] automated change --- .../Model/AcsWebhooks/ObjectSerializer.php | 9 +- .../Model/BalanceControl/ObjectSerializer.php | 9 +- .../AULocalAccountIdentification.php | 2 +- .../BalancePlatform/AddressRequirement.php | 2 +- .../AmountMinMaxRequirement.php | 2 +- .../BRLocalAccountIdentification.php | 2 +- .../BankAccountAccountIdentification.php | 4 +- ...nkAccountIdentificationTypeRequirement.php | 2 +- ...ValidationRequestAccountIdentification.php | 4 +- .../BalancePlatform/BankAccountModel.php | 419 +++++++++++ .../CALocalAccountIdentification.php | 4 +- .../CZLocalAccountIdentification.php | 2 +- .../BalancePlatform/CapabilitySettings.php | 8 +- src/Adyen/Model/BalancePlatform/CardOrder.php | 655 ++++++++++++++++++ .../Model/BalancePlatform/CardOrderItem.php | 622 +++++++++++++++++ .../CardOrderItemDeliveryStatus.php | 497 +++++++++++++ .../CreateSweepConfigurationV2.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- .../Model/BalancePlatform/GrantOffer.php | 16 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../IbanAccountIdentification.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../BalancePlatform/ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 2 +- .../PaginatedGetCardOrderItemResponse.php | 461 ++++++++++++ .../PaginatedGetCardOrderResponse.php | 458 ++++++++++++ .../PaymentInstrumentBankAccount.php | 4 +- .../BalancePlatform/PaymentInstrumentInfo.php | 34 + .../PaymentInstrumentRequirement.php | 2 +- .../BalancePlatform/PinChangeRequest.php | 498 +++++++++++++ .../BalancePlatform/PinChangeResponse.php | 422 +++++++++++ .../BalancePlatform/PublicKeyResponse.php | 424 ++++++++++++ .../BalancePlatform/RevealPinRequest.php | 424 ++++++++++++ .../BalancePlatform/RevealPinResponse.php | 424 ++++++++++++ .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- .../BalancePlatform/SweepConfigurationV2.php | 2 +- .../TransferRouteRequirements.php | 2 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 4 +- .../UpdateSweepConfigurationV2.php | 2 +- .../Model/BinLookup/ObjectSerializer.php | 9 +- src/Adyen/Model/Checkout/AchDetails.php | 2 +- src/Adyen/Model/Checkout/AfterpayDetails.php | 2 +- src/Adyen/Model/Checkout/AmazonPayDetails.php | 2 +- .../Model/Checkout/AndroidPayDetails.php | 2 +- src/Adyen/Model/Checkout/ApplePayDetails.php | 2 +- .../Model/Checkout/ApplePayDonations.php | 2 +- .../Model/Checkout/AuthenticationData.php | 2 +- .../Model/Checkout/BacsDirectDebitDetails.php | 2 +- .../Model/Checkout/BalanceCheckRequest.php | 2 +- src/Adyen/Model/Checkout/BrowserInfo.php | 2 +- src/Adyen/Model/Checkout/CardDetails.php | 2 +- src/Adyen/Model/Checkout/CardDonations.php | 2 +- src/Adyen/Model/Checkout/CellulantDetails.php | 2 +- .../Model/Checkout/CheckoutPaymentMethod.php | 6 +- .../Checkout/CreateCheckoutSessionRequest.php | 6 +- .../CreateCheckoutSessionResponse.php | 6 +- .../DetailsRequestAuthenticationData.php | 2 +- .../Model/Checkout/DeviceRenderOptions.php | 2 +- .../Model/Checkout/DonationPaymentMethod.php | 2 +- .../Model/Checkout/DonationPaymentRequest.php | 2 +- src/Adyen/Model/Checkout/DotpayDetails.php | 2 +- src/Adyen/Model/Checkout/GiropayDetails.php | 2 +- src/Adyen/Model/Checkout/GooglePayDetails.php | 2 +- .../Model/Checkout/GooglePayDonations.php | 2 +- src/Adyen/Model/Checkout/IdealDetails.php | 2 +- src/Adyen/Model/Checkout/IdealDonations.php | 2 +- src/Adyen/Model/Checkout/KlarnaDetails.php | 2 +- .../Model/Checkout/MasterpassDetails.php | 2 +- src/Adyen/Model/Checkout/MbwayDetails.php | 6 +- src/Adyen/Model/Checkout/MobilePayDetails.php | 2 +- src/Adyen/Model/Checkout/ObjectSerializer.php | 9 +- .../Model/Checkout/OpenInvoiceDetails.php | 2 +- src/Adyen/Model/Checkout/PayPalDetails.php | 2 +- src/Adyen/Model/Checkout/PayUUpiDetails.php | 2 +- .../Model/Checkout/PayWithGoogleDetails.php | 2 +- .../Model/Checkout/PayWithGoogleDonations.php | 2 +- .../Model/Checkout/PaymentLinkRequest.php | 4 +- .../Model/Checkout/PaymentLinkResponse.php | 4 +- .../Model/Checkout/PaymentMethodIssuer.php | 2 +- .../Model/Checkout/PaymentMethodsRequest.php | 2 +- src/Adyen/Model/Checkout/PaymentRequest.php | 2 +- .../Model/Checkout/PaymentSetupRequest.php | 2 +- src/Adyen/Model/Checkout/RatepayDetails.php | 2 +- .../Model/Checkout/SamsungPayDetails.php | 2 +- .../Model/Checkout/SepaDirectDebitDetails.php | 2 +- .../Model/Checkout/ThreeDS2RequestData.php | 4 +- .../Model/Checkout/ThreeDS2RequestFields.php | 4 +- .../Model/Checkout/UpiCollectDetails.php | 2 +- src/Adyen/Model/Checkout/UpiIntentDetails.php | 2 +- src/Adyen/Model/Checkout/VippsDetails.php | 4 +- .../Model/Checkout/VisaCheckoutDetails.php | 2 +- src/Adyen/Model/Checkout/WeChatPayDetails.php | 2 +- .../Checkout/WeChatPayMiniProgramDetails.php | 2 +- src/Adyen/Model/Checkout/ZipDetails.php | 2 +- .../CapabilitySettings.php | 8 +- .../ConfigurationWebhooks/CardOrderItem.php | 2 +- .../CardOrderItemDeliveryStatus.php | 6 +- .../IbanAccountIdentification.php | 2 +- .../ObjectSerializer.php | 9 +- .../PaymentInstrumentBankAccount.php | 4 +- .../SweepConfigurationV2.php | 2 +- .../USLocalAccountIdentification.php | 4 +- .../Model/DataProtection/ObjectSerializer.php | 9 +- src/Adyen/Model/Disputes/ObjectSerializer.php | 9 +- .../AULocalAccountIdentification.php | 2 +- .../BankAccountInfoAccountIdentification.php | 4 +- .../CALocalAccountIdentification.php | 4 +- .../CZLocalAccountIdentification.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../IbanAccountIdentification.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 2 +- .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 4 +- .../Management/InstallAndroidAppDetails.php | 2 +- .../InstallAndroidCertificateDetails.php | 2 +- .../Model/Management/ObjectSerializer.php | 9 +- src/Adyen/Model/Management/Passcodes.php | 2 +- src/Adyen/Model/Management/PayAtTable.php | 79 ++- src/Adyen/Model/Management/PaymentMethod.php | 2 +- .../Management/PaymentMethodSetupInfo.php | 2 +- src/Adyen/Model/Management/Referenced.php | 384 ++++++++++ src/Adyen/Model/Management/Refunds.php | 384 ++++++++++ .../Model/Management/ReleaseUpdateDetails.php | 2 +- ...uleTerminalActionsRequestActionDetails.php | 2 +- .../Model/Management/TerminalSettings.php | 34 + .../Management/TransactionDescriptionInfo.php | 2 +- .../Management/UninstallAndroidAppDetails.php | 2 +- .../UninstallAndroidCertificateDetails.php | 2 +- .../ManagementWebhooks/ObjectSerializer.php | 9 +- .../ObjectSerializer.php | 9 +- src/Adyen/Model/Payments/BrowserInfo.php | 2 +- .../Model/Payments/DeviceRenderOptions.php | 2 +- src/Adyen/Model/Payments/ObjectSerializer.php | 9 +- src/Adyen/Model/Payments/PaymentRequest.php | 2 +- src/Adyen/Model/Payments/PaymentRequest3d.php | 2 +- .../Model/Payments/PaymentRequest3ds2.php | 2 +- .../Model/Payments/ThreeDS2RequestData.php | 4 +- src/Adyen/Model/Payout/ObjectSerializer.php | 9 +- .../Model/Recurring/ObjectSerializer.php | 9 +- .../Model/ReportWebhooks/ObjectSerializer.php | 9 +- .../Model/StoredValue/ObjectSerializer.php | 9 +- .../TransactionWebhooks/ObjectSerializer.php | 9 +- .../AULocalAccountIdentification.php | 2 +- .../BRLocalAccountIdentification.php | 2 +- .../BankAccountV3AccountIdentification.php | 4 +- .../TransferWebhooks/BankCategoryData.php | 2 +- .../CALocalAccountIdentification.php | 4 +- .../CZLocalAccountIdentification.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../IbanAccountIdentification.php | 2 +- .../TransferWebhooks/InternalCategoryData.php | 2 +- .../Model/TransferWebhooks/IssuedCard.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../TransferWebhooks/ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 2 +- .../TransferWebhooks/PartyIdentification.php | 2 +- .../TransferWebhooks/PlatformPayment.php | 2 +- .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- .../TransferDataCategoryData.php | 2 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 4 +- .../AULocalAccountIdentification.php | 2 +- .../BRLocalAccountIdentification.php | 2 +- .../BankAccountV3AccountIdentification.php | 4 +- .../Model/Transfers/BankCategoryData.php | 2 +- .../CALocalAccountIdentification.php | 4 +- .../CZLocalAccountIdentification.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../Transfers/IbanAccountIdentification.php | 2 +- .../Model/Transfers/InternalCategoryData.php | 2 +- src/Adyen/Model/Transfers/IssuedCard.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../Model/Transfers/ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 2 +- .../Model/Transfers/PartyIdentification.php | 2 +- src/Adyen/Model/Transfers/PlatformPayment.php | 2 +- .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- .../Model/Transfers/TransferCategoryData.php | 2 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 4 +- .../Transfers/UltimatePartyIdentification.php | 2 +- .../BalancePlatform/BalanceAccountsApi.php | 33 +- .../BankAccountValidationApi.php | 3 +- .../Service/BalancePlatform/CardOrdersApi.php | 70 ++ .../BalancePlatform/NetworkTokensApi.php | 3 +- .../BalancePlatform/PINFunctionalityApi.php | 85 +++ 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 +- 221 files changed, 6706 insertions(+), 349 deletions(-) create mode 100644 src/Adyen/Model/BalancePlatform/BankAccountModel.php create mode 100644 src/Adyen/Model/BalancePlatform/CardOrder.php create mode 100644 src/Adyen/Model/BalancePlatform/CardOrderItem.php create mode 100644 src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php create mode 100644 src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php create mode 100644 src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php create mode 100644 src/Adyen/Model/BalancePlatform/PinChangeRequest.php create mode 100644 src/Adyen/Model/BalancePlatform/PinChangeResponse.php create mode 100644 src/Adyen/Model/BalancePlatform/PublicKeyResponse.php create mode 100644 src/Adyen/Model/BalancePlatform/RevealPinRequest.php create mode 100644 src/Adyen/Model/BalancePlatform/RevealPinResponse.php create mode 100644 src/Adyen/Model/Management/Referenced.php create mode 100644 src/Adyen/Model/Management/Refunds.php create mode 100644 src/Adyen/Service/BalancePlatform/CardOrdersApi.php create mode 100644 src/Adyen/Service/BalancePlatform/PINFunctionalityApi.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/AULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php index 9123f65ee..de254aeda 100644 --- a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/AddressRequirement.php b/src/Adyen/Model/BalancePlatform/AddressRequirement.php index 069c6da72..511ad184a 100644 --- a/src/Adyen/Model/BalancePlatform/AddressRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AddressRequirement.php @@ -277,7 +277,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('requiredAddressFields', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'addressRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php index 612ac11f2..ae3eb2dfe 100644 --- a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('description', $data ?? [], null); $this->setIfExists('max', $data ?? [], null); $this->setIfExists('min', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'amountMinMaxRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php index d54e1bf11..a6410cdef 100644 --- a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'brLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index 460bf20ee..f84236d92 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php index 172990854..0c35fdb15 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php @@ -301,7 +301,7 @@ public function __construct(array $data = null) { $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'bankAccountIdentificationTypeRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index f36d0988e..c8e33356a 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/BalancePlatform/BankAccountModel.php b/src/Adyen/Model/BalancePlatform/BankAccountModel.php new file mode 100644 index 000000000..28e0f4753 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/BankAccountModel.php @@ -0,0 +1,419 @@ + + */ +class BankAccountModel implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankAccountModel'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'formFactor' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'formFactor' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'formFactor' => 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 = [ + 'formFactor' => 'formFactor' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'formFactor' => 'setFormFactor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'formFactor' => 'getFormFactor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FORM_FACTOR_PHYSICAL = 'physical'; + public const FORM_FACTOR_UNKNOWN = 'unknown'; + public const FORM_FACTOR_VIRTUAL = 'virtual'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFormFactorAllowableValues() + { + return [ + self::FORM_FACTOR_PHYSICAL, + self::FORM_FACTOR_UNKNOWN, + self::FORM_FACTOR_VIRTUAL, + ]; + } + /** + * 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('formFactor', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getFormFactorAllowableValues(); + if (!is_null($this->container['formFactor']) && !in_array($this->container['formFactor'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'formFactor', must be one of '%s'", + $this->container['formFactor'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets formFactor + * + * @return string|null + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string|null $formFactor Form factor of the bank account - **virtual** or **physical** (default) + * + * @return self + */ + public function setFormFactor($formFactor) + { + if (is_null($formFactor)) { + throw new \InvalidArgumentException('non-nullable formFactor cannot be null'); + } + $allowedValues = $this->getFormFactorAllowableValues(); + if (!in_array($formFactor, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'formFactor', must be one of '%s'", + $formFactor, + implode("', '", $allowedValues) + ) + ); + } + $this->container['formFactor'] = $formFactor; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php index 4a1dd2bd1..3d3d82bb2 100644 --- a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php index bfead0b4d..4d17aa6f3 100644 --- a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index fd3f781cc..4fffa9e80 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 */ @@ -385,7 +385,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -412,7 +412,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -448,7 +448,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/CardOrder.php b/src/Adyen/Model/BalancePlatform/CardOrder.php new file mode 100644 index 000000000..0995090ec --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/CardOrder.php @@ -0,0 +1,655 @@ + + */ +class CardOrder implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardOrder'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'beginDate' => '\DateTime', + 'cardManufacturingProfileId' => 'string', + 'closedDate' => '\DateTime', + 'endDate' => '\DateTime', + 'id' => 'string', + 'lockDate' => '\DateTime', + 'serviceCenter' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'beginDate' => 'date-time', + 'cardManufacturingProfileId' => null, + 'closedDate' => 'date-time', + 'endDate' => 'date-time', + 'id' => null, + 'lockDate' => 'date-time', + 'serviceCenter' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'beginDate' => false, + 'cardManufacturingProfileId' => false, + 'closedDate' => false, + 'endDate' => false, + 'id' => false, + 'lockDate' => false, + 'serviceCenter' => 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 = [ + 'beginDate' => 'beginDate', + 'cardManufacturingProfileId' => 'cardManufacturingProfileId', + 'closedDate' => 'closedDate', + 'endDate' => 'endDate', + 'id' => 'id', + 'lockDate' => 'lockDate', + 'serviceCenter' => 'serviceCenter', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'beginDate' => 'setBeginDate', + 'cardManufacturingProfileId' => 'setCardManufacturingProfileId', + 'closedDate' => 'setClosedDate', + 'endDate' => 'setEndDate', + 'id' => 'setId', + 'lockDate' => 'setLockDate', + 'serviceCenter' => 'setServiceCenter', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'beginDate' => 'getBeginDate', + 'cardManufacturingProfileId' => 'getCardManufacturingProfileId', + 'closedDate' => 'getClosedDate', + 'endDate' => 'getEndDate', + 'id' => 'getId', + 'lockDate' => 'getLockDate', + 'serviceCenter' => 'getServiceCenter', + '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; + } + + public const STATUS_CLOSED = 'closed'; + public const STATUS_OPEN = 'open'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_CLOSED, + self::STATUS_OPEN, + ]; + } + /** + * 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('beginDate', $data ?? [], null); + $this->setIfExists('cardManufacturingProfileId', $data ?? [], null); + $this->setIfExists('closedDate', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('lockDate', $data ?? [], null); + $this->setIfExists('serviceCenter', $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 = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets beginDate + * + * @return \DateTime|null + */ + public function getBeginDate() + { + return $this->container['beginDate']; + } + + /** + * Sets beginDate + * + * @param \DateTime|null $beginDate The date when the card order is created. + * + * @return self + */ + public function setBeginDate($beginDate) + { + if (is_null($beginDate)) { + throw new \InvalidArgumentException('non-nullable beginDate cannot be null'); + } + $this->container['beginDate'] = $beginDate; + + return $this; + } + + /** + * Gets cardManufacturingProfileId + * + * @return string|null + */ + public function getCardManufacturingProfileId() + { + return $this->container['cardManufacturingProfileId']; + } + + /** + * Sets cardManufacturingProfileId + * + * @param string|null $cardManufacturingProfileId The unique identifier of the card manufacturer profile. + * + * @return self + */ + public function setCardManufacturingProfileId($cardManufacturingProfileId) + { + if (is_null($cardManufacturingProfileId)) { + throw new \InvalidArgumentException('non-nullable cardManufacturingProfileId cannot be null'); + } + $this->container['cardManufacturingProfileId'] = $cardManufacturingProfileId; + + return $this; + } + + /** + * Gets closedDate + * + * @return \DateTime|null + */ + public function getClosedDate() + { + return $this->container['closedDate']; + } + + /** + * Sets closedDate + * + * @param \DateTime|null $closedDate The date when the card order processing ends. + * + * @return self + */ + public function setClosedDate($closedDate) + { + if (is_null($closedDate)) { + throw new \InvalidArgumentException('non-nullable closedDate cannot be null'); + } + $this->container['closedDate'] = $closedDate; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate() + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate The date when you manually closed the card order. Card orders are automatically closed by the end of the day it was created. If you manually closed it beforehand, the closing date is shown as the `endDate`. + * + * @return self + */ + public function setEndDate($endDate) + { + if (is_null($endDate)) { + throw new \InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the card order. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets lockDate + * + * @return \DateTime|null + */ + public function getLockDate() + { + return $this->container['lockDate']; + } + + /** + * Sets lockDate + * + * @param \DateTime|null $lockDate The date when the card order processing begins. + * + * @return self + */ + public function setLockDate($lockDate) + { + if (is_null($lockDate)) { + throw new \InvalidArgumentException('non-nullable lockDate cannot be null'); + } + $this->container['lockDate'] = $lockDate; + + return $this; + } + + /** + * Gets serviceCenter + * + * @return string|null + */ + public function getServiceCenter() + { + return $this->container['serviceCenter']; + } + + /** + * Sets serviceCenter + * + * @param string|null $serviceCenter The service center. + * + * @return self + */ + public function setServiceCenter($serviceCenter) + { + if (is_null($serviceCenter)) { + throw new \InvalidArgumentException('non-nullable serviceCenter cannot be null'); + } + $this->container['serviceCenter'] = $serviceCenter; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the card order. Possible values: **Open**, **Closed**. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CardOrderItem.php b/src/Adyen/Model/BalancePlatform/CardOrderItem.php new file mode 100644 index 000000000..a630eb599 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/CardOrderItem.php @@ -0,0 +1,622 @@ + + */ +class CardOrderItem implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardOrderItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'card' => '\Adyen\Model\BalancePlatform\CardOrderItemDeliveryStatus', + 'cardOrderItemId' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string', + 'paymentInstrumentId' => 'string', + 'pin' => '\Adyen\Model\BalancePlatform\CardOrderItemDeliveryStatus', + 'shippingMethod' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'card' => null, + 'cardOrderItemId' => null, + 'creationDate' => 'date-time', + 'id' => null, + 'paymentInstrumentId' => null, + 'pin' => null, + 'shippingMethod' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'card' => false, + 'cardOrderItemId' => false, + 'creationDate' => false, + 'id' => false, + 'paymentInstrumentId' => false, + 'pin' => false, + 'shippingMethod' => 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 = [ + 'balancePlatform' => 'balancePlatform', + 'card' => 'card', + 'cardOrderItemId' => 'cardOrderItemId', + 'creationDate' => 'creationDate', + 'id' => 'id', + 'paymentInstrumentId' => 'paymentInstrumentId', + 'pin' => 'pin', + 'shippingMethod' => 'shippingMethod' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'card' => 'setCard', + 'cardOrderItemId' => 'setCardOrderItemId', + 'creationDate' => 'setCreationDate', + 'id' => 'setId', + 'paymentInstrumentId' => 'setPaymentInstrumentId', + 'pin' => 'setPin', + 'shippingMethod' => 'setShippingMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'card' => 'getCard', + 'cardOrderItemId' => 'getCardOrderItemId', + 'creationDate' => 'getCreationDate', + 'id' => 'getId', + 'paymentInstrumentId' => 'getPaymentInstrumentId', + 'pin' => 'getPin', + 'shippingMethod' => 'getShippingMethod' + ]; + + /** + * 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('balancePlatform', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); + $this->setIfExists('cardOrderItemId', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentInstrumentId', $data ?? [], null); + $this->setIfExists('pin', $data ?? [], null); + $this->setIfExists('shippingMethod', $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 balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets card + * + * @return \Adyen\Model\BalancePlatform\CardOrderItemDeliveryStatus|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \Adyen\Model\BalancePlatform\CardOrderItemDeliveryStatus|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + throw new \InvalidArgumentException('non-nullable card cannot be null'); + } + $this->container['card'] = $card; + + return $this; + } + + /** + * Gets cardOrderItemId + * + * @return string|null + */ + public function getCardOrderItemId() + { + return $this->container['cardOrderItemId']; + } + + /** + * Sets cardOrderItemId + * + * @param string|null $cardOrderItemId The unique identifier of the card order item. + * + * @return self + */ + public function setCardOrderItemId($cardOrderItemId) + { + if (is_null($cardOrderItemId)) { + throw new \InvalidArgumentException('non-nullable cardOrderItemId cannot be null'); + } + $this->container['cardOrderItemId'] = $cardOrderItemId; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets paymentInstrumentId + * + * @return string|null + */ + public function getPaymentInstrumentId() + { + return $this->container['paymentInstrumentId']; + } + + /** + * Sets paymentInstrumentId + * + * @param string|null $paymentInstrumentId The unique identifier of the payment instrument related to the card order item. + * + * @return self + */ + public function setPaymentInstrumentId($paymentInstrumentId) + { + if (is_null($paymentInstrumentId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); + } + $this->container['paymentInstrumentId'] = $paymentInstrumentId; + + return $this; + } + + /** + * Gets pin + * + * @return \Adyen\Model\BalancePlatform\CardOrderItemDeliveryStatus|null + */ + public function getPin() + { + return $this->container['pin']; + } + + /** + * Sets pin + * + * @param \Adyen\Model\BalancePlatform\CardOrderItemDeliveryStatus|null $pin pin + * + * @return self + */ + public function setPin($pin) + { + if (is_null($pin)) { + throw new \InvalidArgumentException('non-nullable pin cannot be null'); + } + $this->container['pin'] = $pin; + + return $this; + } + + /** + * Gets shippingMethod + * + * @return string|null + */ + public function getShippingMethod() + { + return $this->container['shippingMethod']; + } + + /** + * Sets shippingMethod + * + * @param string|null $shippingMethod The shipping method used to deliver the card or the PIN. + * + * @return self + */ + public function setShippingMethod($shippingMethod) + { + if (is_null($shippingMethod)) { + throw new \InvalidArgumentException('non-nullable shippingMethod cannot be null'); + } + $this->container['shippingMethod'] = $shippingMethod; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php new file mode 100644 index 000000000..3f122f551 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php @@ -0,0 +1,497 @@ + + */ +class CardOrderItemDeliveryStatus implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardOrderItemDeliveryStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'errorMessage' => 'string', + 'status' => 'string', + 'trackingNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'errorMessage' => null, + 'status' => null, + 'trackingNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'errorMessage' => false, + 'status' => false, + 'trackingNumber' => 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 = [ + 'errorMessage' => 'errorMessage', + 'status' => 'status', + 'trackingNumber' => 'trackingNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'errorMessage' => 'setErrorMessage', + 'status' => 'setStatus', + 'trackingNumber' => 'setTrackingNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'errorMessage' => 'getErrorMessage', + 'status' => 'getStatus', + 'trackingNumber' => 'getTrackingNumber' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATUS_CREATED = 'created'; + public const STATUS_DELIVERED = 'delivered'; + public const STATUS_NOT_APPLICABLE = 'notApplicable'; + public const STATUS_PROCESSING = 'processing'; + public const STATUS_PRODUCED = 'produced'; + public const STATUS_REJECTED = 'rejected'; + public const STATUS_SHIPPED = 'shipped'; + public const STATUS_UNKNOWN = 'unknown'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_CREATED, + self::STATUS_DELIVERED, + self::STATUS_NOT_APPLICABLE, + self::STATUS_PROCESSING, + self::STATUS_PRODUCED, + self::STATUS_REJECTED, + self::STATUS_SHIPPED, + self::STATUS_UNKNOWN, + ]; + } + /** + * 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('errorMessage', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('trackingNumber', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets errorMessage + * + * @return string|null + */ + public function getErrorMessage() + { + return $this->container['errorMessage']; + } + + /** + * Sets errorMessage + * + * @param string|null $errorMessage An error message. + * + * @return self + */ + public function setErrorMessage($errorMessage) + { + if (is_null($errorMessage)) { + throw new \InvalidArgumentException('non-nullable errorMessage cannot be null'); + } + $this->container['errorMessage'] = $errorMessage; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the PIN delivery. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets trackingNumber + * + * @return string|null + */ + public function getTrackingNumber() + { + return $this->container['trackingNumber']; + } + + /** + * Sets trackingNumber + * + * @param string|null $trackingNumber The tracking number of the PIN delivery. + * + * @return self + */ + public function setTrackingNumber($trackingNumber) + { + if (is_null($trackingNumber)) { + throw new \InvalidArgumentException('non-nullable trackingNumber cannot be null'); + } + $this->container['trackingNumber'] = $trackingNumber; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 2357b2876..b61e85d80 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -416,7 +416,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php index 8ffb03ff3..55740b489 100644 --- a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/GrantOffer.php b/src/Adyen/Model/BalancePlatform/GrantOffer.php index 186f5503a..9f86a652a 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffer.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffer.php @@ -47,11 +47,11 @@ class GrantOffer implements ModelInterface, ArrayAccess, \JsonSerializable 'accountHolderId' => 'string', 'amount' => '\Adyen\Model\BalancePlatform\Amount', 'contractType' => 'string', - 'expiresAt' => 'object', + 'expiresAt' => '\DateTime', 'fee' => '\Adyen\Model\BalancePlatform\Fee', 'id' => 'string', 'repayment' => '\Adyen\Model\BalancePlatform\Repayment', - 'startsAt' => 'object' + 'startsAt' => '\DateTime' ]; /** @@ -65,11 +65,11 @@ class GrantOffer implements ModelInterface, ArrayAccess, \JsonSerializable 'accountHolderId' => null, 'amount' => null, 'contractType' => null, - 'expiresAt' => null, + 'expiresAt' => 'date-time', 'fee' => null, 'id' => null, 'repayment' => null, - 'startsAt' => null + 'startsAt' => 'date-time' ]; /** @@ -445,7 +445,7 @@ public function setContractType($contractType) /** * Gets expiresAt * - * @return object|null + * @return \DateTime|null */ public function getExpiresAt() { @@ -455,7 +455,7 @@ public function getExpiresAt() /** * Sets expiresAt * - * @param object|null $expiresAt expiresAt + * @param \DateTime|null $expiresAt The end date of the grant offer validity period. * * @return self */ @@ -553,7 +553,7 @@ public function setRepayment($repayment) /** * Gets startsAt * - * @return object|null + * @return \DateTime|null */ public function getStartsAt() { @@ -563,7 +563,7 @@ public function getStartsAt() /** * Sets startsAt * - * @param object|null $startsAt startsAt + * @param \DateTime|null $startsAt The starting date of the grant offer validity period. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 600242241..82413e8f6 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php index cdf593038..ea6dc622b 100644 --- a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php index aa08e52ce..718844b18 100644 --- a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php index 9532fc4d9..a09a59f74 100644 --- a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index 0bfebfff6..c6257e670 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php index 349326300..676fbc851 100644 --- a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** 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/BalancePlatform/PLLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php index 607311dc3..c5525acb2 100644 --- a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php new file mode 100644 index 000000000..7d5e9a1e3 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php @@ -0,0 +1,461 @@ + + */ +class PaginatedGetCardOrderItemResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaginatedGetCardOrderItemResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\BalancePlatform\CardOrderItem[]', + 'hasNext' => 'bool', + 'hasPrevious' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'hasNext' => null, + 'hasPrevious' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'hasNext' => false, + 'hasPrevious' => 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 = [ + 'data' => 'data', + 'hasNext' => 'hasNext', + 'hasPrevious' => 'hasPrevious' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'hasNext' => 'setHasNext', + 'hasPrevious' => 'setHasPrevious' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'hasNext' => 'getHasNext', + 'hasPrevious' => 'getHasPrevious' + ]; + + /** + * 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('data', $data ?? [], null); + $this->setIfExists('hasNext', $data ?? [], null); + $this->setIfExists('hasPrevious', $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['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['hasNext'] === null) { + $invalidProperties[] = "'hasNext' can't be null"; + } + if ($this->container['hasPrevious'] === null) { + $invalidProperties[] = "'hasPrevious' 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 data + * + * @return \Adyen\Model\BalancePlatform\CardOrderItem[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\BalancePlatform\CardOrderItem[] $data List of card order items in the card order batch. + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets hasNext + * + * @return bool + */ + public function getHasNext() + { + return $this->container['hasNext']; + } + + /** + * Sets hasNext + * + * @param bool $hasNext Indicates whether there are more items on the next page. + * + * @return self + */ + public function setHasNext($hasNext) + { + if (is_null($hasNext)) { + throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); + } + $this->container['hasNext'] = $hasNext; + + return $this; + } + + /** + * Gets hasPrevious + * + * @return bool + */ + public function getHasPrevious() + { + return $this->container['hasPrevious']; + } + + /** + * Sets hasPrevious + * + * @param bool $hasPrevious Indicates whether there are more items on the previous page. + * + * @return self + */ + public function setHasPrevious($hasPrevious) + { + if (is_null($hasPrevious)) { + throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); + } + $this->container['hasPrevious'] = $hasPrevious; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php new file mode 100644 index 000000000..a5c9b19e9 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php @@ -0,0 +1,458 @@ + + */ +class PaginatedGetCardOrderResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaginatedGetCardOrderResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cardOrders' => '\Adyen\Model\BalancePlatform\CardOrder[]', + 'hasNext' => 'bool', + 'hasPrevious' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cardOrders' => null, + 'hasNext' => null, + 'hasPrevious' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cardOrders' => false, + 'hasNext' => false, + 'hasPrevious' => 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 = [ + 'cardOrders' => 'cardOrders', + 'hasNext' => 'hasNext', + 'hasPrevious' => 'hasPrevious' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cardOrders' => 'setCardOrders', + 'hasNext' => 'setHasNext', + 'hasPrevious' => 'setHasPrevious' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cardOrders' => 'getCardOrders', + 'hasNext' => 'getHasNext', + 'hasPrevious' => 'getHasPrevious' + ]; + + /** + * 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('cardOrders', $data ?? [], null); + $this->setIfExists('hasNext', $data ?? [], null); + $this->setIfExists('hasPrevious', $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['hasNext'] === null) { + $invalidProperties[] = "'hasNext' can't be null"; + } + if ($this->container['hasPrevious'] === null) { + $invalidProperties[] = "'hasPrevious' 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 cardOrders + * + * @return \Adyen\Model\BalancePlatform\CardOrder[]|null + */ + public function getCardOrders() + { + return $this->container['cardOrders']; + } + + /** + * Sets cardOrders + * + * @param \Adyen\Model\BalancePlatform\CardOrder[]|null $cardOrders Contains objects with information about card orders. + * + * @return self + */ + public function setCardOrders($cardOrders) + { + if (is_null($cardOrders)) { + throw new \InvalidArgumentException('non-nullable cardOrders cannot be null'); + } + $this->container['cardOrders'] = $cardOrders; + + return $this; + } + + /** + * Gets hasNext + * + * @return bool + */ + public function getHasNext() + { + return $this->container['hasNext']; + } + + /** + * Sets hasNext + * + * @param bool $hasNext Indicates whether there are more items on the next page. + * + * @return self + */ + public function setHasNext($hasNext) + { + if (is_null($hasNext)) { + throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); + } + $this->container['hasNext'] = $hasNext; + + return $this; + } + + /** + * Gets hasPrevious + * + * @return bool + */ + public function getHasPrevious() + { + return $this->container['hasPrevious']; + } + + /** + * Sets hasPrevious + * + * @param bool $hasPrevious Indicates whether there are more items on the previous page. + * + * @return self + */ + public function setHasPrevious($hasPrevious) + { + if (is_null($hasPrevious)) { + throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); + } + $this->container['hasPrevious'] = $hasPrevious; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php index 1bbc6d26c..c5c27128a 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php @@ -256,9 +256,9 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); } diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php index 331e62094..351b117be 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php @@ -45,6 +45,7 @@ class PaymentInstrumentInfo implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'balanceAccountId' => 'string', + 'bankAccount' => '\Adyen\Model\BalancePlatform\BankAccountModel', 'card' => '\Adyen\Model\BalancePlatform\CardInfo', 'description' => 'string', 'issuingCountryCode' => 'string', @@ -64,6 +65,7 @@ class PaymentInstrumentInfo implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'balanceAccountId' => null, + 'bankAccount' => null, 'card' => null, 'description' => null, 'issuingCountryCode' => null, @@ -81,6 +83,7 @@ class PaymentInstrumentInfo implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPINullables = [ 'balanceAccountId' => false, + 'bankAccount' => false, 'card' => false, 'description' => false, 'issuingCountryCode' => false, @@ -178,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'balanceAccountId' => 'balanceAccountId', + 'bankAccount' => 'bankAccount', 'card' => 'card', 'description' => 'description', 'issuingCountryCode' => 'issuingCountryCode', @@ -195,6 +199,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'balanceAccountId' => 'setBalanceAccountId', + 'bankAccount' => 'setBankAccount', 'card' => 'setCard', 'description' => 'setDescription', 'issuingCountryCode' => 'setIssuingCountryCode', @@ -212,6 +217,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'balanceAccountId' => 'getBalanceAccountId', + 'bankAccount' => 'getBankAccount', 'card' => 'getCard', 'description' => 'getDescription', 'issuingCountryCode' => 'getIssuingCountryCode', @@ -340,6 +346,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('balanceAccountId', $data ?? [], null); + $this->setIfExists('bankAccount', $data ?? [], null); $this->setIfExists('card', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); @@ -455,6 +462,33 @@ public function setBalanceAccountId($balanceAccountId) return $this; } + /** + * Gets bankAccount + * + * @return \Adyen\Model\BalancePlatform\BankAccountModel|null + */ + public function getBankAccount() + { + return $this->container['bankAccount']; + } + + /** + * Sets bankAccount + * + * @param \Adyen\Model\BalancePlatform\BankAccountModel|null $bankAccount bankAccount + * + * @return self + */ + public function setBankAccount($bankAccount) + { + if (is_null($bankAccount)) { + throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); + } + $this->container['bankAccount'] = $bankAccount; + + return $this; + } + /** * Gets card * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index e97bf5511..df3724cef 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -285,7 +285,7 @@ public function __construct(array $data = null) $this->setIfExists('issuingCountryCode', $data ?? [], null); $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/PinChangeRequest.php b/src/Adyen/Model/BalancePlatform/PinChangeRequest.php new file mode 100644 index 000000000..2608e22e0 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PinChangeRequest.php @@ -0,0 +1,498 @@ + + */ +class PinChangeRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PinChangeRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'encryptedKey' => 'string', + 'encryptedPinBlock' => 'string', + 'paymentInstrumentId' => 'string', + 'token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'encryptedKey' => null, + 'encryptedPinBlock' => null, + 'paymentInstrumentId' => null, + 'token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'encryptedKey' => false, + 'encryptedPinBlock' => false, + 'paymentInstrumentId' => false, + 'token' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'encryptedKey' => 'encryptedKey', + 'encryptedPinBlock' => 'encryptedPinBlock', + 'paymentInstrumentId' => 'paymentInstrumentId', + 'token' => 'token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'encryptedKey' => 'setEncryptedKey', + 'encryptedPinBlock' => 'setEncryptedPinBlock', + 'paymentInstrumentId' => 'setPaymentInstrumentId', + 'token' => 'setToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'encryptedKey' => 'getEncryptedKey', + 'encryptedPinBlock' => 'getEncryptedPinBlock', + 'paymentInstrumentId' => 'getPaymentInstrumentId', + 'token' => 'getToken' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('encryptedKey', $data ?? [], null); + $this->setIfExists('encryptedPinBlock', $data ?? [], null); + $this->setIfExists('paymentInstrumentId', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['encryptedKey'] === null) { + $invalidProperties[] = "'encryptedKey' can't be null"; + } + if ($this->container['encryptedPinBlock'] === null) { + $invalidProperties[] = "'encryptedPinBlock' can't be null"; + } + if ($this->container['paymentInstrumentId'] === null) { + $invalidProperties[] = "'paymentInstrumentId' can't be null"; + } + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets encryptedKey + * + * @return string + */ + public function getEncryptedKey() + { + return $this->container['encryptedKey']; + } + + /** + * Sets encryptedKey + * + * @param string $encryptedKey Symmetric session key encrypted under the public key. + * + * @return self + */ + public function setEncryptedKey($encryptedKey) + { + if (is_null($encryptedKey)) { + throw new \InvalidArgumentException('non-nullable encryptedKey cannot be null'); + } + $this->container['encryptedKey'] = $encryptedKey; + + return $this; + } + + /** + * Gets encryptedPinBlock + * + * @return string + */ + public function getEncryptedPinBlock() + { + return $this->container['encryptedPinBlock']; + } + + /** + * Sets encryptedPinBlock + * + * @param string $encryptedPinBlock The encrypted PIN block + * + * @return self + */ + public function setEncryptedPinBlock($encryptedPinBlock) + { + if (is_null($encryptedPinBlock)) { + throw new \InvalidArgumentException('non-nullable encryptedPinBlock cannot be null'); + } + $this->container['encryptedPinBlock'] = $encryptedPinBlock; + + return $this; + } + + /** + * Gets paymentInstrumentId + * + * @return string + */ + public function getPaymentInstrumentId() + { + return $this->container['paymentInstrumentId']; + } + + /** + * Sets paymentInstrumentId + * + * @param string $paymentInstrumentId The unique identifier of the payment instrument. + * + * @return self + */ + public function setPaymentInstrumentId($paymentInstrumentId) + { + if (is_null($paymentInstrumentId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); + } + $this->container['paymentInstrumentId'] = $paymentInstrumentId; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token The token which is used to construct the pinblock. + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/PinChangeResponse.php b/src/Adyen/Model/BalancePlatform/PinChangeResponse.php new file mode 100644 index 000000000..ac000d45d --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PinChangeResponse.php @@ -0,0 +1,422 @@ + + */ +class PinChangeResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PinChangeResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + '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 = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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; + } + + public const STATUS_COMPLETED = 'completed'; + public const STATUS_PENDING = 'pending'; + public const STATUS_UNAVAILABLE = 'unavailable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_COMPLETED, + self::STATUS_PENDING, + self::STATUS_UNAVAILABLE, + ]; + } + /** + * 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('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['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The pin change status. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php b/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php new file mode 100644 index 000000000..d6e0646b7 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php @@ -0,0 +1,424 @@ + + */ +class PublicKeyResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PublicKeyResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'publicKey' => 'string', + 'publicKeyExpiryDate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'publicKey' => null, + 'publicKeyExpiryDate' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'publicKey' => false, + 'publicKeyExpiryDate' => 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 = [ + 'publicKey' => 'publicKey', + 'publicKeyExpiryDate' => 'publicKeyExpiryDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'publicKey' => 'setPublicKey', + 'publicKeyExpiryDate' => 'setPublicKeyExpiryDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'publicKey' => 'getPublicKey', + 'publicKeyExpiryDate' => 'getPublicKeyExpiryDate' + ]; + + /** + * 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('publicKey', $data ?? [], null); + $this->setIfExists('publicKeyExpiryDate', $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['publicKey'] === null) { + $invalidProperties[] = "'publicKey' can't be null"; + } + if ($this->container['publicKeyExpiryDate'] === null) { + $invalidProperties[] = "'publicKeyExpiryDate' 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 publicKey + * + * @return string + */ + public function getPublicKey() + { + return $this->container['publicKey']; + } + + /** + * Sets publicKey + * + * @param string $publicKey The public key to be used for encrypting the symmetric session key. + * + * @return self + */ + public function setPublicKey($publicKey) + { + if (is_null($publicKey)) { + throw new \InvalidArgumentException('non-nullable publicKey cannot be null'); + } + $this->container['publicKey'] = $publicKey; + + return $this; + } + + /** + * Gets publicKeyExpiryDate + * + * @return string + */ + public function getPublicKeyExpiryDate() + { + return $this->container['publicKeyExpiryDate']; + } + + /** + * Sets publicKeyExpiryDate + * + * @param string $publicKeyExpiryDate The expiry date of the public key. + * + * @return self + */ + public function setPublicKeyExpiryDate($publicKeyExpiryDate) + { + if (is_null($publicKeyExpiryDate)) { + throw new \InvalidArgumentException('non-nullable publicKeyExpiryDate cannot be null'); + } + $this->container['publicKeyExpiryDate'] = $publicKeyExpiryDate; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/RevealPinRequest.php b/src/Adyen/Model/BalancePlatform/RevealPinRequest.php new file mode 100644 index 000000000..6b109e68f --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/RevealPinRequest.php @@ -0,0 +1,424 @@ + + */ +class RevealPinRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RevealPinRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'encryptedKey' => 'string', + 'paymentInstrumentId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'encryptedKey' => null, + 'paymentInstrumentId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'encryptedKey' => false, + 'paymentInstrumentId' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'encryptedKey' => 'encryptedKey', + 'paymentInstrumentId' => 'paymentInstrumentId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'encryptedKey' => 'setEncryptedKey', + 'paymentInstrumentId' => 'setPaymentInstrumentId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'encryptedKey' => 'getEncryptedKey', + 'paymentInstrumentId' => 'getPaymentInstrumentId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('encryptedKey', $data ?? [], null); + $this->setIfExists('paymentInstrumentId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['encryptedKey'] === null) { + $invalidProperties[] = "'encryptedKey' can't be null"; + } + if ($this->container['paymentInstrumentId'] === null) { + $invalidProperties[] = "'paymentInstrumentId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets encryptedKey + * + * @return string + */ + public function getEncryptedKey() + { + return $this->container['encryptedKey']; + } + + /** + * Sets encryptedKey + * + * @param string $encryptedKey Symmetric session key encrypted under the public key. + * + * @return self + */ + public function setEncryptedKey($encryptedKey) + { + if (is_null($encryptedKey)) { + throw new \InvalidArgumentException('non-nullable encryptedKey cannot be null'); + } + $this->container['encryptedKey'] = $encryptedKey; + + return $this; + } + + /** + * Gets paymentInstrumentId + * + * @return string + */ + public function getPaymentInstrumentId() + { + return $this->container['paymentInstrumentId']; + } + + /** + * Sets paymentInstrumentId + * + * @param string $paymentInstrumentId The unique identifier of the payment instrument. + * + * @return self + */ + public function setPaymentInstrumentId($paymentInstrumentId) + { + if (is_null($paymentInstrumentId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); + } + $this->container['paymentInstrumentId'] = $paymentInstrumentId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/RevealPinResponse.php b/src/Adyen/Model/BalancePlatform/RevealPinResponse.php new file mode 100644 index 000000000..2f2f149c5 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/RevealPinResponse.php @@ -0,0 +1,424 @@ + + */ +class RevealPinResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RevealPinResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'encryptedPinBlock' => 'string', + 'token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'encryptedPinBlock' => null, + 'token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'encryptedPinBlock' => false, + 'token' => 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 = [ + 'encryptedPinBlock' => 'encryptedPinBlock', + 'token' => 'token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'encryptedPinBlock' => 'setEncryptedPinBlock', + 'token' => 'setToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'encryptedPinBlock' => 'getEncryptedPinBlock', + 'token' => 'getToken' + ]; + + /** + * 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('encryptedPinBlock', $data ?? [], null); + $this->setIfExists('token', $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['encryptedPinBlock'] === null) { + $invalidProperties[] = "'encryptedPinBlock' can't be null"; + } + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' 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 encryptedPinBlock + * + * @return string + */ + public function getEncryptedPinBlock() + { + return $this->container['encryptedPinBlock']; + } + + /** + * Sets encryptedPinBlock + * + * @param string $encryptedPinBlock The encrypted PIN block. + * + * @return self + */ + public function setEncryptedPinBlock($encryptedPinBlock) + { + if (is_null($encryptedPinBlock)) { + throw new \InvalidArgumentException('non-nullable encryptedPinBlock cannot be null'); + } + $this->container['encryptedPinBlock'] = $encryptedPinBlock; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token The encrypted PIN block extraction token. + * + * @return self + */ + public function setToken($token) + { + if (is_null($token)) { + throw new \InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + 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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php index da9c3f722..136e9226b 100644 --- a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php index 74a9914cc..e17a9a792 100644 --- a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 0a860af04..b0f0ddc18 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -423,7 +423,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php index df4d6e3c4..5d9242920 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php @@ -281,7 +281,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('requiredAddressFields', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('max', $data ?? [], null); $this->setIfExists('min', $data ?? [], null); $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); diff --git a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php index 11a815ca1..744972ae8 100644 --- a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php index 16abfbe15..2dd1c304e 100644 --- a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index e403b7087..be12417ce 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -423,7 +423,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** 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/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index 4557c901d..6c2188185 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -332,7 +332,7 @@ public function __construct(array $data = null) $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ach'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index be27ce340..9f52e0fa6 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -291,7 +291,7 @@ public function __construct(array $data = null) $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'afterpay_default'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AmazonPayDetails.php b/src/Adyen/Model/Checkout/AmazonPayDetails.php index f79fa037a..a472b41b5 100644 --- a/src/Adyen/Model/Checkout/AmazonPayDetails.php +++ b/src/Adyen/Model/Checkout/AmazonPayDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('amazonPayToken', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('checkoutSessionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'amazonpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AndroidPayDetails.php b/src/Adyen/Model/Checkout/AndroidPayDetails.php index 98fef1a2b..7d12eeb89 100644 --- a/src/Adyen/Model/Checkout/AndroidPayDetails.php +++ b/src/Adyen/Model/Checkout/AndroidPayDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'androidpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index 0a390ecc6..c824d6a61 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'applepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ApplePayDonations.php b/src/Adyen/Model/Checkout/ApplePayDonations.php index dc3a76a37..852d32e4e 100644 --- a/src/Adyen/Model/Checkout/ApplePayDonations.php +++ b/src/Adyen/Model/Checkout/ApplePayDonations.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'applepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AuthenticationData.php b/src/Adyen/Model/Checkout/AuthenticationData.php index 470fc04fd..0fd4f769d 100644 --- a/src/Adyen/Model/Checkout/AuthenticationData.php +++ b/src/Adyen/Model/Checkout/AuthenticationData.php @@ -258,7 +258,7 @@ public function getAttemptAuthenticationAllowableValues() public function __construct(array $data = null) { $this->setIfExists('attemptAuthentication', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('threeDSRequestData', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index b41f808ed..fb75f9c41 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -285,7 +285,7 @@ public function __construct(array $data = null) $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'directdebit_GB'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index 01f8f6d3d..5ffe31355 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -564,7 +564,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/BrowserInfo.php b/src/Adyen/Model/Checkout/BrowserInfo.php index bf69ebe29..f1af627f0 100644 --- a/src/Adyen/Model/Checkout/BrowserInfo.php +++ b/src/Adyen/Model/Checkout/BrowserInfo.php @@ -282,7 +282,7 @@ public function __construct(array $data = null) $this->setIfExists('acceptHeader', $data ?? [], null); $this->setIfExists('colorDepth', $data ?? [], null); $this->setIfExists('javaEnabled', $data ?? [], null); - $this->setIfExists('javaScriptEnabled', $data ?? [], true); + $this->setIfExists('javaScriptEnabled', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); $this->setIfExists('screenHeight', $data ?? [], null); $this->setIfExists('screenWidth', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 20aa29cc2..a5d5b8384 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -391,7 +391,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'scheme'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index 38b7f4c2d..56e236e97 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -391,7 +391,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'scheme'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/CellulantDetails.php b/src/Adyen/Model/Checkout/CellulantDetails.php index 790177290..83334ef51 100644 --- a/src/Adyen/Model/Checkout/CellulantDetails.php +++ b/src/Adyen/Model/Checkout/CellulantDetails.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'cellulant'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 50f094c68..e24d9fb63 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -552,7 +552,7 @@ public function __construct(array $data = null) $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'zip'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('billingAddress', $data ?? [], null); $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); @@ -1651,7 +1651,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1678,7 +1678,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index d9fe77891..d98a67c3d 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -688,7 +688,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('mode', $data ?? [], 'embedded'); + $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('mpiData', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); @@ -709,14 +709,14 @@ public function __construct(array $data = null) $this->setIfExists('showInstallmentAmount', $data ?? [], null); $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('themeId', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 611a2f7b2..9f24a67a4 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -707,7 +707,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('mode', $data ?? [], 'embedded'); + $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('mpiData', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); @@ -729,14 +729,14 @@ public function __construct(array $data = null) $this->setIfExists('showInstallmentAmount', $data ?? [], null); $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('themeId', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php index c0be6578a..ef65cbd0d 100644 --- a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php +++ b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php @@ -231,7 +231,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/DeviceRenderOptions.php b/src/Adyen/Model/Checkout/DeviceRenderOptions.php index 1e8146f0b..b3a868a14 100644 --- a/src/Adyen/Model/Checkout/DeviceRenderOptions.php +++ b/src/Adyen/Model/Checkout/DeviceRenderOptions.php @@ -273,7 +273,7 @@ public function getSdkUiTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('sdkInterface', $data ?? [], 'both'); + $this->setIfExists('sdkInterface', $data ?? [], null); $this->setIfExists('sdkUiType', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index e15723075..d0dfa3d7f 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -368,7 +368,7 @@ public function __construct(array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 4a24b2f8d..f705b2bd2 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -561,7 +561,7 @@ public function __construct(array $data = null) $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/DotpayDetails.php b/src/Adyen/Model/Checkout/DotpayDetails.php index e9164300b..4f06d239f 100644 --- a/src/Adyen/Model/Checkout/DotpayDetails.php +++ b/src/Adyen/Model/Checkout/DotpayDetails.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dotpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/GiropayDetails.php b/src/Adyen/Model/Checkout/GiropayDetails.php index 6a369f01a..00a6543a5 100644 --- a/src/Adyen/Model/Checkout/GiropayDetails.php +++ b/src/Adyen/Model/Checkout/GiropayDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'giropay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index c913b5cf4..541a70b1c 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -299,7 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'googlepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/GooglePayDonations.php b/src/Adyen/Model/Checkout/GooglePayDonations.php index 4e0d7c851..9c4effa39 100644 --- a/src/Adyen/Model/Checkout/GooglePayDonations.php +++ b/src/Adyen/Model/Checkout/GooglePayDonations.php @@ -299,7 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'googlepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index 0b35c439d..2e4e906f9 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ideal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php index 48658444c..208f4360c 100644 --- a/src/Adyen/Model/Checkout/IdealDonations.php +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ideal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 81dc81d46..ee23617db 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -304,7 +304,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'klarna'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index 02e2cd876..2e9709355 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -278,7 +278,7 @@ public function __construct(array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'masterpass'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index a2cb74f0f..4c62a22e6 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'mbway'); + $this->setIfExists('type', $data ?? [], null); } /** @@ -364,7 +364,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -391,7 +391,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MobilePayDetails.php b/src/Adyen/Model/Checkout/MobilePayDetails.php index f17a736c8..de4f9ae12 100644 --- a/src/Adyen/Model/Checkout/MobilePayDetails.php +++ b/src/Adyen/Model/Checkout/MobilePayDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'mobilepay'); + $this->setIfExists('type', $data ?? [], null); } /** 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/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index 0d4e5c822..c7cb7c02c 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'openinvoice'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index f8de39edc..5837e901e 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -313,7 +313,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paypal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index 1fbf215af..497cceaf9 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -277,7 +277,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'payu_IN_upi'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index 9417cc0cf..fe3e5c4ff 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php index 69f2df4e0..8b7c85f2c 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index d60de2330..4b2850a71 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -535,9 +535,9 @@ public function __construct(array $data = null) $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); - $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], true); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index 249c5a074..d4e072a27 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -580,9 +580,9 @@ public function __construct(array $data = null) $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); - $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], true); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php index 276c3ccde..3936fbaac 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php +++ b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php @@ -243,7 +243,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('disabled', $data ?? [], false); + $this->setIfExists('disabled', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index 16894706d..20f47872e 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -323,7 +323,7 @@ public function __construct(array $data = null) $this->setIfExists('order', $data ?? [], null); $this->setIfExists('shopperLocale', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 333505083..6115e0a8e 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -772,7 +772,7 @@ public function __construct(array $data = null) $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index 5e6c0651f..8583c1e16 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -662,7 +662,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('token', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index 3a8b555dc..1386846df 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -287,7 +287,7 @@ public function __construct(array $data = null) $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ratepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index cdf52312e..0c094a34a 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'samsungpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index 53c8fd73f..7f8f02d7e 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -280,7 +280,7 @@ public function __construct(array $data = null) $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sepadirectdebit'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index 358fe278b..a33c140ba 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -574,7 +574,7 @@ public function __construct(array $data = null) $this->setIfExists('acquirerBIN', $data ?? [], null); $this->setIfExists('acquirerMerchantID', $data ?? [], null); $this->setIfExists('addrMatch', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('deviceChannel', $data ?? [], null); $this->setIfExists('deviceRenderOptions', $data ?? [], null); @@ -592,7 +592,7 @@ public function __construct(array $data = null) $this->setIfExists('sdkAppID', $data ?? [], null); $this->setIfExists('sdkEncData', $data ?? [], null); $this->setIfExists('sdkEphemPubKey', $data ?? [], null); - $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkMaxTimeout', $data ?? [], null); $this->setIfExists('sdkReferenceNumber', $data ?? [], null); $this->setIfExists('sdkTransID', $data ?? [], null); $this->setIfExists('sdkVersion', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php index 9227c8ff7..6b7e2f910 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php @@ -556,7 +556,7 @@ public function __construct(array $data = null) $this->setIfExists('acquirerBIN', $data ?? [], null); $this->setIfExists('acquirerMerchantID', $data ?? [], null); $this->setIfExists('addrMatch', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('deviceRenderOptions', $data ?? [], null); $this->setIfExists('homePhone', $data ?? [], null); @@ -572,7 +572,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringFrequency', $data ?? [], null); $this->setIfExists('sdkAppID', $data ?? [], null); $this->setIfExists('sdkEphemPubKey', $data ?? [], null); - $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkMaxTimeout', $data ?? [], null); $this->setIfExists('sdkReferenceNumber', $data ?? [], null); $this->setIfExists('sdkTransID', $data ?? [], null); $this->setIfExists('threeDSCompInd', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index 5f048c8d7..f08fbe296 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -284,7 +284,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'upi_collect'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index 3c1b198b5..581194e81 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'upi_intent'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index ac49dfcd8..cf50272f0 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'vipps'); + $this->setIfExists('type', $data ?? [], null); } /** @@ -424,7 +424,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index 098465adf..cb794ea8a 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -277,7 +277,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'visacheckout'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('visaCheckoutCallId', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/WeChatPayDetails.php b/src/Adyen/Model/Checkout/WeChatPayDetails.php index 7d23fece0..9acbd8a03 100644 --- a/src/Adyen/Model/Checkout/WeChatPayDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayDetails.php @@ -252,7 +252,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'wechatpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index 1ae26ab9a..da7eb46cf 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('appId', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('openid', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'wechatpayMiniProgram'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index 25bd9c0b4..bb98e95ed 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -273,7 +273,7 @@ public function __construct(array $data = null) $this->setIfExists('clickAndCollect', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'zip'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 6c852042d..760b44de7 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 */ @@ -385,7 +385,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -412,7 +412,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -448,7 +448,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php index db3023ca8..196fd2c05 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php @@ -527,7 +527,7 @@ public function getShippingMethod() /** * Sets shippingMethod * - * @param string|null $shippingMethod Shipping method used to deliver the card or the PIN. + * @param string|null $shippingMethod The shipping method used to deliver the card or the PIN. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php index 9d7b80641..352b3a060 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php @@ -338,7 +338,7 @@ public function getErrorMessage() /** * Sets errorMessage * - * @param string|null $errorMessage Error message. + * @param string|null $errorMessage An error message. * * @return self */ @@ -365,7 +365,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status Status of the delivery. + * @param string|null $status The status of the PIN delivery. * * @return self */ @@ -402,7 +402,7 @@ public function getTrackingNumber() /** * Sets trackingNumber * - * @param string|null $trackingNumber Tracking number of the delivery. + * @param string|null $trackingNumber The tracking number of the PIN delivery. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php index b3f705dd9..e042d075e 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index a94c73762..9e8e21d0d 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/ConfigurationWebhooks/PaymentInstrumentBankAccount.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php index 3d8a3dce6..d648d8fce 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php @@ -256,9 +256,9 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); } diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index 33917f8e5..63499f5e8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -371,7 +371,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php index 231b1246f..9a4af774a 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** 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/AULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php index 5fef23b76..e194c1878 100644 --- a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php index bf43d76e3..920877be4 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php @@ -311,8 +311,8 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); diff --git a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php index 47e87773d..02cd58953 100644 --- a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php index c2a258ae5..c21d3687c 100644 --- a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php index a0f4f18a9..46d3dc8f2 100644 --- a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index f8495e9f4..9e31f1ade 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php index f73557bd0..72ed39f5b 100644 --- a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php index e587937e1..2f16170ea 100644 --- a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php index a75f052a7..28a6281cd 100644 --- a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php index 4753cd0dd..049146da9 100644 --- a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php index ce9519143..e1782360f 100644 --- a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** 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/PLLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php index 3871a6b94..a750b1a18 100644 --- a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php index 0b3c8079c..e80a7ca90 100644 --- a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php index 6e5e53def..9a1375a9f 100644 --- a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php index a7af9a848..72f26d9bf 100644 --- a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php index 239cd5ad9..e1f100e15 100644 --- a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index d1095a557..1cb12dfef 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'InstallAndroidApp'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index da8673226..4b6aa1cfc 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('certificateId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'InstallAndroidCertificate'); + $this->setIfExists('type', $data ?? [], null); } /** 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/Management/Passcodes.php b/src/Adyen/Model/Management/Passcodes.php index 776082659..349442ca7 100644 --- a/src/Adyen/Model/Management/Passcodes.php +++ b/src/Adyen/Model/Management/Passcodes.php @@ -337,7 +337,7 @@ public function getRefundPin() /** * Sets refundPin * - * @param string|null $refundPin The passcode for unreferenced refunds on standalone terminals. + * @param string|null $refundPin The passcode for referenced and unreferenced refunds on standalone terminals. * * @return self */ diff --git a/src/Adyen/Model/Management/PayAtTable.php b/src/Adyen/Model/Management/PayAtTable.php index 04401a383..dd81be8ad 100644 --- a/src/Adyen/Model/Management/PayAtTable.php +++ b/src/Adyen/Model/Management/PayAtTable.php @@ -45,7 +45,8 @@ class PayAtTable implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'authenticationMethod' => 'string', - 'enablePayAtTable' => 'bool' + 'enablePayAtTable' => 'bool', + 'paymentInstrument' => 'string' ]; /** @@ -57,7 +58,8 @@ class PayAtTable implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'authenticationMethod' => null, - 'enablePayAtTable' => null + 'enablePayAtTable' => null, + 'paymentInstrument' => null ]; /** @@ -67,7 +69,8 @@ class PayAtTable implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'authenticationMethod' => false, - 'enablePayAtTable' => false + 'enablePayAtTable' => false, + 'paymentInstrument' => false ]; /** @@ -157,7 +160,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'authenticationMethod' => 'authenticationMethod', - 'enablePayAtTable' => 'enablePayAtTable' + 'enablePayAtTable' => 'enablePayAtTable', + 'paymentInstrument' => 'paymentInstrument' ]; /** @@ -167,7 +171,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'authenticationMethod' => 'setAuthenticationMethod', - 'enablePayAtTable' => 'setEnablePayAtTable' + 'enablePayAtTable' => 'setEnablePayAtTable', + 'paymentInstrument' => 'setPaymentInstrument' ]; /** @@ -177,7 +182,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'authenticationMethod' => 'getAuthenticationMethod', - 'enablePayAtTable' => 'getEnablePayAtTable' + 'enablePayAtTable' => 'getEnablePayAtTable', + 'paymentInstrument' => 'getPaymentInstrument' ]; /** @@ -223,6 +229,8 @@ public function getModelName() public const AUTHENTICATION_METHOD_MAGSWIPE = 'MAGSWIPE'; public const AUTHENTICATION_METHOD_MKE = 'MKE'; + public const PAYMENT_INSTRUMENT_CASH = 'Cash'; + public const PAYMENT_INSTRUMENT_CARD = 'Card'; /** * Gets allowable values of the enum @@ -236,6 +244,18 @@ public function getAuthenticationMethodAllowableValues() self::AUTHENTICATION_METHOD_MKE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaymentInstrumentAllowableValues() + { + return [ + self::PAYMENT_INSTRUMENT_CASH, + self::PAYMENT_INSTRUMENT_CARD, + ]; + } /** * Associative array for storing property values * @@ -253,6 +273,7 @@ public function __construct(array $data = null) { $this->setIfExists('authenticationMethod', $data ?? [], null); $this->setIfExists('enablePayAtTable', $data ?? [], null); + $this->setIfExists('paymentInstrument', $data ?? [], null); } /** @@ -291,6 +312,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getPaymentInstrumentAllowableValues(); + if (!is_null($this->container['paymentInstrument']) && !in_array($this->container['paymentInstrument'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paymentInstrument', must be one of '%s'", + $this->container['paymentInstrument'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -369,6 +399,43 @@ public function setEnablePayAtTable($enablePayAtTable) return $this; } + + /** + * Gets paymentInstrument + * + * @return string|null + */ + public function getPaymentInstrument() + { + return $this->container['paymentInstrument']; + } + + /** + * Sets paymentInstrument + * + * @param string|null $paymentInstrument Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options. + * + * @return self + */ + public function setPaymentInstrument($paymentInstrument) + { + if (is_null($paymentInstrument)) { + throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); + } + $allowedValues = $this->getPaymentInstrumentAllowableValues(); + if (!in_array($paymentInstrument, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paymentInstrument', must be one of '%s'", + $paymentInstrument, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paymentInstrument'] = $paymentInstrument; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 3f4ce0a3b..b085e45ab 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -679,7 +679,7 @@ public function getBusinessLineId() /** * Sets businessLineId * - * @param string|null $businessLineId The unique identifier of the business line. + * @param string|null $businessLineId The unique identifier of the business line. Required if you have a [platform setup](https://docs.adyen.com/marketplaces-and-platforms/platform-structure-resources/platform-setup/). * * @return self */ diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 25f0a09d8..b435f1c08 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -741,7 +741,7 @@ public function getBusinessLineId() /** * Sets businessLineId * - * @param string|null $businessLineId The unique identifier of the business line. + * @param string|null $businessLineId The unique identifier of the business line. Required if you have a [platform setup](https://docs.adyen.com/marketplaces-and-platforms/platform-structure-resources/platform-setup/). * * @return self */ diff --git a/src/Adyen/Model/Management/Referenced.php b/src/Adyen/Model/Management/Referenced.php new file mode 100644 index 000000000..490cad6dc --- /dev/null +++ b/src/Adyen/Model/Management/Referenced.php @@ -0,0 +1,384 @@ + + */ +class Referenced implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Referenced'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enableStandaloneRefunds' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enableStandaloneRefunds' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'enableStandaloneRefunds' => 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 = [ + 'enableStandaloneRefunds' => 'enableStandaloneRefunds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enableStandaloneRefunds' => 'setEnableStandaloneRefunds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enableStandaloneRefunds' => 'getEnableStandaloneRefunds' + ]; + + /** + * 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('enableStandaloneRefunds', $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 enableStandaloneRefunds + * + * @return bool|null + */ + public function getEnableStandaloneRefunds() + { + return $this->container['enableStandaloneRefunds']; + } + + /** + * Sets enableStandaloneRefunds + * + * @param bool|null $enableStandaloneRefunds Indicates whether referenced refunds are enabled on the standalone terminal. + * + * @return self + */ + public function setEnableStandaloneRefunds($enableStandaloneRefunds) + { + if (is_null($enableStandaloneRefunds)) { + throw new \InvalidArgumentException('non-nullable enableStandaloneRefunds cannot be null'); + } + $this->container['enableStandaloneRefunds'] = $enableStandaloneRefunds; + + 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); + } + + /** + * 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/Management/Refunds.php b/src/Adyen/Model/Management/Refunds.php new file mode 100644 index 000000000..f82a6b04d --- /dev/null +++ b/src/Adyen/Model/Management/Refunds.php @@ -0,0 +1,384 @@ + + */ +class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Refunds'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'referenced' => '\Adyen\Model\Management\Referenced' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'referenced' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'referenced' => 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 = [ + 'referenced' => 'referenced' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'referenced' => 'setReferenced' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'referenced' => 'getReferenced' + ]; + + /** + * 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('referenced', $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 referenced + * + * @return \Adyen\Model\Management\Referenced|null + */ + public function getReferenced() + { + return $this->container['referenced']; + } + + /** + * Sets referenced + * + * @param \Adyen\Model\Management\Referenced|null $referenced referenced + * + * @return self + */ + public function setReferenced($referenced) + { + if (is_null($referenced)) { + throw new \InvalidArgumentException('non-nullable referenced cannot be null'); + } + $this->container['referenced'] = $referenced; + + 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); + } + + /** + * 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/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index 2d4b7574e..a6820dfb1 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -249,7 +249,7 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('type', $data ?? [], 'ReleaseUpdate'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('updateAtFirstMaintenanceCall', $data ?? [], null); } diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php index 936dcdba9..8a8abbdf1 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php @@ -250,7 +250,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'UninstallAndroidCertificate'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('certificateId', $data ?? [], null); $this->setIfExists('updateAtFirstMaintenanceCall', $data ?? [], null); } diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index 576da5977..9347de8d2 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -57,6 +57,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'payment' => '\Adyen\Model\Management\Payment', 'receiptOptions' => '\Adyen\Model\Management\ReceiptOptions', 'receiptPrinting' => '\Adyen\Model\Management\ReceiptPrinting', + 'refunds' => '\Adyen\Model\Management\Refunds', 'signature' => '\Adyen\Model\Management\Signature', 'standalone' => '\Adyen\Model\Management\Standalone', 'surcharge' => '\Adyen\Model\Management\Surcharge', @@ -86,6 +87,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'payment' => null, 'receiptOptions' => null, 'receiptPrinting' => null, + 'refunds' => null, 'signature' => null, 'standalone' => null, 'surcharge' => null, @@ -113,6 +115,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'payment' => false, 'receiptOptions' => false, 'receiptPrinting' => false, + 'refunds' => false, 'signature' => false, 'standalone' => false, 'surcharge' => false, @@ -220,6 +223,7 @@ public function isNullableSetToNull(string $property): bool 'payment' => 'payment', 'receiptOptions' => 'receiptOptions', 'receiptPrinting' => 'receiptPrinting', + 'refunds' => 'refunds', 'signature' => 'signature', 'standalone' => 'standalone', 'surcharge' => 'surcharge', @@ -247,6 +251,7 @@ public function isNullableSetToNull(string $property): bool 'payment' => 'setPayment', 'receiptOptions' => 'setReceiptOptions', 'receiptPrinting' => 'setReceiptPrinting', + 'refunds' => 'setRefunds', 'signature' => 'setSignature', 'standalone' => 'setStandalone', 'surcharge' => 'setSurcharge', @@ -274,6 +279,7 @@ public function isNullableSetToNull(string $property): bool 'payment' => 'getPayment', 'receiptOptions' => 'getReceiptOptions', 'receiptPrinting' => 'getReceiptPrinting', + 'refunds' => 'getRefunds', 'signature' => 'getSignature', 'standalone' => 'getStandalone', 'surcharge' => 'getSurcharge', @@ -352,6 +358,7 @@ public function __construct(array $data = null) $this->setIfExists('payment', $data ?? [], null); $this->setIfExists('receiptOptions', $data ?? [], null); $this->setIfExists('receiptPrinting', $data ?? [], null); + $this->setIfExists('refunds', $data ?? [], null); $this->setIfExists('signature', $data ?? [], null); $this->setIfExists('standalone', $data ?? [], null); $this->setIfExists('surcharge', $data ?? [], null); @@ -753,6 +760,33 @@ public function setReceiptPrinting($receiptPrinting) return $this; } + /** + * Gets refunds + * + * @return \Adyen\Model\Management\Refunds|null + */ + public function getRefunds() + { + return $this->container['refunds']; + } + + /** + * Sets refunds + * + * @param \Adyen\Model\Management\Refunds|null $refunds refunds + * + * @return self + */ + public function setRefunds($refunds) + { + if (is_null($refunds)) { + throw new \InvalidArgumentException('non-nullable refunds cannot be null'); + } + $this->container['refunds'] = $refunds; + + return $this; + } + /** * Gets signature * diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index d33f2e53b..544a58f21 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -254,7 +254,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('doingBusinessAsName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dynamic'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index e7c943959..54bdd7865 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'UninstallAndroidApp'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index 3675c6f45..814758942 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('certificateId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'UninstallAndroidCertificate'); + $this->setIfExists('type', $data ?? [], null); } /** 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/BrowserInfo.php b/src/Adyen/Model/Payments/BrowserInfo.php index a8dbfac39..668e474f1 100644 --- a/src/Adyen/Model/Payments/BrowserInfo.php +++ b/src/Adyen/Model/Payments/BrowserInfo.php @@ -282,7 +282,7 @@ public function __construct(array $data = null) $this->setIfExists('acceptHeader', $data ?? [], null); $this->setIfExists('colorDepth', $data ?? [], null); $this->setIfExists('javaEnabled', $data ?? [], null); - $this->setIfExists('javaScriptEnabled', $data ?? [], true); + $this->setIfExists('javaScriptEnabled', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); $this->setIfExists('screenHeight', $data ?? [], null); $this->setIfExists('screenWidth', $data ?? [], null); diff --git a/src/Adyen/Model/Payments/DeviceRenderOptions.php b/src/Adyen/Model/Payments/DeviceRenderOptions.php index e064ceeaf..d599b0a1e 100644 --- a/src/Adyen/Model/Payments/DeviceRenderOptions.php +++ b/src/Adyen/Model/Payments/DeviceRenderOptions.php @@ -273,7 +273,7 @@ public function getSdkUiTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('sdkInterface', $data ?? [], 'both'); + $this->setIfExists('sdkInterface', $data ?? [], null); $this->setIfExists('sdkUiType', $data ?? [], null); } 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/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index fec990ada..2867e7054 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -655,7 +655,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index 54d09679c..ad0bfd4b6 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -571,7 +571,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index 8824acaa9..bafef4bf3 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -571,7 +571,7 @@ public function __construct(array $data = null) $this->setIfExists('threeDS2RequestData', $data ?? [], null); $this->setIfExists('threeDS2Result', $data ?? [], null); $this->setIfExists('threeDS2Token', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/ThreeDS2RequestData.php b/src/Adyen/Model/Payments/ThreeDS2RequestData.php index 9add4f703..010245f7a 100644 --- a/src/Adyen/Model/Payments/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Payments/ThreeDS2RequestData.php @@ -574,7 +574,7 @@ public function __construct(array $data = null) $this->setIfExists('acquirerBIN', $data ?? [], null); $this->setIfExists('acquirerMerchantID', $data ?? [], null); $this->setIfExists('addrMatch', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('deviceChannel', $data ?? [], null); $this->setIfExists('deviceRenderOptions', $data ?? [], null); @@ -592,7 +592,7 @@ public function __construct(array $data = null) $this->setIfExists('sdkAppID', $data ?? [], null); $this->setIfExists('sdkEncData', $data ?? [], null); $this->setIfExists('sdkEphemPubKey', $data ?? [], null); - $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkMaxTimeout', $data ?? [], null); $this->setIfExists('sdkReferenceNumber', $data ?? [], null); $this->setIfExists('sdkTransID', $data ?? [], null); $this->setIfExists('sdkVersion', $data ?? [], null); 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/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/AULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php index 89a951cec..0a526a14e 100644 --- a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php index 1b3ddfbdd..592f24e5e 100644 --- a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'brLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index 263fcaf08..d255f3a3c 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php index d952af333..e5d420475 100644 --- a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php @@ -272,7 +272,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'bank'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php index fff6b723c..c0fa683cf 100644 --- a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php index dddab895f..8196e08aa 100644 --- a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php index 57e033e58..1339a0f8a 100644 --- a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index 888d837e7..d1920bdfa 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php index 3807bdd29..6c3e7afd0 100644 --- a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php index e7fab4fbf..b39bc3413 100644 --- a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php index ecf1c0943..4101a0f43 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'internal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/IssuedCard.php b/src/Adyen/Model/TransferWebhooks/IssuedCard.php index 60090d2af..e1a1b7cd1 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransferWebhooks/IssuedCard.php @@ -341,7 +341,7 @@ public function __construct(array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'issuedCard'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); } diff --git a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php index 1bad403bf..a6cbc63c4 100644 --- a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index f3a47e94b..ad924ca5f 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php index b3ab1a0cd..9acddff57 100644 --- a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** 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/PLLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php index 1ee6f2bb7..9d927ab33 100644 --- a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php index 55dbe2a61..0732aca7c 100644 --- a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'unknown'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php index 31bf21fa1..40b2e9aab 100644 --- a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php +++ b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php @@ -314,7 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); $this->setIfExists('pspPaymentReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php index 48fc1b814..200f72c76 100644 --- a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php index 486dc6e64..394d058c6 100644 --- a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php index 56119b81e..a9f77929e 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php @@ -310,7 +310,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); $this->setIfExists('authorisationType', $data ?? [], null); diff --git a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php index 9e1776c99..1c726c80b 100644 --- a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php index 1ec71c3f3..1da7dc070 100644 --- a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php index 1901e209e..17443b310 100644 --- a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php index d29b31f15..5fde276f4 100644 --- a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'brLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index 97edbf1f2..c50f83a9d 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/Transfers/BankCategoryData.php b/src/Adyen/Model/Transfers/BankCategoryData.php index fc0929a90..3a60bb8e8 100644 --- a/src/Adyen/Model/Transfers/BankCategoryData.php +++ b/src/Adyen/Model/Transfers/BankCategoryData.php @@ -272,7 +272,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'bank'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php index 5e939e144..967de83cc 100644 --- a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php index c5e52c35f..4e8d744ac 100644 --- a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php index bf06c781b..1d864688a 100644 --- a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php index 428854511..661a76fda 100644 --- a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php index c3b357222..5fea3c9a2 100644 --- a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/IbanAccountIdentification.php b/src/Adyen/Model/Transfers/IbanAccountIdentification.php index bb4ca9f90..74b1f654c 100644 --- a/src/Adyen/Model/Transfers/IbanAccountIdentification.php +++ b/src/Adyen/Model/Transfers/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/InternalCategoryData.php b/src/Adyen/Model/Transfers/InternalCategoryData.php index c0f6bd6dc..ab31ce17c 100644 --- a/src/Adyen/Model/Transfers/InternalCategoryData.php +++ b/src/Adyen/Model/Transfers/InternalCategoryData.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'internal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/IssuedCard.php b/src/Adyen/Model/Transfers/IssuedCard.php index 6fb8747df..f1b1e5490 100644 --- a/src/Adyen/Model/Transfers/IssuedCard.php +++ b/src/Adyen/Model/Transfers/IssuedCard.php @@ -341,7 +341,7 @@ public function __construct(array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'issuedCard'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); } diff --git a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php index 0e98b008a..3100e6e92 100644 --- a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php index c58c71a56..598259945 100644 --- a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php index 838ca66e1..d0b6347a6 100644 --- a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** 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/PLLocalAccountIdentification.php b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php index b021cd4f0..9151369e9 100644 --- a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/PartyIdentification.php b/src/Adyen/Model/Transfers/PartyIdentification.php index c98e9e0b1..7b9eb5c0f 100644 --- a/src/Adyen/Model/Transfers/PartyIdentification.php +++ b/src/Adyen/Model/Transfers/PartyIdentification.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'unknown'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/PlatformPayment.php b/src/Adyen/Model/Transfers/PlatformPayment.php index 98fb4eb36..ff5371ead 100644 --- a/src/Adyen/Model/Transfers/PlatformPayment.php +++ b/src/Adyen/Model/Transfers/PlatformPayment.php @@ -314,7 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); $this->setIfExists('pspPaymentReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php index 725ce9f94..c64230077 100644 --- a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php index f977fb557..dbbcb2eba 100644 --- a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/TransferCategoryData.php b/src/Adyen/Model/Transfers/TransferCategoryData.php index b4e3025d4..02aa45793 100644 --- a/src/Adyen/Model/Transfers/TransferCategoryData.php +++ b/src/Adyen/Model/Transfers/TransferCategoryData.php @@ -310,7 +310,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); $this->setIfExists('authorisationType', $data ?? [], null); diff --git a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php index f2e41ce36..8de0363f1 100644 --- a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php index 477399633..daf294700 100644 --- a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php index e9f5f976c..4abe664ed 100644 --- a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php +++ b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'unknown'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 5acf9f0ad..bcb0276b3 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,28 +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); - } - - /** - * Get all payment instruments for a balance account - * - * @param string $id - * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse - * @throws AdyenException - */ - public function getAllPaymentInstrumentsForBalanceAccount(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse - { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balanceAccounts/{id}/paymentInstruments"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse::class); + } /** @@ -130,6 +116,21 @@ public function getBalanceAccount(string $id, array $requestOptions = null): \Ad return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalanceAccount::class); } + /** + * Get payment instruments linked to a balance account + * + * @param string $id + * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int, 'status'=> string]] + * @return \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse + * @throws AdyenException + */ + public function getPaymentInstrumentsLinkedToBalanceAccount(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balanceAccounts/{id}/paymentInstruments"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse::class); + } + /** * Get a sweep * 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/CardOrdersApi.php b/src/Adyen/Service/BalancePlatform/CardOrdersApi.php new file mode 100644 index 000000000..9784a0569 --- /dev/null +++ b/src/Adyen/Service/BalancePlatform/CardOrdersApi.php @@ -0,0 +1,70 @@ +baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * Get card order items + * + * @param string $id + * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\BalancePlatform\PaginatedGetCardOrderItemResponse + * @throws AdyenException + */ + public function getCardOrderItems(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedGetCardOrderItemResponse + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/cardorders/{id}/items"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedGetCardOrderItemResponse::class); + } + + /** + * Get a list of card orders + * + * @param array|null $requestOptions ['queryParams' => ['id'=> string, 'cardManufacturingProfileId'=> string, 'status'=> string, 'txVariantCode'=> string, 'createdSince'=> \DateTime, 'createdUntil'=> \DateTime, 'lockedSince'=> \DateTime, 'lockedUntil'=> \DateTime, 'serviceCenter'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\BalancePlatform\PaginatedGetCardOrderResponse + * @throws AdyenException + */ + public function listCardOrders(array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedGetCardOrderResponse + { + $endpoint = $this->baseURL . "/cardorders"; + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedGetCardOrderResponse::class); + } +} 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/BalancePlatform/PINFunctionalityApi.php b/src/Adyen/Service/BalancePlatform/PINFunctionalityApi.php new file mode 100644 index 000000000..767809c8a --- /dev/null +++ b/src/Adyen/Service/BalancePlatform/PINFunctionalityApi.php @@ -0,0 +1,85 @@ +baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * Change Pin + * + * @param \Adyen\Model\BalancePlatform\PinChangeRequest $pinChangeRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\PinChangeResponse + * @throws AdyenException + */ + public function changePin(\Adyen\Model\BalancePlatform\PinChangeRequest $pinChangeRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\PinChangeResponse + { + $endpoint = $this->baseURL . "/pins/change"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $pinChangeRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PinChangeResponse::class); + } + + /** + * Get RSA publicKey + * + * @param array|null $requestOptions ['queryParams' => ['purpose'=> string, 'format'=> string]] + * @return \Adyen\Model\BalancePlatform\PublicKeyResponse + * @throws AdyenException + */ + public function getRsaPublickey(array $requestOptions = null): \Adyen\Model\BalancePlatform\PublicKeyResponse + { + $endpoint = $this->baseURL . "/pins/publicKey"; + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PublicKeyResponse::class); + } + + /** + * Reveal Pin + * + * @param \Adyen\Model\BalancePlatform\RevealPinRequest $revealPinRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\RevealPinResponse + * @throws AdyenException + */ + public function revealPin(\Adyen\Model\BalancePlatform\RevealPinRequest $revealPinRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\RevealPinResponse + { + $endpoint = $this->baseURL . "/pins/reveal"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $revealPinRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\RevealPinResponse::class); + } +} diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 36f89ce4b..0486c983d 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 f8cc76da8..ef76b3ad3 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 7f0684078..2be1d91c0 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 8c6b933d2..02afdeebe 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); + } /**