From fca4ae104a2f79f139d646dd0c9b90924e4268d2 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Tue, 18 Jul 2023 07:51:50 +0000 Subject: [PATCH] [create-pull-request] automated change --- .../Model/BalancePlatform/AccountHolder.php | 36 +- .../AccountHolderCapability.php | 12 +- .../BalancePlatform/AccountHolderInfo.php | 36 +- .../Model/BalancePlatform/BalanceAccount.php | 36 +- .../BalancePlatform/BalanceAccountBase.php | 36 +- .../BalancePlatform/BalanceAccountInfo.php | 36 +- .../BalanceAccountUpdateRequest.php | 36 +- .../BalancePlatform/CapabilitySettings.php | 580 ++++++ .../BalancePlatform/CronSweepSchedule.php | 2 +- .../{Address2.php => DeliveryAddress.php} | 6 +- .../Model/BalancePlatform/DeliveryContact.php | 6 +- .../BalancePlatform/PaymentInstrument.php | 4 +- .../BalancePlatform/PaymentInstrumentInfo.php | 4 +- .../PaymentInstrumentUpdateRequest.php | 2 + .../SweepConfigurationV2Schedule.php | 2 +- .../Model/BalancePlatform/SweepSchedule.php | 2 +- .../UpdatePaymentInstrument.php | 4 +- .../Model/Checkout/AdditionalDataAirline.php | 56 +- .../Checkout/AdditionalDataCarRental.php | 46 +- .../Model/Checkout/AdditionalDataLevel23.php | 34 +- .../Model/Checkout/AdditionalDataLodging.php | 62 +- .../AdditionalDataTemporaryServices.php | 18 +- .../Checkout/CheckoutBalanceCheckRequest.php | 9 +- .../CheckoutDelegatedAuthenticationAction.php | 588 ++++++ ...php => CheckoutDonationPaymentRequest.php} | 231 ++- .../Model/Checkout/CheckoutPaymentMethod.php | 68 + ...Request.php => CheckoutPaymentRequest.php} | 231 ++- .../Model/Checkout/CheckoutVoucherAction.php | 34 + .../Checkout/CreateCheckoutSessionRequest.php | 38 +- .../CreateCheckoutSessionResponse.php | 38 +- .../CreatePaymentAmountUpdateRequest.php | 34 + .../Checkout/CreatePaymentCaptureRequest.php | 80 +- .../Checkout/CreatePaymentLinkRequest.php | 8 +- src/Adyen/Model/Checkout/LineItem.php | 2 +- src/Adyen/Model/Checkout/PayPalDetails.php | 68 + .../Model/Checkout/PaymentCaptureResource.php | 80 +- .../Checkout/PaymentCompletionDetails.php | 34 + src/Adyen/Model/Checkout/PaymentDetails.php | 10 +- .../Model/Checkout/PaymentDetailsResponse.php | 4 +- .../Model/Checkout/PaymentLinkResponse.php | 8 +- .../Model/Checkout/PaymentMethodsRequest.php | 2 +- src/Adyen/Model/Checkout/PaymentResponse.php | 4 +- .../Model/Checkout/PaymentResponseAction.php | 170 +- .../Model/Checkout/PaymentSetupRequest.php | 2 +- .../Checkout/PaymentVerificationResponse.php | 4 +- .../Checkout/PlatformChargebackLogic.php | 6 +- .../Model/Checkout/SessionResultResponse.php | 459 +++++ src/Adyen/Model/Checkout/Split.php | 12 + .../Checkout/StoredPaymentMethodDetails.php | 4 +- src/Adyen/Model/Checkout/SubMerchant2.php | 520 +++++ .../Model/Checkout/ThreeDS2RequestData.php | 2 +- .../Model/Checkout/ThreeDS2RequestData2.php | 1800 +++++++++++++++++ src/Adyen/Model/Checkout/ThreeDS2Result.php | 136 +- .../Model/Checkout/ThreeDSRequestData.php | 4 +- .../AcceptTermsOfServiceRequest.php | 7 +- .../Model/LegalEntityManagement/Address.php | 2 +- .../LegalEntityManagement/BankAccountInfo.php | 46 +- .../LegalEntityManagement/BusinessLine.php | 39 +- .../BusinessLineInfo.php | 39 +- .../BusinessLineInfoUpdate.php | 37 +- .../CalculateTermsOfServiceStatusResponse.php | 417 ++++ .../CapabilityProblemEntity.php | 2 + .../CapabilityProblemEntityRecursive.php | 2 + .../Model/LegalEntityManagement/Document.php | 4 +- .../DocumentPage.php} | 94 +- .../DocumentReference.php | 34 + .../IdentificationData.php | 4 +- .../LegalEntityManagement/LegalEntity.php | 46 +- .../LegalEntityAssociation.php | 4 +- .../OnboardingLinkInfo.php | 2 +- .../LegalEntityManagement/Organization.php | 2 +- .../SGLocalAccountIdentification.php | 489 +++++ .../TransferInstrumentReference.php | 2 +- .../VerificationDeadline.php | 543 +++++ .../VerificationError.php | 4 + .../VerificationErrorRecursive.php | 4 + .../Model/Management/AdditionalCommission.php | 452 +++++ .../Model/Management/AfterpayTouchInfo.php | 387 ++++ src/Adyen/Model/Management/AndroidApp.php | 4 +- src/Adyen/Model/Management/ClearpayInfo.php | 387 ++++ src/Adyen/Model/Management/Commission.php | 418 ++++ src/Adyen/Model/Management/CompanyUser.php | 50 +- .../CreateCompanyApiCredentialRequest.php | 2 +- .../Management/CreateCompanyUserRequest.php | 36 +- .../Management/CreateCompanyUserResponse.php | 50 +- .../CreateCompanyWebhookRequest.php | 14 +- .../CreateMerchantApiCredentialRequest.php | 2 +- .../Management/CreateMerchantUserRequest.php | 36 +- .../CreateMerchantWebhookRequest.php | 14 +- .../Model/Management/CreateUserResponse.php | 32 +- src/Adyen/Model/Management/Currency.php | 8 +- src/Adyen/Model/Management/Hardware.php | 44 +- .../Model/Management/InvalidFieldWrapper.php | 384 ++++ src/Adyen/Model/Management/JSONObject.php | 6 +- .../Model/Management/JSONPathWrapper.php | 384 ++++ .../Management/ListTerminalsResponse.php | 116 +- src/Adyen/Model/Management/Nexo.php | 46 +- src/Adyen/Model/Management/Notification.php | 384 ++++ src/Adyen/Model/Management/PaymentMethod.php | 102 + .../Management/PaymentMethodResponse.php | 14 +- .../Management/PaymentMethodSetupInfo.php | 110 +- .../Model/Management/PaymentMethodWrapper.php | 384 ++++ .../Model/Management/RestServiceError.php | 6 +- .../Model/Management/SplitConfiguration.php | 492 +++++ .../Management/SplitConfigurationList.php | 384 ++++ .../Management/SplitConfigurationLogic.php | 795 ++++++++ .../Management/SplitConfigurationRule.php | 640 ++++++ .../Model/Management/StoreCreationRequest.php | 6 +- .../StoreCreationWithMerchantCodeRequest.php | 6 +- .../Model/Management/TerminalOrderRequest.php | 34 + .../Model/Management/TerminalProductPrice.php | 8 +- src/Adyen/Model/Management/TwintInfo.php | 387 ++++ .../UpdateCompanyApiCredentialRequest.php | 2 +- .../Management/UpdateCompanyUserRequest.php | 68 - .../UpdateCompanyWebhookRequest.php | 14 +- .../UpdateMerchantApiCredentialRequest.php | 2 +- .../Management/UpdateMerchantUserRequest.php | 68 - .../UpdateMerchantWebhookRequest.php | 14 +- .../Management/UpdatePaymentMethodInfo.php | 126 +- .../UpdateSplitConfigurationLogicRequest.php | 795 ++++++++ .../UpdateSplitConfigurationRequest.php | 387 ++++ .../UpdateSplitConfigurationRuleRequest.php | 495 +++++ src/Adyen/Model/Management/User.php | 32 +- src/Adyen/Model/Management/VippsInfo.php | 2 +- src/Adyen/Model/Management/Webhook.php | 14 +- .../Model/Payments/AdditionalDataAirline.php | 56 +- .../Payments/AdditionalDataCarRental.php | 46 +- .../Model/Payments/AdditionalDataLevel23.php | 34 +- .../Model/Payments/AdditionalDataLodging.php | 62 +- .../AdditionalDataTemporaryServices.php | 18 +- src/Adyen/Model/Payments/PaymentRequest.php | 2 +- src/Adyen/Model/Payments/PaymentRequest3d.php | 2 +- .../Model/Payments/PaymentRequest3ds2.php | 2 +- .../Payments/PlatformChargebackLogic.php | 6 +- src/Adyen/Model/Payments/Split.php | 12 + .../Model/Payments/ThreeDS2RequestData.php | 2 +- src/Adyen/Model/Payout/PayoutResponse.php | 4 +- src/Adyen/Model/Transfers/Address2.php | 2 +- .../BankAccountV3AccountIdentification.php | 39 +- src/Adyen/Model/Transfers/CapitalBalance.php | 498 +++++ src/Adyen/Model/Transfers/CapitalGrant.php | 706 +++++++ .../Model/Transfers/CapitalGrantInfo.php | 458 +++++ src/Adyen/Model/Transfers/CapitalGrants.php | 387 ++++ src/Adyen/Model/Transfers/Counterparty2.php | 452 +++++ src/Adyen/Model/Transfers/Fee.php | 387 ++++ .../NZLocalAccountIdentification.php | 529 +++++ .../Model/Transfers/PartyIdentification2.php | 4 +- src/Adyen/Model/Transfers/Repayment.php | 453 +++++ src/Adyen/Model/Transfers/RepaymentTerm.php | 417 ++++ .../Model/Transfers/ThresholdRepayment.php | 387 ++++ src/Adyen/Model/Transfers/Transaction.php | 6 + src/Adyen/Model/Transfers/Transfer.php | 42 +- src/Adyen/Model/Transfers/TransferInfo.php | 4 +- .../Transfers/UltimatePartyIdentification.php | 4 +- .../BankAccountValidationApi.php | 5 +- src/Adyen/Service/Checkout/PaymentsApi.php | 27 +- .../LegalEntityManagement/DocumentsApi.php | 4 +- .../TermsOfServiceApi.php | 15 + .../SplitConfigurationMerchantLevelApi.php | 192 ++ .../TerminalActionsCompanyLevelApi.php | 4 +- .../Management/TerminalsTerminalLevelApi.php | 2 +- src/Adyen/Service/Transfers/CapitalApi.php | 85 + 162 files changed, 20435 insertions(+), 1132 deletions(-) create mode 100644 src/Adyen/Model/BalancePlatform/CapabilitySettings.php rename src/Adyen/Model/BalancePlatform/{Address2.php => DeliveryAddress.php} (98%) create mode 100644 src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php rename src/Adyen/Model/Checkout/{PaymentRequest.php => CheckoutDonationPaymentRequest.php} (90%) rename src/Adyen/Model/Checkout/{PaymentDonationRequest.php => CheckoutPaymentRequest.php} (94%) create mode 100644 src/Adyen/Model/Checkout/SessionResultResponse.php create mode 100644 src/Adyen/Model/Checkout/SubMerchant2.php create mode 100644 src/Adyen/Model/Checkout/ThreeDS2RequestData2.php create mode 100644 src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php rename src/Adyen/Model/{Management/ShopperStatement.php => LegalEntityManagement/DocumentPage.php} (82%) create mode 100644 src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php create mode 100644 src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php create mode 100644 src/Adyen/Model/Management/AdditionalCommission.php create mode 100644 src/Adyen/Model/Management/AfterpayTouchInfo.php create mode 100644 src/Adyen/Model/Management/ClearpayInfo.php create mode 100644 src/Adyen/Model/Management/Commission.php create mode 100644 src/Adyen/Model/Management/InvalidFieldWrapper.php create mode 100644 src/Adyen/Model/Management/JSONPathWrapper.php create mode 100644 src/Adyen/Model/Management/Notification.php create mode 100644 src/Adyen/Model/Management/PaymentMethodWrapper.php create mode 100644 src/Adyen/Model/Management/SplitConfiguration.php create mode 100644 src/Adyen/Model/Management/SplitConfigurationList.php create mode 100644 src/Adyen/Model/Management/SplitConfigurationLogic.php create mode 100644 src/Adyen/Model/Management/SplitConfigurationRule.php create mode 100644 src/Adyen/Model/Management/TwintInfo.php create mode 100644 src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php create mode 100644 src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php create mode 100644 src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php create mode 100644 src/Adyen/Model/Transfers/CapitalBalance.php create mode 100644 src/Adyen/Model/Transfers/CapitalGrant.php create mode 100644 src/Adyen/Model/Transfers/CapitalGrantInfo.php create mode 100644 src/Adyen/Model/Transfers/CapitalGrants.php create mode 100644 src/Adyen/Model/Transfers/Counterparty2.php create mode 100644 src/Adyen/Model/Transfers/Fee.php create mode 100644 src/Adyen/Model/Transfers/NZLocalAccountIdentification.php create mode 100644 src/Adyen/Model/Transfers/Repayment.php create mode 100644 src/Adyen/Model/Transfers/RepaymentTerm.php create mode 100644 src/Adyen/Model/Transfers/ThresholdRepayment.php create mode 100644 src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php create mode 100644 src/Adyen/Service/Transfers/CapitalApi.php diff --git a/src/Adyen/Model/BalancePlatform/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index 3e017b887..1a3c65f28 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -50,6 +50,7 @@ class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => 'string', 'id' => 'string', 'legalEntityId' => 'string', + 'metadata' => 'array', 'primaryBalanceAccount' => 'string', 'reference' => 'string', 'status' => 'string', @@ -71,6 +72,7 @@ class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => null, 'id' => null, 'legalEntityId' => null, + 'metadata' => null, 'primaryBalanceAccount' => null, 'reference' => null, 'status' => null, @@ -90,6 +92,7 @@ class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => false, 'id' => false, 'legalEntityId' => false, + 'metadata' => false, 'primaryBalanceAccount' => false, 'reference' => false, 'status' => false, @@ -189,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'description', 'id' => 'id', 'legalEntityId' => 'legalEntityId', + 'metadata' => 'metadata', 'primaryBalanceAccount' => 'primaryBalanceAccount', 'reference' => 'reference', 'status' => 'status', @@ -208,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'setDescription', 'id' => 'setId', 'legalEntityId' => 'setLegalEntityId', + 'metadata' => 'setMetadata', 'primaryBalanceAccount' => 'setPrimaryBalanceAccount', 'reference' => 'setReference', 'status' => 'setStatus', @@ -227,6 +232,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'getDescription', 'id' => 'getId', 'legalEntityId' => 'getLegalEntityId', + 'metadata' => 'getMetadata', 'primaryBalanceAccount' => 'getPrimaryBalanceAccount', 'reference' => 'getReference', 'status' => 'getStatus', @@ -315,6 +321,7 @@ public function __construct(array $data = null) $this->setIfExists('description', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('primaryBalanceAccount', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); @@ -541,6 +548,33 @@ public function setLegalEntityId($legalEntityId) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Gets primaryBalanceAccount * @@ -645,7 +679,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php index 962600035..f9def21d4 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php @@ -46,12 +46,12 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria protected static $openAPITypes = [ 'allowed' => 'bool', 'allowedLevel' => 'string', - 'allowedSettings' => '\Adyen\Model\BalancePlatform\JSONObject', + 'allowedSettings' => '\Adyen\Model\BalancePlatform\CapabilitySettings', 'enabled' => 'bool', 'problems' => 'object[]', 'requested' => 'bool', 'requestedLevel' => 'string', - 'requestedSettings' => '\Adyen\Model\BalancePlatform\JSONObject', + 'requestedSettings' => '\Adyen\Model\BalancePlatform\CapabilitySettings', 'transferInstruments' => '\Adyen\Model\BalancePlatform\AccountSupportingEntityCapability[]', 'verificationStatus' => 'string' ]; @@ -487,7 +487,7 @@ public function setAllowedLevel($allowedLevel) /** * Gets allowedSettings * - * @return \Adyen\Model\BalancePlatform\JSONObject|null + * @return \Adyen\Model\BalancePlatform\CapabilitySettings|null */ public function getAllowedSettings() { @@ -497,7 +497,7 @@ public function getAllowedSettings() /** * Sets allowedSettings * - * @param \Adyen\Model\BalancePlatform\JSONObject|null $allowedSettings allowedSettings + * @param \Adyen\Model\BalancePlatform\CapabilitySettings|null $allowedSettings allowedSettings * * @return self */ @@ -632,7 +632,7 @@ public function setRequestedLevel($requestedLevel) /** * Gets requestedSettings * - * @return \Adyen\Model\BalancePlatform\JSONObject|null + * @return \Adyen\Model\BalancePlatform\CapabilitySettings|null */ public function getRequestedSettings() { @@ -642,7 +642,7 @@ public function getRequestedSettings() /** * Sets requestedSettings * - * @param \Adyen\Model\BalancePlatform\JSONObject|null $requestedSettings requestedSettings + * @param \Adyen\Model\BalancePlatform\CapabilitySettings|null $requestedSettings requestedSettings * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php index 045d8d14d..aa8c70c5e 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php @@ -49,6 +49,7 @@ class AccountHolderInfo implements ModelInterface, ArrayAccess, \JsonSerializabl 'contactDetails' => '\Adyen\Model\BalancePlatform\ContactDetails', 'description' => 'string', 'legalEntityId' => 'string', + 'metadata' => 'array', 'reference' => 'string', 'timeZone' => 'string' ]; @@ -66,6 +67,7 @@ class AccountHolderInfo implements ModelInterface, ArrayAccess, \JsonSerializabl 'contactDetails' => null, 'description' => null, 'legalEntityId' => null, + 'metadata' => null, 'reference' => null, 'timeZone' => null ]; @@ -81,6 +83,7 @@ class AccountHolderInfo implements ModelInterface, ArrayAccess, \JsonSerializabl 'contactDetails' => false, 'description' => false, 'legalEntityId' => false, + 'metadata' => false, 'reference' => false, 'timeZone' => false ]; @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool 'contactDetails' => 'contactDetails', 'description' => 'description', 'legalEntityId' => 'legalEntityId', + 'metadata' => 'metadata', 'reference' => 'reference', 'timeZone' => 'timeZone' ]; @@ -191,6 +195,7 @@ public function isNullableSetToNull(string $property): bool 'contactDetails' => 'setContactDetails', 'description' => 'setDescription', 'legalEntityId' => 'setLegalEntityId', + 'metadata' => 'setMetadata', 'reference' => 'setReference', 'timeZone' => 'setTimeZone' ]; @@ -206,6 +211,7 @@ public function isNullableSetToNull(string $property): bool 'contactDetails' => 'getContactDetails', 'description' => 'getDescription', 'legalEntityId' => 'getLegalEntityId', + 'metadata' => 'getMetadata', 'reference' => 'getReference', 'timeZone' => 'getTimeZone' ]; @@ -272,6 +278,7 @@ public function __construct(array $data = null) $this->setIfExists('contactDetails', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('timeZone', $data ?? [], null); } @@ -456,6 +463,33 @@ public function setLegalEntityId($legalEntityId) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Gets reference * @@ -496,7 +530,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index cc5af096c..6bcda02ae 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -49,6 +49,7 @@ class BalanceAccount implements ModelInterface, ArrayAccess, \JsonSerializable 'defaultCurrencyCode' => 'string', 'description' => 'string', 'id' => 'string', + 'metadata' => 'array', 'reference' => 'string', 'status' => 'string', 'timeZone' => 'string' @@ -67,6 +68,7 @@ class BalanceAccount implements ModelInterface, ArrayAccess, \JsonSerializable 'defaultCurrencyCode' => null, 'description' => null, 'id' => null, + 'metadata' => null, 'reference' => null, 'status' => null, 'timeZone' => null @@ -83,6 +85,7 @@ class BalanceAccount implements ModelInterface, ArrayAccess, \JsonSerializable 'defaultCurrencyCode' => false, 'description' => false, 'id' => false, + 'metadata' => false, 'reference' => false, 'status' => false, 'timeZone' => false @@ -179,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', 'id' => 'id', + 'metadata' => 'metadata', 'reference' => 'reference', 'status' => 'status', 'timeZone' => 'timeZone' @@ -195,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', 'id' => 'setId', + 'metadata' => 'setMetadata', 'reference' => 'setReference', 'status' => 'setStatus', 'timeZone' => 'setTimeZone' @@ -211,6 +216,7 @@ public function isNullableSetToNull(string $property): bool 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', 'id' => 'getId', + 'metadata' => 'getMetadata', 'reference' => 'getReference', 'status' => 'getStatus', 'timeZone' => 'getTimeZone' @@ -296,6 +302,7 @@ public function __construct(array $data = null) $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('timeZone', $data ?? [], null); @@ -493,6 +500,33 @@ public function setId($id) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Gets reference * @@ -570,7 +604,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index e2f5eed94..3c0bfc830 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -48,6 +48,7 @@ class BalanceAccountBase implements ModelInterface, ArrayAccess, \JsonSerializab 'defaultCurrencyCode' => 'string', 'description' => 'string', 'id' => 'string', + 'metadata' => 'array', 'reference' => 'string', 'status' => 'string', 'timeZone' => 'string' @@ -65,6 +66,7 @@ class BalanceAccountBase implements ModelInterface, ArrayAccess, \JsonSerializab 'defaultCurrencyCode' => null, 'description' => null, 'id' => null, + 'metadata' => null, 'reference' => null, 'status' => null, 'timeZone' => null @@ -80,6 +82,7 @@ class BalanceAccountBase implements ModelInterface, ArrayAccess, \JsonSerializab 'defaultCurrencyCode' => false, 'description' => false, 'id' => false, + 'metadata' => false, 'reference' => false, 'status' => false, 'timeZone' => false @@ -175,6 +178,7 @@ public function isNullableSetToNull(string $property): bool 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', 'id' => 'id', + 'metadata' => 'metadata', 'reference' => 'reference', 'status' => 'status', 'timeZone' => 'timeZone' @@ -190,6 +194,7 @@ public function isNullableSetToNull(string $property): bool 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', 'id' => 'setId', + 'metadata' => 'setMetadata', 'reference' => 'setReference', 'status' => 'setStatus', 'timeZone' => 'setTimeZone' @@ -205,6 +210,7 @@ public function isNullableSetToNull(string $property): bool 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', 'id' => 'getId', + 'metadata' => 'getMetadata', 'reference' => 'getReference', 'status' => 'getStatus', 'timeZone' => 'getTimeZone' @@ -289,6 +295,7 @@ public function __construct(array $data = null) $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('timeZone', $data ?? [], null); @@ -459,6 +466,33 @@ public function setId($id) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Gets reference * @@ -536,7 +570,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index e89859ba0..222fa639f 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -47,6 +47,7 @@ class BalanceAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializab 'accountHolderId' => 'string', 'defaultCurrencyCode' => 'string', 'description' => 'string', + 'metadata' => 'array', 'reference' => 'string', 'timeZone' => 'string' ]; @@ -62,6 +63,7 @@ class BalanceAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializab 'accountHolderId' => null, 'defaultCurrencyCode' => null, 'description' => null, + 'metadata' => null, 'reference' => null, 'timeZone' => null ]; @@ -75,6 +77,7 @@ class BalanceAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializab 'accountHolderId' => false, 'defaultCurrencyCode' => false, 'description' => false, + 'metadata' => false, 'reference' => false, 'timeZone' => false ]; @@ -168,6 +171,7 @@ public function isNullableSetToNull(string $property): bool 'accountHolderId' => 'accountHolderId', 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', + 'metadata' => 'metadata', 'reference' => 'reference', 'timeZone' => 'timeZone' ]; @@ -181,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'accountHolderId' => 'setAccountHolderId', 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', + 'metadata' => 'setMetadata', 'reference' => 'setReference', 'timeZone' => 'setTimeZone' ]; @@ -194,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'accountHolderId' => 'getAccountHolderId', 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', + 'metadata' => 'getMetadata', 'reference' => 'getReference', 'timeZone' => 'getTimeZone' ]; @@ -258,6 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountHolderId', $data ?? [], null); $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('timeZone', $data ?? [], null); } @@ -388,6 +395,33 @@ public function setDescription($description) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Gets reference * @@ -428,7 +462,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index f047752ca..783e01676 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -47,6 +47,7 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS 'accountHolderId' => 'string', 'defaultCurrencyCode' => 'string', 'description' => 'string', + 'metadata' => 'array', 'reference' => 'string', 'status' => 'string', 'timeZone' => 'string' @@ -63,6 +64,7 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS 'accountHolderId' => null, 'defaultCurrencyCode' => null, 'description' => null, + 'metadata' => null, 'reference' => null, 'status' => null, 'timeZone' => null @@ -77,6 +79,7 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS 'accountHolderId' => false, 'defaultCurrencyCode' => false, 'description' => false, + 'metadata' => false, 'reference' => false, 'status' => false, 'timeZone' => false @@ -171,6 +174,7 @@ public function isNullableSetToNull(string $property): bool 'accountHolderId' => 'accountHolderId', 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', + 'metadata' => 'metadata', 'reference' => 'reference', 'status' => 'status', 'timeZone' => 'timeZone' @@ -185,6 +189,7 @@ public function isNullableSetToNull(string $property): bool 'accountHolderId' => 'setAccountHolderId', 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', + 'metadata' => 'setMetadata', 'reference' => 'setReference', 'status' => 'setStatus', 'timeZone' => 'setTimeZone' @@ -199,6 +204,7 @@ public function isNullableSetToNull(string $property): bool 'accountHolderId' => 'getAccountHolderId', 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', + 'metadata' => 'getMetadata', 'reference' => 'getReference', 'status' => 'getStatus', 'timeZone' => 'getTimeZone' @@ -282,6 +288,7 @@ public function __construct(array $data = null) $this->setIfExists('accountHolderId', $data ?? [], null); $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('timeZone', $data ?? [], null); @@ -419,6 +426,33 @@ public function setDescription($description) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * + * @return self + */ + public function setMetadata($metadata) + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Gets reference * @@ -496,7 +530,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php new file mode 100644 index 000000000..b03b47262 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -0,0 +1,580 @@ + + */ +class CapabilitySettings implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilitySettings'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amountPerIndustry' => 'array', + 'authorizedCardUsers' => 'bool', + 'fundingSource' => 'string[]', + 'interval' => 'string', + 'maxAmount' => '\Adyen\Model\BalancePlatform\Amount' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amountPerIndustry' => null, + 'authorizedCardUsers' => null, + 'fundingSource' => null, + 'interval' => null, + 'maxAmount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amountPerIndustry' => false, + 'authorizedCardUsers' => false, + 'fundingSource' => false, + 'interval' => false, + 'maxAmount' => 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 = [ + 'amountPerIndustry' => 'amountPerIndustry', + 'authorizedCardUsers' => 'authorizedCardUsers', + 'fundingSource' => 'fundingSource', + 'interval' => 'interval', + 'maxAmount' => 'maxAmount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amountPerIndustry' => 'setAmountPerIndustry', + 'authorizedCardUsers' => 'setAuthorizedCardUsers', + 'fundingSource' => 'setFundingSource', + 'interval' => 'setInterval', + 'maxAmount' => 'setMaxAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amountPerIndustry' => 'getAmountPerIndustry', + 'authorizedCardUsers' => 'getAuthorizedCardUsers', + 'fundingSource' => 'getFundingSource', + 'interval' => 'getInterval', + 'maxAmount' => 'getMaxAmount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_PREPAID = 'prepaid'; + public const INTERVAL_DAILY = 'daily'; + public const INTERVAL_MONTHLY = 'monthly'; + public const INTERVAL_WEEKLY = 'weekly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_PREPAID, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIntervalAllowableValues() + { + return [ + self::INTERVAL_DAILY, + self::INTERVAL_MONTHLY, + self::INTERVAL_WEEKLY, + ]; + } + /** + * 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('amountPerIndustry', $data ?? [], null); + $this->setIfExists('authorizedCardUsers', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('interval', $data ?? [], null); + $this->setIfExists('maxAmount', $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->getIntervalAllowableValues(); + if (!is_null($this->container['interval']) && !in_array($this->container['interval'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'interval', must be one of '%s'", + $this->container['interval'], + 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 amountPerIndustry + * + * @return array|null + */ + public function getAmountPerIndustry() + { + return $this->container['amountPerIndustry']; + } + + /** + * Sets amountPerIndustry + * + * @param array|null $amountPerIndustry + * + * @return self + */ + public function setAmountPerIndustry($amountPerIndustry) + { + if (is_null($amountPerIndustry)) { + throw new \InvalidArgumentException('non-nullable amountPerIndustry cannot be null'); + } + $this->container['amountPerIndustry'] = $amountPerIndustry; + + return $this; + } + + /** + * Gets authorizedCardUsers + * + * @return bool|null + */ + public function getAuthorizedCardUsers() + { + return $this->container['authorizedCardUsers']; + } + + /** + * Sets authorizedCardUsers + * + * @param bool|null $authorizedCardUsers + * + * @return self + */ + public function setAuthorizedCardUsers($authorizedCardUsers) + { + if (is_null($authorizedCardUsers)) { + throw new \InvalidArgumentException('non-nullable authorizedCardUsers cannot be null'); + } + $this->container['authorizedCardUsers'] = $authorizedCardUsers; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string[]|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string[]|null $fundingSource + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (array_diff($fundingSource, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'fundingSource', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets interval + * + * @return string|null + */ + public function getInterval() + { + return $this->container['interval']; + } + + /** + * Sets interval + * + * @param string|null $interval + * + * @return self + */ + public function setInterval($interval) + { + if (is_null($interval)) { + throw new \InvalidArgumentException('non-nullable interval cannot be null'); + } + $allowedValues = $this->getIntervalAllowableValues(); + if (!in_array($interval, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'interval', must be one of '%s'", + $interval, + implode("', '", $allowedValues) + ) + ); + } + $this->container['interval'] = $interval; + + return $this; + } + + /** + * Gets maxAmount + * + * @return \Adyen\Model\BalancePlatform\Amount|null + */ + public function getMaxAmount() + { + return $this->container['maxAmount']; + } + + /** + * Sets maxAmount + * + * @param \Adyen\Model\BalancePlatform\Amount|null $maxAmount maxAmount + * + * @return self + */ + public function setMaxAmount($maxAmount) + { + if (is_null($maxAmount)) { + throw new \InvalidArgumentException('non-nullable maxAmount cannot be null'); + } + $this->container['maxAmount'] = $maxAmount; + + 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/CronSweepSchedule.php b/src/Adyen/Model/BalancePlatform/CronSweepSchedule.php index b3cf2631a..c8d27666b 100644 --- a/src/Adyen/Model/BalancePlatform/CronSweepSchedule.php +++ b/src/Adyen/Model/BalancePlatform/CronSweepSchedule.php @@ -355,7 +355,7 @@ public function getType() /** * Sets type * - * @param string|null $type The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`. + * @param string|null $type The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`.If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/Address2.php b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php similarity index 98% rename from src/Adyen/Model/BalancePlatform/Address2.php rename to src/Adyen/Model/BalancePlatform/DeliveryAddress.php index 403ace51b..623dfa472 100644 --- a/src/Adyen/Model/BalancePlatform/Address2.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php @@ -19,7 +19,7 @@ use Adyen\Model\BalancePlatform\ObjectSerializer; /** - * Address2 Class Doc Comment + * DeliveryAddress Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class Address2 implements ModelInterface, ArrayAccess, \JsonSerializable +class DeliveryAddress implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class Address2 implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'Address-2'; + protected static $openAPIModelName = 'DeliveryAddress'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/src/Adyen/Model/BalancePlatform/DeliveryContact.php b/src/Adyen/Model/BalancePlatform/DeliveryContact.php index 845fad5c5..4973f2b86 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryContact.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryContact.php @@ -44,7 +44,7 @@ class DeliveryContact implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'address' => '\Adyen\Model\BalancePlatform\Address2', + 'address' => '\Adyen\Model\BalancePlatform\DeliveryAddress', 'email' => 'string', 'fullPhoneNumber' => 'string', 'name' => '\Adyen\Model\BalancePlatform\Name', @@ -320,7 +320,7 @@ public function valid() /** * Gets address * - * @return \Adyen\Model\BalancePlatform\Address2 + * @return \Adyen\Model\BalancePlatform\DeliveryAddress */ public function getAddress() { @@ -330,7 +330,7 @@ public function getAddress() /** * Sets address * - * @param \Adyen\Model\BalancePlatform\Address2 $address address + * @param \Adyen\Model\BalancePlatform\DeliveryAddress $address address * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php index b01f08808..42057ff3a 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php @@ -287,6 +287,7 @@ public function getModelName() public const STATUS_REASON_OTHER = 'other'; public const STATUS_REASON_STOLEN = 'stolen'; public const STATUS_REASON_SUSPECTED_FRAUD = 'suspectedFraud'; + public const STATUS_REASON_TRANSACTION_RULE = 'transactionRule'; public const TYPE_BANK_ACCOUNT = 'bankAccount'; public const TYPE_CARD = 'card'; @@ -320,6 +321,7 @@ public function getStatusReasonAllowableValues() self::STATUS_REASON_OTHER, self::STATUS_REASON_STOLEN, self::STATUS_REASON_SUSPECTED_FRAUD, + self::STATUS_REASON_TRANSACTION_RULE, ]; } /** @@ -709,7 +711,7 @@ public function getStatusReason() /** * Sets statusReason * - * @param string|null $statusReason The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. + * @param string|null $statusReason The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php index ca670dccd..3932e4e82 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php @@ -275,6 +275,7 @@ public function getModelName() public const STATUS_REASON_OTHER = 'other'; public const STATUS_REASON_STOLEN = 'stolen'; public const STATUS_REASON_SUSPECTED_FRAUD = 'suspectedFraud'; + public const STATUS_REASON_TRANSACTION_RULE = 'transactionRule'; public const TYPE_BANK_ACCOUNT = 'bankAccount'; public const TYPE_CARD = 'card'; @@ -308,6 +309,7 @@ public function getStatusReasonAllowableValues() self::STATUS_REASON_OTHER, self::STATUS_REASON_STOLEN, self::STATUS_REASON_SUSPECTED_FRAUD, + self::STATUS_REASON_TRANSACTION_RULE, ]; } /** @@ -638,7 +640,7 @@ public function getStatusReason() /** * Sets statusReason * - * @param string|null $statusReason The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. + * @param string|null $statusReason The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php index fc43a7ec6..894083084 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php @@ -251,6 +251,7 @@ public function getModelName() public const STATUS_REASON_OTHER = 'other'; public const STATUS_REASON_STOLEN = 'stolen'; public const STATUS_REASON_SUSPECTED_FRAUD = 'suspectedFraud'; + public const STATUS_REASON_TRANSACTION_RULE = 'transactionRule'; /** * Gets allowable values of the enum @@ -282,6 +283,7 @@ public function getStatusReasonAllowableValues() self::STATUS_REASON_OTHER, self::STATUS_REASON_STOLEN, self::STATUS_REASON_SUSPECTED_FRAUD, + self::STATUS_REASON_TRANSACTION_RULE, ]; } /** diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2Schedule.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2Schedule.php index 1480ab75c..da70889aa 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2Schedule.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2Schedule.php @@ -327,7 +327,7 @@ public function getType() /** * Sets type * - * @param string|null $type The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`. + * @param string|null $type The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`.If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/SweepSchedule.php b/src/Adyen/Model/BalancePlatform/SweepSchedule.php index d0aa80403..db9908ba1 100644 --- a/src/Adyen/Model/BalancePlatform/SweepSchedule.php +++ b/src/Adyen/Model/BalancePlatform/SweepSchedule.php @@ -318,7 +318,7 @@ public function getType() /** * Sets type * - * @param string|null $type The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`. + * @param string|null $type The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`.If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php index cd15bced9..15f69aa6b 100644 --- a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php @@ -293,6 +293,7 @@ public function getModelName() public const STATUS_REASON_OTHER = 'other'; public const STATUS_REASON_STOLEN = 'stolen'; public const STATUS_REASON_SUSPECTED_FRAUD = 'suspectedFraud'; + public const STATUS_REASON_TRANSACTION_RULE = 'transactionRule'; public const TYPE_BANK_ACCOUNT = 'bankAccount'; public const TYPE_CARD = 'card'; @@ -326,6 +327,7 @@ public function getStatusReasonAllowableValues() self::STATUS_REASON_OTHER, self::STATUS_REASON_STOLEN, self::STATUS_REASON_SUSPECTED_FRAUD, + self::STATUS_REASON_TRANSACTION_RULE, ]; } /** @@ -743,7 +745,7 @@ public function getStatusReason() /** * Sets statusReason * - * @param string|null $statusReason The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. + * @param string|null $statusReason The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataAirline.php b/src/Adyen/Model/Checkout/AdditionalDataAirline.php index c861f1e63..6b5fa6173 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataAirline.php +++ b/src/Adyen/Model/Checkout/AdditionalDataAirline.php @@ -481,7 +481,7 @@ public function getAirlineAgencyInvoiceNumber() /** * Sets airlineAgencyInvoiceNumber * - * @param string|null $airlineAgencyInvoiceNumber Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 + * @param string|null $airlineAgencyInvoiceNumber The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters * * @return self */ @@ -508,7 +508,7 @@ public function getAirlineAgencyPlanName() /** * Sets airlineAgencyPlanName * - * @param string|null $airlineAgencyPlanName 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 + * @param string|null $airlineAgencyPlanName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -535,7 +535,7 @@ public function getAirlineAirlineCode() /** * Sets airlineAirlineCode * - * @param string|null $airlineAirlineCode [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 + * @param string|null $airlineAirlineCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -562,7 +562,7 @@ public function getAirlineAirlineDesignatorCode() /** * Sets airlineAirlineDesignatorCode * - * @param string|null $airlineAirlineDesignatorCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineAirlineDesignatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -589,7 +589,7 @@ public function getAirlineBoardingFee() /** * Sets airlineBoardingFee * - * @param string|null $airlineBoardingFee Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 + * @param string|null $airlineBoardingFee The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters * * @return self */ @@ -616,7 +616,7 @@ public function getAirlineComputerizedReservationSystem() /** * Sets airlineComputerizedReservationSystem * - * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 + * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters * * @return self */ @@ -643,7 +643,7 @@ public function getAirlineCustomerReferenceNumber() /** * Sets airlineCustomerReferenceNumber * - * @param string|null $airlineCustomerReferenceNumber Reference number; alphanumeric. * minLength: 0 * maxLength: 20 + * @param string|null $airlineCustomerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces * * @return self */ @@ -670,7 +670,7 @@ public function getAirlineDocumentType() /** * Sets airlineDocumentType * - * @param string|null $airlineDocumentType Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 + * @param string|null $airlineDocumentType A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -697,7 +697,7 @@ public function getAirlineFlightDate() /** * Sets airlineFlightDate * - * @param string|null $airlineFlightDate Flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 * maxLength: 16 + * @param string|null $airlineFlightDate The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters * * @return self */ @@ -724,7 +724,7 @@ public function getAirlineLegCarrierCode() /** * Sets airlineLegCarrierCode * - * @param string|null $airlineLegCarrierCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineLegCarrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -751,7 +751,7 @@ public function getAirlineLegClassOfTravel() /** * Sets airlineLegClassOfTravel * - * @param string|null $airlineLegClassOfTravel 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegClassOfTravel A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros * * @return self */ @@ -778,7 +778,7 @@ public function getAirlineLegDateOfTravel() /** * Sets airlineLegDateOfTravel * - * @param string|null $airlineLegDateOfTravel Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 + * @param string|null $airlineLegDateOfTravel Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters * * @return self */ @@ -805,7 +805,7 @@ public function getAirlineLegDepartAirport() /** * Sets airlineLegDepartAirport * - * @param string|null $airlineLegDepartAirport Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDepartAirport The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -832,7 +832,7 @@ public function getAirlineLegDepartTax() /** * Sets airlineLegDepartTax * - * @param string|null $airlineLegDepartTax [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 + * @param string|null $airlineLegDepartTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros * * @return self */ @@ -859,7 +859,7 @@ public function getAirlineLegDestinationCode() /** * Sets airlineLegDestinationCode * - * @param string|null $airlineLegDestinationCode Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDestinationCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -886,7 +886,7 @@ public function getAirlineLegFareBaseCode() /** * Sets airlineLegFareBaseCode * - * @param string|null $airlineLegFareBaseCode [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 + * @param string|null $airlineLegFareBaseCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -913,7 +913,7 @@ public function getAirlineLegFlightNumber() /** * Sets airlineLegFlightNumber * - * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 * maxLength: 5 + * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -940,7 +940,7 @@ public function getAirlineLegStopOverCode() /** * Sets airlineLegStopOverCode * - * @param string|null $airlineLegStopOverCode 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegStopOverCode A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * * @return self */ @@ -967,7 +967,7 @@ public function getAirlinePassengerDateOfBirth() /** * Sets airlinePassengerDateOfBirth * - * @param string|null $airlinePassengerDateOfBirth Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + * @param string|null $airlinePassengerDateOfBirth The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 * * @return self */ @@ -994,7 +994,7 @@ public function getAirlinePassengerFirstName() /** * Sets airlinePassengerFirstName * - * @param string|null $airlinePassengerFirstName Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerFirstName The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1021,7 +1021,7 @@ public function getAirlinePassengerLastName() /** * Sets airlinePassengerLastName * - * @param string|null $airlinePassengerLastName Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerLastName The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1048,7 +1048,7 @@ public function getAirlinePassengerTelephoneNumber() /** * Sets airlinePassengerTelephoneNumber * - * @param string|null $airlinePassengerTelephoneNumber Telephone number of the passenger, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * minLength: 3 * maxLength: 30 + * @param string|null $airlinePassengerTelephoneNumber The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * * @return self */ @@ -1075,7 +1075,7 @@ public function getAirlinePassengerTravellerType() /** * Sets airlinePassengerTravellerType * - * @param string|null $airlinePassengerTravellerType Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 + * @param string|null $airlinePassengerTravellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters * * @return self */ @@ -1102,7 +1102,7 @@ public function getAirlinePassengerName() /** * Sets airlinePassengerName * - * @param string $airlinePassengerName Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 + * @param string $airlinePassengerName The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1129,7 +1129,7 @@ public function getAirlineTicketIssueAddress() /** * Sets airlineTicketIssueAddress * - * @param string|null $airlineTicketIssueAddress Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 + * @param string|null $airlineTicketIssueAddress The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters * * @return self */ @@ -1156,7 +1156,7 @@ public function getAirlineTicketNumber() /** * Sets airlineTicketNumber * - * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 * maxLength: 150 + * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1183,7 +1183,7 @@ public function getAirlineTravelAgencyCode() /** * Sets airlineTravelAgencyCode * - * @param string|null $airlineTravelAgencyCode IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 + * @param string|null $airlineTravelAgencyCode The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1210,7 +1210,7 @@ public function getAirlineTravelAgencyName() /** * Sets airlineTravelAgencyName * - * @param string|null $airlineTravelAgencyName The name of the travel agency. * minLength: 1 * maxLength: 25 + * @param string|null $airlineTravelAgencyName The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php index 29625f501..0882c9d5b 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php @@ -443,7 +443,7 @@ public function getCarRentalCheckOutDate() /** * Sets carRentalCheckOutDate * - * @param string|null $carRentalCheckOutDate Pick-up date. * Date format: `yyyyMMdd` + * @param string|null $carRentalCheckOutDate The pick-up date. * Date format: `yyyyMMdd` * * @return self */ @@ -470,7 +470,7 @@ public function getCarRentalCustomerServiceTollFreeNumber() /** * Sets carRentalCustomerServiceTollFreeNumber * - * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 + * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -497,7 +497,7 @@ public function getCarRentalDaysRented() /** * Sets carRentalDaysRented * - * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 + * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 4 * Must not be all spaces * * @return self */ @@ -524,7 +524,7 @@ public function getCarRentalFuelCharges() /** * Sets carRentalFuelCharges * - * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * * @return self */ @@ -551,7 +551,7 @@ public function getCarRentalInsuranceCharges() /** * Sets carRentalInsuranceCharges * - * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros * * @return self */ @@ -578,7 +578,7 @@ public function getCarRentalLocationCity() /** * Sets carRentalLocationCity * - * @param string|null $carRentalLocationCity The city from which the car is rented. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalLocationCity The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -605,7 +605,7 @@ public function getCarRentalLocationCountry() /** * Sets carRentalLocationCountry * - * @param string|null $carRentalLocationCountry The country from which the car is rented. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalLocationCountry The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -632,7 +632,7 @@ public function getCarRentalLocationStateProvince() /** * Sets carRentalLocationStateProvince * - * @param string|null $carRentalLocationStateProvince The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalLocationStateProvince The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -659,7 +659,7 @@ public function getCarRentalNoShowIndicator() /** * Sets carRentalNoShowIndicator * - * @param string|null $carRentalNoShowIndicator Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. + * @param string|null $carRentalNoShowIndicator Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable * * @return self */ @@ -686,7 +686,7 @@ public function getCarRentalOneWayDropOffCharges() /** * Sets carRentalOneWayDropOffCharges * - * @param string|null $carRentalOneWayDropOffCharges Charge associated with not returning a vehicle to the original rental location. + * @param string|null $carRentalOneWayDropOffCharges The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 * * @return self */ @@ -713,7 +713,7 @@ public function getCarRentalRate() /** * Sets carRentalRate * - * @param string|null $carRentalRate Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRate The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 * * @return self */ @@ -740,7 +740,7 @@ public function getCarRentalRateIndicator() /** * Sets carRentalRateIndicator * - * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. + * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate * * @return self */ @@ -767,7 +767,7 @@ public function getCarRentalRentalAgreementNumber() /** * Sets carRentalRentalAgreementNumber * - * @param string|null $carRentalRentalAgreementNumber The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9 + * @param string|null $carRentalRentalAgreementNumber The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -794,7 +794,7 @@ public function getCarRentalRentalClassId() /** * Sets carRentalRentalClassId * - * @param string|null $carRentalRentalClassId Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -821,7 +821,7 @@ public function getCarRentalRenterName() /** * Sets carRentalRenterName * - * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 + * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -848,7 +848,7 @@ public function getCarRentalReturnCity() /** * Sets carRentalReturnCity * - * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -875,7 +875,7 @@ public function getCarRentalReturnCountry() /** * Sets carRentalReturnCountry * - * @param string|null $carRentalReturnCountry The country where the car must be returned. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalReturnCountry The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -902,7 +902,7 @@ public function getCarRentalReturnDate() /** * Sets carRentalReturnDate * - * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` + * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 * * @return self */ @@ -929,7 +929,7 @@ public function getCarRentalReturnLocationId() /** * Sets carRentalReturnLocationId * - * @param string|null $carRentalReturnLocationId Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 + * @param string|null $carRentalReturnLocationId The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -956,7 +956,7 @@ public function getCarRentalReturnStateProvince() /** * Sets carRentalReturnStateProvince * - * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -983,7 +983,7 @@ public function getCarRentalTaxExemptIndicator() /** * Sets carRentalTaxExemptIndicator * - * @param string|null $carRentalTaxExemptIndicator Indicates whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected + * @param string|null $carRentalTaxExemptIndicator Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected * * @return self */ @@ -1010,7 +1010,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 + * @param string|null $travelEntertainmentAuthDataDuration Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 4 * * @return self */ @@ -1037,7 +1037,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"A\" for Car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index d82c7a0c2..0cd47a510 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -401,7 +401,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataCustomerReference The customer code. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -428,7 +428,7 @@ public function getEnhancedSchemeDataDestinationCountryCode() /** * Sets enhancedSchemeDataDestinationCountryCode * - * @param string|null $enhancedSchemeDataDestinationCountryCode Destination country code. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationCountryCode The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters * * @return self */ @@ -455,7 +455,7 @@ public function getEnhancedSchemeDataDestinationPostalCode() /** * Sets enhancedSchemeDataDestinationPostalCode * - * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. + * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space * * @return self */ @@ -482,7 +482,7 @@ public function getEnhancedSchemeDataDestinationStateProvinceCode() /** * Sets enhancedSchemeDataDestinationStateProvinceCode * - * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII.Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space * * @return self */ @@ -509,7 +509,7 @@ public function getEnhancedSchemeDataDutyAmount() /** * Sets enhancedSchemeDataDutyAmount * - * @param string|null $enhancedSchemeDataDutyAmount Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataDutyAmount The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -536,7 +536,7 @@ public function getEnhancedSchemeDataFreightAmount() /** * Sets enhancedSchemeDataFreightAmount * - * @param string|null $enhancedSchemeDataFreightAmount Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataFreightAmount The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -563,7 +563,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode Item commodity code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -590,7 +590,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDescription() /** * Sets enhancedSchemeDataItemDetailLineItemNrDescription * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription Item description. Encoding: ASCII. Max length: 26 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item. Encoding: ASCII Max length: 26 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -617,7 +617,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrDiscountAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -644,7 +644,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrProductCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrProductCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode Product code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -671,7 +671,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrQuantity() /** * Sets enhancedSchemeDataItemDetailLineItemNrQuantity * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces * * @return self */ @@ -698,7 +698,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrTotalAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrTotalAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -725,7 +725,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure Item unit of measurement. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -752,7 +752,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitPrice() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitPrice * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -779,7 +779,7 @@ public function getEnhancedSchemeDataOrderDate() /** * Sets enhancedSchemeDataOrderDate * - * @param string|null $enhancedSchemeDataOrderDate Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters. + * @param string|null $enhancedSchemeDataOrderDate The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters * * @return self */ @@ -806,7 +806,7 @@ public function getEnhancedSchemeDataShipFromPostalCode() /** * Sets enhancedSchemeDataShipFromPostalCode * - * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. + * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of the address the item is shipped from. Encoding: ASCII Max length: 10 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -833,7 +833,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataLodging.php b/src/Adyen/Model/Checkout/AdditionalDataLodging.php index ab71ad8a9..b30c0a01f 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLodging.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLodging.php @@ -56,7 +56,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => 'string', 'lodgingRoom1NumberOfNights' => 'string', 'lodgingRoom1Rate' => 'string', - 'lodgingRoom1Tax' => 'string', 'lodgingTotalRoomTax' => 'string', 'lodgingTotalTax' => 'string', 'travelEntertainmentAuthDataDuration' => 'string', @@ -83,7 +82,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => null, 'lodgingRoom1NumberOfNights' => null, 'lodgingRoom1Rate' => null, - 'lodgingRoom1Tax' => null, 'lodgingTotalRoomTax' => null, 'lodgingTotalTax' => null, 'travelEntertainmentAuthDataDuration' => null, @@ -108,7 +106,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => false, 'lodgingRoom1NumberOfNights' => false, 'lodgingRoom1Rate' => false, - 'lodgingRoom1Tax' => false, 'lodgingTotalRoomTax' => false, 'lodgingTotalTax' => false, 'travelEntertainmentAuthDataDuration' => false, @@ -213,7 +210,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'lodging.propertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'lodging.room1.numberOfNights', 'lodgingRoom1Rate' => 'lodging.room1.rate', - 'lodgingRoom1Tax' => 'lodging.room1.tax', 'lodgingTotalRoomTax' => 'lodging.totalRoomTax', 'lodgingTotalTax' => 'lodging.totalTax', 'travelEntertainmentAuthDataDuration' => 'travelEntertainmentAuthData.duration', @@ -238,7 +234,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'setLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'setLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'setLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'setLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'setLodgingTotalRoomTax', 'lodgingTotalTax' => 'setLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'setTravelEntertainmentAuthDataDuration', @@ -263,7 +258,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'getLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'getLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'getLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'getLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'getLodgingTotalRoomTax', 'lodgingTotalTax' => 'getLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'getTravelEntertainmentAuthDataDuration', @@ -339,7 +333,6 @@ public function __construct(array $data = null) $this->setIfExists('lodgingPropertyPhoneNumber', $data ?? [], null); $this->setIfExists('lodgingRoom1NumberOfNights', $data ?? [], null); $this->setIfExists('lodgingRoom1Rate', $data ?? [], null); - $this->setIfExists('lodgingRoom1Tax', $data ?? [], null); $this->setIfExists('lodgingTotalRoomTax', $data ?? [], null); $this->setIfExists('lodgingTotalTax', $data ?? [], null); $this->setIfExists('travelEntertainmentAuthDataDuration', $data ?? [], null); @@ -455,7 +448,7 @@ public function getLodgingCustomerServiceTollFreeNumber() /** * Sets lodgingCustomerServiceTollFreeNumber * - * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -482,7 +475,7 @@ public function getLodgingFireSafetyActIndicator() /** * Sets lodgingFireSafetyActIndicator * - * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: 'Y' or 'N'. * Format: alphabetic. * Max length: 1 character. + * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character * * @return self */ @@ -509,7 +502,7 @@ public function getLodgingFolioCashAdvances() /** * Sets lodgingFolioCashAdvances * - * @param string|null $lodgingFolioCashAdvances The folio cash advances. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFolioCashAdvances The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -536,7 +529,7 @@ public function getLodgingFolioNumber() /** * Sets lodgingFolioNumber * - * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Format: alphanumeric. * Max length: 25 characters. + * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros * * @return self */ @@ -563,7 +556,7 @@ public function getLodgingFoodBeverageCharges() /** * Sets lodgingFoodBeverageCharges * - * @param string|null $lodgingFoodBeverageCharges The additional charges for food and beverages associated with the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFoodBeverageCharges Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -590,7 +583,7 @@ public function getLodgingNoShowIndicator() /** * Sets lodgingNoShowIndicator * - * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in. **N**: the customer checked in. + * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in * * @return self */ @@ -617,7 +610,7 @@ public function getLodgingPrepaidExpenses() /** * Sets lodgingPrepaidExpenses * - * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters * * @return self */ @@ -644,7 +637,7 @@ public function getLodgingPropertyPhoneNumber() /** * Sets lodgingPropertyPhoneNumber * - * @param string|null $lodgingPropertyPhoneNumber Identifies the location of the lodging by its local phone number. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -671,7 +664,7 @@ public function getLodgingRoom1NumberOfNights() /** * Sets lodgingRoom1NumberOfNights * - * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric. * Max length: 4 characters. + * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 4 characters * * @return self */ @@ -698,7 +691,7 @@ public function getLodgingRoom1Rate() /** * Sets lodgingRoom1Rate * - * @param string|null $lodgingRoom1Rate The rate of the room. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingRoom1Rate The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -712,33 +705,6 @@ public function setLodgingRoom1Rate($lodgingRoom1Rate) return $this; } - /** - * Gets lodgingRoom1Tax - * - * @return string|null - */ - public function getLodgingRoom1Tax() - { - return $this->container['lodgingRoom1Tax']; - } - - /** - * Sets lodgingRoom1Tax - * - * @param string|null $lodgingRoom1Tax The total amount of tax to be paid. * Format: numeric. * Max length: 12 chracters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * - * @return self - */ - public function setLodgingRoom1Tax($lodgingRoom1Tax) - { - if (is_null($lodgingRoom1Tax)) { - throw new \InvalidArgumentException('non-nullable lodgingRoom1Tax cannot be null'); - } - $this->container['lodgingRoom1Tax'] = $lodgingRoom1Tax; - - return $this; - } - /** * Gets lodgingTotalRoomTax * @@ -752,7 +718,7 @@ public function getLodgingTotalRoomTax() /** * Sets lodgingTotalRoomTax * - * @param string|null $lodgingTotalRoomTax The total room tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalRoomTax The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -779,7 +745,7 @@ public function getLodgingTotalTax() /** * Sets lodgingTotalTax * - * @param string|null $lodgingTotalTax The total tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalTax The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -806,7 +772,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric. * Max length: 2 characters. + * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters * * @return self */ @@ -833,7 +799,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: alphanumeric. * Max length: 1 character. + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php index 63964769d..755c28146 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php @@ -345,7 +345,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 * * @return self */ @@ -372,7 +372,7 @@ public function getEnhancedSchemeDataEmployeeName() /** * Sets enhancedSchemeDataEmployeeName * - * @param string|null $enhancedSchemeDataEmployeeName Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataEmployeeName The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -399,7 +399,7 @@ public function getEnhancedSchemeDataJobDescription() /** * Sets enhancedSchemeDataJobDescription * - * @param string|null $enhancedSchemeDataJobDescription Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataJobDescription The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -426,7 +426,7 @@ public function getEnhancedSchemeDataRegularHoursRate() /** * Sets enhancedSchemeDataRegularHoursRate * - * @param string|null $enhancedSchemeDataRegularHoursRate Amount paid per regular hours worked, minor units. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursRate The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -453,7 +453,7 @@ public function getEnhancedSchemeDataRegularHoursWorked() /** * Sets enhancedSchemeDataRegularHoursWorked * - * @param string|null $enhancedSchemeDataRegularHoursWorked Amount of time worked during a normal operation for the task or job. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursWorked The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -480,7 +480,7 @@ public function getEnhancedSchemeDataRequestName() /** * Sets enhancedSchemeDataRequestName * - * @param string|null $enhancedSchemeDataRequestName Name of the individual requesting temporary services. * maxLength: 40 + * @param string|null $enhancedSchemeDataRequestName The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -507,7 +507,7 @@ public function getEnhancedSchemeDataTempStartDate() /** * Sets enhancedSchemeDataTempStartDate * - * @param string|null $enhancedSchemeDataTempStartDate Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempStartDate The billing period start date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -534,7 +534,7 @@ public function getEnhancedSchemeDataTempWeekEnding() /** * Sets enhancedSchemeDataTempWeekEnding * - * @param string|null $enhancedSchemeDataTempWeekEnding Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempWeekEnding The billing period end date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -561,7 +561,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutBalanceCheckRequest.php b/src/Adyen/Model/Checkout/CheckoutBalanceCheckRequest.php index c376c4c06..bb2903837 100644 --- a/src/Adyen/Model/Checkout/CheckoutBalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/CheckoutBalanceCheckRequest.php @@ -596,6 +596,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -719,7 +722,7 @@ public function setAdditionalData($additionalData) /** * Gets amount * - * @return \Adyen\Model\Checkout\Amount|null + * @return \Adyen\Model\Checkout\Amount */ public function getAmount() { @@ -729,7 +732,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Checkout\Amount|null $amount amount + * @param \Adyen\Model\Checkout\Amount $amount amount * * @return self */ @@ -1690,7 +1693,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php new file mode 100644 index 000000000..3bcfde57b --- /dev/null +++ b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php @@ -0,0 +1,588 @@ + + */ +class CheckoutDelegatedAuthenticationAction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutDelegatedAuthenticationAction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'authorisationToken' => 'string', + 'paymentData' => 'string', + 'paymentMethodType' => 'string', + 'token' => 'string', + 'type' => 'string', + 'url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'authorisationToken' => null, + 'paymentData' => null, + 'paymentMethodType' => null, + 'token' => null, + 'type' => null, + 'url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'authorisationToken' => false, + 'paymentData' => false, + 'paymentMethodType' => false, + 'token' => false, + 'type' => false, + 'url' => 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 = [ + 'authorisationToken' => 'authorisationToken', + 'paymentData' => 'paymentData', + 'paymentMethodType' => 'paymentMethodType', + 'token' => 'token', + 'type' => 'type', + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authorisationToken' => 'setAuthorisationToken', + 'paymentData' => 'setPaymentData', + 'paymentMethodType' => 'setPaymentMethodType', + 'token' => 'setToken', + 'type' => 'setType', + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authorisationToken' => 'getAuthorisationToken', + 'paymentData' => 'getPaymentData', + 'paymentMethodType' => 'getPaymentMethodType', + 'token' => 'getToken', + 'type' => 'getType', + 'url' => 'getUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_DELEGATED_AUTHENTICATION = 'delegatedAuthentication'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DELEGATED_AUTHENTICATION, + ]; + } + /** + * 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('authorisationToken', $data ?? [], null); + $this->setIfExists('paymentData', $data ?? [], null); + $this->setIfExists('paymentMethodType', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets authorisationToken + * + * @return string|null + */ + public function getAuthorisationToken() + { + return $this->container['authorisationToken']; + } + + /** + * Sets authorisationToken + * + * @param string|null $authorisationToken A token needed to authorise a payment. + * + * @return self + */ + public function setAuthorisationToken($authorisationToken) + { + if (is_null($authorisationToken)) { + throw new \InvalidArgumentException('non-nullable authorisationToken cannot be null'); + } + $this->container['authorisationToken'] = $authorisationToken; + + return $this; + } + + /** + * Gets paymentData + * + * @return string|null + */ + public function getPaymentData() + { + return $this->container['paymentData']; + } + + /** + * Sets paymentData + * + * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * + * @return self + */ + public function setPaymentData($paymentData) + { + if (is_null($paymentData)) { + throw new \InvalidArgumentException('non-nullable paymentData cannot be null'); + } + $this->container['paymentData'] = $paymentData; + + return $this; + } + + /** + * Gets paymentMethodType + * + * @return string|null + */ + public function getPaymentMethodType() + { + return $this->container['paymentMethodType']; + } + + /** + * Sets paymentMethodType + * + * @param string|null $paymentMethodType Specifies the payment method. + * + * @return self + */ + public function setPaymentMethodType($paymentMethodType) + { + if (is_null($paymentMethodType)) { + throw new \InvalidArgumentException('non-nullable paymentMethodType cannot be null'); + } + $this->container['paymentMethodType'] = $paymentMethodType; + + return $this; + } + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token A token to pass to the delegatedAuthentication component. + * + * @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; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **delegatedAuthentication** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url Specifies the URL to redirect to. + * + * @return self + */ + public function setUrl($url) + { + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @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/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/CheckoutDonationPaymentRequest.php similarity index 90% rename from src/Adyen/Model/Checkout/PaymentRequest.php rename to src/Adyen/Model/Checkout/CheckoutDonationPaymentRequest.php index c44a03ab9..ffc4b2194 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/CheckoutDonationPaymentRequest.php @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * PaymentRequest Class Doc Comment + * CheckoutDonationPaymentRequest Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable +class CheckoutDonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'PaymentRequest'; + protected static $openAPIModelName = 'CheckoutDonationPaymentRequest'; /** * Array of property to type mappings. Used for (de)serialization @@ -60,14 +60,20 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', + 'deliverAt' => '\DateTime', 'deliveryAddress' => '\Adyen\Model\Checkout\Address', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', + 'donationAccount' => 'string', + 'donationOriginalPspReference' => 'string', + 'donationToken' => 'string', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', 'entityType' => 'string', 'fraudOffset' => 'int', + 'fundOrigin' => '\Adyen\Model\Checkout\FundOrigin', + 'fundRecipient' => '\Adyen\Model\Checkout\FundRecipient', 'industryUsage' => 'string', 'installments' => '\Adyen\Model\Checkout\Installments', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', @@ -105,7 +111,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'store' => 'string', 'storePaymentMethod' => 'bool', 'telephoneNumber' => 'string', - 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData', + 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData2', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -132,16 +138,22 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'company' => null, 'conversionId' => null, 'countryCode' => null, - 'dateOfBirth' => 'date', + 'dateOfBirth' => 'date-time', 'dccQuote' => null, + 'deliverAt' => 'date-time', 'deliveryAddress' => null, 'deliveryDate' => 'date-time', 'deviceFingerprint' => null, + 'donationAccount' => null, + 'donationOriginalPspReference' => null, + 'donationToken' => null, 'enableOneClick' => null, 'enablePayOut' => null, 'enableRecurring' => null, 'entityType' => null, 'fraudOffset' => 'int32', + 'fundOrigin' => null, + 'fundRecipient' => null, 'industryUsage' => null, 'installments' => null, 'lineItems' => null, @@ -206,14 +218,20 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'countryCode' => false, 'dateOfBirth' => false, 'dccQuote' => false, + 'deliverAt' => false, 'deliveryAddress' => false, 'deliveryDate' => false, 'deviceFingerprint' => false, + 'donationAccount' => false, + 'donationOriginalPspReference' => false, + 'donationToken' => false, 'enableOneClick' => false, 'enablePayOut' => false, 'enableRecurring' => false, 'entityType' => false, 'fraudOffset' => true, + 'fundOrigin' => false, + 'fundRecipient' => false, 'industryUsage' => false, 'installments' => false, 'lineItems' => false, @@ -358,14 +376,20 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'countryCode', 'dateOfBirth' => 'dateOfBirth', 'dccQuote' => 'dccQuote', + 'deliverAt' => 'deliverAt', 'deliveryAddress' => 'deliveryAddress', 'deliveryDate' => 'deliveryDate', 'deviceFingerprint' => 'deviceFingerprint', + 'donationAccount' => 'donationAccount', + 'donationOriginalPspReference' => 'donationOriginalPspReference', + 'donationToken' => 'donationToken', 'enableOneClick' => 'enableOneClick', 'enablePayOut' => 'enablePayOut', 'enableRecurring' => 'enableRecurring', 'entityType' => 'entityType', 'fraudOffset' => 'fraudOffset', + 'fundOrigin' => 'fundOrigin', + 'fundRecipient' => 'fundRecipient', 'industryUsage' => 'industryUsage', 'installments' => 'installments', 'lineItems' => 'lineItems', @@ -430,14 +454,20 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'setCountryCode', 'dateOfBirth' => 'setDateOfBirth', 'dccQuote' => 'setDccQuote', + 'deliverAt' => 'setDeliverAt', 'deliveryAddress' => 'setDeliveryAddress', 'deliveryDate' => 'setDeliveryDate', 'deviceFingerprint' => 'setDeviceFingerprint', + 'donationAccount' => 'setDonationAccount', + 'donationOriginalPspReference' => 'setDonationOriginalPspReference', + 'donationToken' => 'setDonationToken', 'enableOneClick' => 'setEnableOneClick', 'enablePayOut' => 'setEnablePayOut', 'enableRecurring' => 'setEnableRecurring', 'entityType' => 'setEntityType', 'fraudOffset' => 'setFraudOffset', + 'fundOrigin' => 'setFundOrigin', + 'fundRecipient' => 'setFundRecipient', 'industryUsage' => 'setIndustryUsage', 'installments' => 'setInstallments', 'lineItems' => 'setLineItems', @@ -502,14 +532,20 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'getCountryCode', 'dateOfBirth' => 'getDateOfBirth', 'dccQuote' => 'getDccQuote', + 'deliverAt' => 'getDeliverAt', 'deliveryAddress' => 'getDeliveryAddress', 'deliveryDate' => 'getDeliveryDate', 'deviceFingerprint' => 'getDeviceFingerprint', + 'donationAccount' => 'getDonationAccount', + 'donationOriginalPspReference' => 'getDonationOriginalPspReference', + 'donationToken' => 'getDonationToken', 'enableOneClick' => 'getEnableOneClick', 'enablePayOut' => 'getEnablePayOut', 'enableRecurring' => 'getEnableRecurring', 'entityType' => 'getEntityType', 'fraudOffset' => 'getFraudOffset', + 'fundOrigin' => 'getFundOrigin', + 'fundRecipient' => 'getFundRecipient', 'industryUsage' => 'getIndustryUsage', 'installments' => 'getInstallments', 'lineItems' => 'getLineItems', @@ -705,14 +741,20 @@ public function __construct(array $data = null) $this->setIfExists('countryCode', $data ?? [], null); $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('dccQuote', $data ?? [], null); + $this->setIfExists('deliverAt', $data ?? [], null); $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('deliveryDate', $data ?? [], null); $this->setIfExists('deviceFingerprint', $data ?? [], null); + $this->setIfExists('donationAccount', $data ?? [], null); + $this->setIfExists('donationOriginalPspReference', $data ?? [], null); + $this->setIfExists('donationToken', $data ?? [], null); $this->setIfExists('enableOneClick', $data ?? [], null); $this->setIfExists('enablePayOut', $data ?? [], null); $this->setIfExists('enableRecurring', $data ?? [], null); $this->setIfExists('entityType', $data ?? [], null); $this->setIfExists('fraudOffset', $data ?? [], null); + $this->setIfExists('fundOrigin', $data ?? [], null); + $this->setIfExists('fundRecipient', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); $this->setIfExists('installments', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); @@ -794,6 +836,9 @@ public function listInvalidProperties() ); } + if ($this->container['donationAccount'] === null) { + $invalidProperties[] = "'donationAccount' can't be null"; + } $allowedValues = $this->getEntityTypeAllowableValues(); if (!is_null($this->container['entityType']) && !in_array($this->container['entityType'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -1299,6 +1344,33 @@ public function setDccQuote($dccQuote) return $this; } + /** + * Gets deliverAt + * + * @return \DateTime|null + */ + public function getDeliverAt() + { + return $this->container['deliverAt']; + } + + /** + * Sets deliverAt + * + * @param \DateTime|null $deliverAt The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + * + * @return self + */ + public function setDeliverAt($deliverAt) + { + if (is_null($deliverAt)) { + throw new \InvalidArgumentException('non-nullable deliverAt cannot be null'); + } + $this->container['deliverAt'] = $deliverAt; + + return $this; + } + /** * Gets deliveryAddress * @@ -1330,6 +1402,7 @@ public function setDeliveryAddress($deliveryAddress) * Gets deliveryDate * * @return \DateTime|null + * @deprecated */ public function getDeliveryDate() { @@ -1342,6 +1415,7 @@ public function getDeliveryDate() * @param \DateTime|null $deliveryDate The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * * @return self + * @deprecated */ public function setDeliveryDate($deliveryDate) { @@ -1380,6 +1454,87 @@ public function setDeviceFingerprint($deviceFingerprint) return $this; } + /** + * Gets donationAccount + * + * @return string + */ + public function getDonationAccount() + { + return $this->container['donationAccount']; + } + + /** + * Sets donationAccount + * + * @param string $donationAccount Donation account to which the transaction is credited. + * + * @return self + */ + public function setDonationAccount($donationAccount) + { + if (is_null($donationAccount)) { + throw new \InvalidArgumentException('non-nullable donationAccount cannot be null'); + } + $this->container['donationAccount'] = $donationAccount; + + return $this; + } + + /** + * Gets donationOriginalPspReference + * + * @return string|null + */ + public function getDonationOriginalPspReference() + { + return $this->container['donationOriginalPspReference']; + } + + /** + * Sets donationOriginalPspReference + * + * @param string|null $donationOriginalPspReference PSP reference of the transaction from which the donation token is generated. Required when `donationToken` is provided. + * + * @return self + */ + public function setDonationOriginalPspReference($donationOriginalPspReference) + { + if (is_null($donationOriginalPspReference)) { + throw new \InvalidArgumentException('non-nullable donationOriginalPspReference cannot be null'); + } + $this->container['donationOriginalPspReference'] = $donationOriginalPspReference; + + return $this; + } + + /** + * Gets donationToken + * + * @return string|null + */ + public function getDonationToken() + { + return $this->container['donationToken']; + } + + /** + * Sets donationToken + * + * @param string|null $donationToken Donation token received in the `/payments` call. + * + * @return self + */ + public function setDonationToken($donationToken) + { + if (is_null($donationToken)) { + throw new \InvalidArgumentException('non-nullable donationToken cannot be null'); + } + $this->container['donationToken'] = $donationToken; + + return $this; + } + /** * Gets enableOneClick * @@ -1523,6 +1678,60 @@ public function setFraudOffset($fraudOffset) return $this; } + /** + * Gets fundOrigin + * + * @return \Adyen\Model\Checkout\FundOrigin|null + */ + public function getFundOrigin() + { + return $this->container['fundOrigin']; + } + + /** + * Sets fundOrigin + * + * @param \Adyen\Model\Checkout\FundOrigin|null $fundOrigin fundOrigin + * + * @return self + */ + public function setFundOrigin($fundOrigin) + { + if (is_null($fundOrigin)) { + throw new \InvalidArgumentException('non-nullable fundOrigin cannot be null'); + } + $this->container['fundOrigin'] = $fundOrigin; + + return $this; + } + + /** + * Gets fundRecipient + * + * @return \Adyen\Model\Checkout\FundRecipient|null + */ + public function getFundRecipient() + { + return $this->container['fundRecipient']; + } + + /** + * Sets fundRecipient + * + * @param \Adyen\Model\Checkout\FundRecipient|null $fundRecipient fundRecipient + * + * @return self + */ + public function setFundRecipient($fundRecipient) + { + if (is_null($fundRecipient)) { + throw new \InvalidArgumentException('non-nullable fundRecipient cannot be null'); + } + $this->container['fundRecipient'] = $fundRecipient; + + return $this; + } + /** * Gets industryUsage * @@ -1600,7 +1809,7 @@ public function getLineItems() /** * Sets lineItems * - * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. + * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. * * @return self */ @@ -1627,7 +1836,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. * * @return self */ @@ -2457,7 +2666,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -2484,7 +2693,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ @@ -2555,7 +2764,7 @@ public function setTelephoneNumber($telephoneNumber) /** * Gets threeDS2RequestData * - * @return \Adyen\Model\Checkout\ThreeDS2RequestData|null + * @return \Adyen\Model\Checkout\ThreeDS2RequestData2|null */ public function getThreeDS2RequestData() { @@ -2565,7 +2774,7 @@ public function getThreeDS2RequestData() /** * Sets threeDS2RequestData * - * @param \Adyen\Model\Checkout\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * @param \Adyen\Model\Checkout\ThreeDS2RequestData2|null $threeDS2RequestData threeDS2RequestData * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index dc20e68d8..45101359a 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -83,7 +83,9 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'googlePayToken' => 'string', 'masterpassTransactionId' => 'string', 'orderID' => 'string', + 'payeePreferred' => 'string', 'payerID' => 'string', + 'payerSelected' => 'string', 'subtype' => 'string', 'virtualPaymentAddress' => 'string', 'samsungPayToken' => 'string', @@ -141,7 +143,9 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'googlePayToken' => null, 'masterpassTransactionId' => null, 'orderID' => null, + 'payeePreferred' => null, 'payerID' => null, + 'payerSelected' => null, 'subtype' => null, 'virtualPaymentAddress' => null, 'samsungPayToken' => null, @@ -197,7 +201,9 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'googlePayToken' => false, 'masterpassTransactionId' => false, 'orderID' => false, + 'payeePreferred' => false, 'payerID' => false, + 'payerSelected' => false, 'subtype' => false, 'virtualPaymentAddress' => false, 'samsungPayToken' => false, @@ -333,7 +339,9 @@ public function isNullableSetToNull(string $property): bool 'googlePayToken' => 'googlePayToken', 'masterpassTransactionId' => 'masterpassTransactionId', 'orderID' => 'orderID', + 'payeePreferred' => 'payeePreferred', 'payerID' => 'payerID', + 'payerSelected' => 'payerSelected', 'subtype' => 'subtype', 'virtualPaymentAddress' => 'virtualPaymentAddress', 'samsungPayToken' => 'samsungPayToken', @@ -389,7 +397,9 @@ public function isNullableSetToNull(string $property): bool 'googlePayToken' => 'setGooglePayToken', 'masterpassTransactionId' => 'setMasterpassTransactionId', 'orderID' => 'setOrderID', + 'payeePreferred' => 'setPayeePreferred', 'payerID' => 'setPayerID', + 'payerSelected' => 'setPayerSelected', 'subtype' => 'setSubtype', 'virtualPaymentAddress' => 'setVirtualPaymentAddress', 'samsungPayToken' => 'setSamsungPayToken', @@ -445,7 +455,9 @@ public function isNullableSetToNull(string $property): bool 'googlePayToken' => 'getGooglePayToken', 'masterpassTransactionId' => 'getMasterpassTransactionId', 'orderID' => 'getOrderID', + 'payeePreferred' => 'getPayeePreferred', 'payerID' => 'getPayerID', + 'payerSelected' => 'getPayerSelected', 'subtype' => 'getSubtype', 'virtualPaymentAddress' => 'getVirtualPaymentAddress', 'samsungPayToken' => 'getSamsungPayToken', @@ -551,7 +563,9 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); $this->setIfExists('orderID', $data ?? [], null); + $this->setIfExists('payeePreferred', $data ?? [], null); $this->setIfExists('payerID', $data ?? [], null); + $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); @@ -1683,6 +1697,33 @@ public function setOrderID($orderID) return $this; } + /** + * Gets payeePreferred + * + * @return string|null + */ + public function getPayeePreferred() + { + return $this->container['payeePreferred']; + } + + /** + * Sets payeePreferred + * + * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * + * @return self + */ + public function setPayeePreferred($payeePreferred) + { + if (is_null($payeePreferred)) { + throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + } + $this->container['payeePreferred'] = $payeePreferred; + + return $this; + } + /** * Gets payerID * @@ -1710,6 +1751,33 @@ public function setPayerID($payerID) return $this; } + /** + * Gets payerSelected + * + * @return string|null + */ + public function getPayerSelected() + { + return $this->container['payerSelected']; + } + + /** + * Sets payerSelected + * + * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * + * @return self + */ + public function setPayerSelected($payerSelected) + { + if (is_null($payerSelected)) { + throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + } + $this->container['payerSelected'] = $payerSelected; + + return $this; + } + /** * Gets subtype * diff --git a/src/Adyen/Model/Checkout/PaymentDonationRequest.php b/src/Adyen/Model/Checkout/CheckoutPaymentRequest.php similarity index 94% rename from src/Adyen/Model/Checkout/PaymentDonationRequest.php rename to src/Adyen/Model/Checkout/CheckoutPaymentRequest.php index a3e24c144..4921406c6 100644 --- a/src/Adyen/Model/Checkout/PaymentDonationRequest.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentRequest.php @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * PaymentDonationRequest Class Doc Comment + * CheckoutPaymentRequest Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +class CheckoutPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial * * @var string */ - protected static $openAPIModelName = 'PaymentDonationRequest'; + protected static $openAPIModelName = 'CheckoutPaymentRequest'; /** * Array of property to type mappings. Used for (de)serialization @@ -60,17 +60,17 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', + 'deliverAt' => '\DateTime', 'deliveryAddress' => '\Adyen\Model\Checkout\Address', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', - 'donationAccount' => 'string', - 'donationOriginalPspReference' => 'string', - 'donationToken' => 'string', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', 'entityType' => 'string', 'fraudOffset' => 'int', + 'fundOrigin' => '\Adyen\Model\Checkout\FundOrigin', + 'fundRecipient' => '\Adyen\Model\Checkout\FundRecipient', 'industryUsage' => 'string', 'installments' => '\Adyen\Model\Checkout\Installments', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', @@ -108,7 +108,7 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'store' => 'string', 'storePaymentMethod' => 'bool', 'telephoneNumber' => 'string', - 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData', + 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData2', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -135,19 +135,19 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'company' => null, 'conversionId' => null, 'countryCode' => null, - 'dateOfBirth' => 'date', + 'dateOfBirth' => 'date-time', 'dccQuote' => null, + 'deliverAt' => 'date-time', 'deliveryAddress' => null, 'deliveryDate' => 'date-time', 'deviceFingerprint' => null, - 'donationAccount' => null, - 'donationOriginalPspReference' => null, - 'donationToken' => null, 'enableOneClick' => null, 'enablePayOut' => null, 'enableRecurring' => null, 'entityType' => null, 'fraudOffset' => 'int32', + 'fundOrigin' => null, + 'fundRecipient' => null, 'industryUsage' => null, 'installments' => null, 'lineItems' => null, @@ -212,17 +212,17 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'countryCode' => false, 'dateOfBirth' => false, 'dccQuote' => false, + 'deliverAt' => false, 'deliveryAddress' => false, 'deliveryDate' => false, 'deviceFingerprint' => false, - 'donationAccount' => false, - 'donationOriginalPspReference' => false, - 'donationToken' => false, 'enableOneClick' => false, 'enablePayOut' => false, 'enableRecurring' => false, 'entityType' => false, 'fraudOffset' => true, + 'fundOrigin' => false, + 'fundRecipient' => false, 'industryUsage' => false, 'installments' => false, 'lineItems' => false, @@ -367,17 +367,17 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'countryCode', 'dateOfBirth' => 'dateOfBirth', 'dccQuote' => 'dccQuote', + 'deliverAt' => 'deliverAt', 'deliveryAddress' => 'deliveryAddress', 'deliveryDate' => 'deliveryDate', 'deviceFingerprint' => 'deviceFingerprint', - 'donationAccount' => 'donationAccount', - 'donationOriginalPspReference' => 'donationOriginalPspReference', - 'donationToken' => 'donationToken', 'enableOneClick' => 'enableOneClick', 'enablePayOut' => 'enablePayOut', 'enableRecurring' => 'enableRecurring', 'entityType' => 'entityType', 'fraudOffset' => 'fraudOffset', + 'fundOrigin' => 'fundOrigin', + 'fundRecipient' => 'fundRecipient', 'industryUsage' => 'industryUsage', 'installments' => 'installments', 'lineItems' => 'lineItems', @@ -442,17 +442,17 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'setCountryCode', 'dateOfBirth' => 'setDateOfBirth', 'dccQuote' => 'setDccQuote', + 'deliverAt' => 'setDeliverAt', 'deliveryAddress' => 'setDeliveryAddress', 'deliveryDate' => 'setDeliveryDate', 'deviceFingerprint' => 'setDeviceFingerprint', - 'donationAccount' => 'setDonationAccount', - 'donationOriginalPspReference' => 'setDonationOriginalPspReference', - 'donationToken' => 'setDonationToken', 'enableOneClick' => 'setEnableOneClick', 'enablePayOut' => 'setEnablePayOut', 'enableRecurring' => 'setEnableRecurring', 'entityType' => 'setEntityType', 'fraudOffset' => 'setFraudOffset', + 'fundOrigin' => 'setFundOrigin', + 'fundRecipient' => 'setFundRecipient', 'industryUsage' => 'setIndustryUsage', 'installments' => 'setInstallments', 'lineItems' => 'setLineItems', @@ -517,17 +517,17 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'getCountryCode', 'dateOfBirth' => 'getDateOfBirth', 'dccQuote' => 'getDccQuote', + 'deliverAt' => 'getDeliverAt', 'deliveryAddress' => 'getDeliveryAddress', 'deliveryDate' => 'getDeliveryDate', 'deviceFingerprint' => 'getDeviceFingerprint', - 'donationAccount' => 'getDonationAccount', - 'donationOriginalPspReference' => 'getDonationOriginalPspReference', - 'donationToken' => 'getDonationToken', 'enableOneClick' => 'getEnableOneClick', 'enablePayOut' => 'getEnablePayOut', 'enableRecurring' => 'getEnableRecurring', 'entityType' => 'getEntityType', 'fraudOffset' => 'getFraudOffset', + 'fundOrigin' => 'getFundOrigin', + 'fundRecipient' => 'getFundRecipient', 'industryUsage' => 'getIndustryUsage', 'installments' => 'getInstallments', 'lineItems' => 'getLineItems', @@ -723,17 +723,17 @@ public function __construct(array $data = null) $this->setIfExists('countryCode', $data ?? [], null); $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('dccQuote', $data ?? [], null); + $this->setIfExists('deliverAt', $data ?? [], null); $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('deliveryDate', $data ?? [], null); $this->setIfExists('deviceFingerprint', $data ?? [], null); - $this->setIfExists('donationAccount', $data ?? [], null); - $this->setIfExists('donationOriginalPspReference', $data ?? [], null); - $this->setIfExists('donationToken', $data ?? [], null); $this->setIfExists('enableOneClick', $data ?? [], null); $this->setIfExists('enablePayOut', $data ?? [], null); $this->setIfExists('enableRecurring', $data ?? [], null); $this->setIfExists('entityType', $data ?? [], null); $this->setIfExists('fraudOffset', $data ?? [], null); + $this->setIfExists('fundOrigin', $data ?? [], null); + $this->setIfExists('fundRecipient', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); $this->setIfExists('installments', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); @@ -815,9 +815,6 @@ public function listInvalidProperties() ); } - if ($this->container['donationAccount'] === null) { - $invalidProperties[] = "'donationAccount' can't be null"; - } $allowedValues = $this->getEntityTypeAllowableValues(); if (!is_null($this->container['entityType']) && !in_array($this->container['entityType'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -1323,6 +1320,33 @@ public function setDccQuote($dccQuote) return $this; } + /** + * Gets deliverAt + * + * @return \DateTime|null + */ + public function getDeliverAt() + { + return $this->container['deliverAt']; + } + + /** + * Sets deliverAt + * + * @param \DateTime|null $deliverAt The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + * + * @return self + */ + public function setDeliverAt($deliverAt) + { + if (is_null($deliverAt)) { + throw new \InvalidArgumentException('non-nullable deliverAt cannot be null'); + } + $this->container['deliverAt'] = $deliverAt; + + return $this; + } + /** * Gets deliveryAddress * @@ -1354,6 +1378,7 @@ public function setDeliveryAddress($deliveryAddress) * Gets deliveryDate * * @return \DateTime|null + * @deprecated */ public function getDeliveryDate() { @@ -1366,6 +1391,7 @@ public function getDeliveryDate() * @param \DateTime|null $deliveryDate The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * * @return self + * @deprecated */ public function setDeliveryDate($deliveryDate) { @@ -1404,87 +1430,6 @@ public function setDeviceFingerprint($deviceFingerprint) return $this; } - /** - * Gets donationAccount - * - * @return string - */ - public function getDonationAccount() - { - return $this->container['donationAccount']; - } - - /** - * Sets donationAccount - * - * @param string $donationAccount Donation account to which the transaction is credited. - * - * @return self - */ - public function setDonationAccount($donationAccount) - { - if (is_null($donationAccount)) { - throw new \InvalidArgumentException('non-nullable donationAccount cannot be null'); - } - $this->container['donationAccount'] = $donationAccount; - - return $this; - } - - /** - * Gets donationOriginalPspReference - * - * @return string|null - */ - public function getDonationOriginalPspReference() - { - return $this->container['donationOriginalPspReference']; - } - - /** - * Sets donationOriginalPspReference - * - * @param string|null $donationOriginalPspReference PSP reference of the transaction from which the donation token is generated. Required when `donationToken` is provided. - * - * @return self - */ - public function setDonationOriginalPspReference($donationOriginalPspReference) - { - if (is_null($donationOriginalPspReference)) { - throw new \InvalidArgumentException('non-nullable donationOriginalPspReference cannot be null'); - } - $this->container['donationOriginalPspReference'] = $donationOriginalPspReference; - - return $this; - } - - /** - * Gets donationToken - * - * @return string|null - */ - public function getDonationToken() - { - return $this->container['donationToken']; - } - - /** - * Sets donationToken - * - * @param string|null $donationToken Donation token received in the `/payments` call. - * - * @return self - */ - public function setDonationToken($donationToken) - { - if (is_null($donationToken)) { - throw new \InvalidArgumentException('non-nullable donationToken cannot be null'); - } - $this->container['donationToken'] = $donationToken; - - return $this; - } - /** * Gets enableOneClick * @@ -1628,6 +1573,60 @@ public function setFraudOffset($fraudOffset) return $this; } + /** + * Gets fundOrigin + * + * @return \Adyen\Model\Checkout\FundOrigin|null + */ + public function getFundOrigin() + { + return $this->container['fundOrigin']; + } + + /** + * Sets fundOrigin + * + * @param \Adyen\Model\Checkout\FundOrigin|null $fundOrigin fundOrigin + * + * @return self + */ + public function setFundOrigin($fundOrigin) + { + if (is_null($fundOrigin)) { + throw new \InvalidArgumentException('non-nullable fundOrigin cannot be null'); + } + $this->container['fundOrigin'] = $fundOrigin; + + return $this; + } + + /** + * Gets fundRecipient + * + * @return \Adyen\Model\Checkout\FundRecipient|null + */ + public function getFundRecipient() + { + return $this->container['fundRecipient']; + } + + /** + * Sets fundRecipient + * + * @param \Adyen\Model\Checkout\FundRecipient|null $fundRecipient fundRecipient + * + * @return self + */ + public function setFundRecipient($fundRecipient) + { + if (is_null($fundRecipient)) { + throw new \InvalidArgumentException('non-nullable fundRecipient cannot be null'); + } + $this->container['fundRecipient'] = $fundRecipient; + + return $this; + } + /** * Gets industryUsage * @@ -1705,7 +1704,7 @@ public function getLineItems() /** * Sets lineItems * - * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. + * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. * * @return self */ @@ -1732,7 +1731,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. * * @return self */ @@ -2562,7 +2561,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -2589,7 +2588,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ @@ -2660,7 +2659,7 @@ public function setTelephoneNumber($telephoneNumber) /** * Gets threeDS2RequestData * - * @return \Adyen\Model\Checkout\ThreeDS2RequestData|null + * @return \Adyen\Model\Checkout\ThreeDS2RequestData2|null */ public function getThreeDS2RequestData() { @@ -2670,7 +2669,7 @@ public function getThreeDS2RequestData() /** * Sets threeDS2RequestData * - * @param \Adyen\Model\Checkout\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * @param \Adyen\Model\Checkout\ThreeDS2RequestData2|null $threeDS2RequestData threeDS2RequestData * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php index ca27ce65f..82ef44eff 100644 --- a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php +++ b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php @@ -55,6 +55,7 @@ class CheckoutVoucherAction implements ModelInterface, ArrayAccess, \JsonSeriali 'maskedTelephoneNumber' => 'string', 'merchantName' => 'string', 'merchantReference' => 'string', + 'passCreationToken' => 'string', 'paymentData' => 'string', 'paymentMethodType' => 'string', 'reference' => 'string', @@ -85,6 +86,7 @@ class CheckoutVoucherAction implements ModelInterface, ArrayAccess, \JsonSeriali 'maskedTelephoneNumber' => null, 'merchantName' => null, 'merchantReference' => null, + 'passCreationToken' => null, 'paymentData' => null, 'paymentMethodType' => null, 'reference' => null, @@ -113,6 +115,7 @@ class CheckoutVoucherAction implements ModelInterface, ArrayAccess, \JsonSeriali 'maskedTelephoneNumber' => false, 'merchantName' => false, 'merchantReference' => false, + 'passCreationToken' => false, 'paymentData' => false, 'paymentMethodType' => false, 'reference' => false, @@ -221,6 +224,7 @@ public function isNullableSetToNull(string $property): bool 'maskedTelephoneNumber' => 'maskedTelephoneNumber', 'merchantName' => 'merchantName', 'merchantReference' => 'merchantReference', + 'passCreationToken' => 'passCreationToken', 'paymentData' => 'paymentData', 'paymentMethodType' => 'paymentMethodType', 'reference' => 'reference', @@ -249,6 +253,7 @@ public function isNullableSetToNull(string $property): bool 'maskedTelephoneNumber' => 'setMaskedTelephoneNumber', 'merchantName' => 'setMerchantName', 'merchantReference' => 'setMerchantReference', + 'passCreationToken' => 'setPassCreationToken', 'paymentData' => 'setPaymentData', 'paymentMethodType' => 'setPaymentMethodType', 'reference' => 'setReference', @@ -277,6 +282,7 @@ public function isNullableSetToNull(string $property): bool 'maskedTelephoneNumber' => 'getMaskedTelephoneNumber', 'merchantName' => 'getMerchantName', 'merchantReference' => 'getMerchantReference', + 'passCreationToken' => 'getPassCreationToken', 'paymentData' => 'getPaymentData', 'paymentMethodType' => 'getPaymentMethodType', 'reference' => 'getReference', @@ -368,6 +374,7 @@ public function __construct(array $data = null) $this->setIfExists('maskedTelephoneNumber', $data ?? [], null); $this->setIfExists('merchantName', $data ?? [], null); $this->setIfExists('merchantReference', $data ?? [], null); + $this->setIfExists('passCreationToken', $data ?? [], null); $this->setIfExists('paymentData', $data ?? [], null); $this->setIfExists('paymentMethodType', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); @@ -730,6 +737,33 @@ public function setMerchantReference($merchantReference) return $this; } + /** + * Gets passCreationToken + * + * @return string|null + */ + public function getPassCreationToken() + { + return $this->container['passCreationToken']; + } + + /** + * Sets passCreationToken + * + * @param string|null $passCreationToken A base64 encoded signature of all properties + * + * @return self + */ + public function setPassCreationToken($passCreationToken) + { + if (is_null($passCreationToken)) { + throw new \InvalidArgumentException('non-nullable passCreationToken cannot be null'); + } + $this->container['passCreationToken'] = $passCreationToken; + + return $this; + } + /** * Gets paymentData * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index 7a1d26a5a..faaa4cc9b 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -74,6 +74,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'merchantOrderReference' => 'string', 'metadata' => 'array', 'mpiData' => '\Adyen\Model\Checkout\ThreeDSecureData', + 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', 'recurringProcessingModel' => 'string', @@ -138,6 +139,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'merchantOrderReference' => null, 'metadata' => null, 'mpiData' => null, + 'platformChargebackLogic' => null, 'recurringExpiry' => null, 'recurringFrequency' => null, 'recurringProcessingModel' => null, @@ -200,6 +202,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'merchantOrderReference' => false, 'metadata' => false, 'mpiData' => false, + 'platformChargebackLogic' => false, 'recurringExpiry' => false, 'recurringFrequency' => false, 'recurringProcessingModel' => false, @@ -342,6 +345,7 @@ public function isNullableSetToNull(string $property): bool 'merchantOrderReference' => 'merchantOrderReference', 'metadata' => 'metadata', 'mpiData' => 'mpiData', + 'platformChargebackLogic' => 'platformChargebackLogic', 'recurringExpiry' => 'recurringExpiry', 'recurringFrequency' => 'recurringFrequency', 'recurringProcessingModel' => 'recurringProcessingModel', @@ -404,6 +408,7 @@ public function isNullableSetToNull(string $property): bool 'merchantOrderReference' => 'setMerchantOrderReference', 'metadata' => 'setMetadata', 'mpiData' => 'setMpiData', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', 'recurringExpiry' => 'setRecurringExpiry', 'recurringFrequency' => 'setRecurringFrequency', 'recurringProcessingModel' => 'setRecurringProcessingModel', @@ -466,6 +471,7 @@ public function isNullableSetToNull(string $property): bool 'merchantOrderReference' => 'getMerchantOrderReference', 'metadata' => 'getMetadata', 'mpiData' => 'getMpiData', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', 'recurringExpiry' => 'getRecurringExpiry', 'recurringFrequency' => 'getRecurringFrequency', 'recurringProcessingModel' => 'getRecurringProcessingModel', @@ -645,6 +651,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); $this->setIfExists('recurringFrequency', $data ?? [], null); $this->setIfExists('recurringProcessingModel', $data ?? [], null); @@ -1579,6 +1586,33 @@ public function setMpiData($mpiData) return $this; } + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Checkout\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Checkout\PlatformChargebackLogic|null $platformChargebackLogic platformChargebackLogic + * + * @return self + */ + public function setPlatformChargebackLogic($platformChargebackLogic) + { + if (is_null($platformChargebackLogic)) { + throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); + } + $this->container['platformChargebackLogic'] = $platformChargebackLogic; + + return $this; + } + /** * Gets recurringExpiry * @@ -2071,7 +2105,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -2098,7 +2132,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index aa0708b4a..b41bbdd2d 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -76,6 +76,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'metadata' => 'array', 'mode' => 'string', 'mpiData' => '\Adyen\Model\Checkout\ThreeDSecureData', + 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', 'recurringProcessingModel' => 'string', @@ -143,6 +144,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'metadata' => null, 'mode' => null, 'mpiData' => null, + 'platformChargebackLogic' => null, 'recurringExpiry' => null, 'recurringFrequency' => null, 'recurringProcessingModel' => null, @@ -208,6 +210,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'metadata' => false, 'mode' => false, 'mpiData' => false, + 'platformChargebackLogic' => false, 'recurringExpiry' => false, 'recurringFrequency' => false, 'recurringProcessingModel' => false, @@ -353,6 +356,7 @@ public function isNullableSetToNull(string $property): bool 'metadata' => 'metadata', 'mode' => 'mode', 'mpiData' => 'mpiData', + 'platformChargebackLogic' => 'platformChargebackLogic', 'recurringExpiry' => 'recurringExpiry', 'recurringFrequency' => 'recurringFrequency', 'recurringProcessingModel' => 'recurringProcessingModel', @@ -418,6 +422,7 @@ public function isNullableSetToNull(string $property): bool 'metadata' => 'setMetadata', 'mode' => 'setMode', 'mpiData' => 'setMpiData', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', 'recurringExpiry' => 'setRecurringExpiry', 'recurringFrequency' => 'setRecurringFrequency', 'recurringProcessingModel' => 'setRecurringProcessingModel', @@ -483,6 +488,7 @@ public function isNullableSetToNull(string $property): bool 'metadata' => 'getMetadata', 'mode' => 'getMode', 'mpiData' => 'getMpiData', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', 'recurringExpiry' => 'getRecurringExpiry', 'recurringFrequency' => 'getRecurringFrequency', 'recurringProcessingModel' => 'getRecurringProcessingModel', @@ -679,6 +685,7 @@ public function __construct(array $data = null) $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('mode', $data ?? [], 'embedded'); $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); $this->setIfExists('recurringFrequency', $data ?? [], null); $this->setIfExists('recurringProcessingModel', $data ?? [], null); @@ -1693,6 +1700,33 @@ public function setMpiData($mpiData) return $this; } + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Checkout\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Checkout\PlatformChargebackLogic|null $platformChargebackLogic platformChargebackLogic + * + * @return self + */ + public function setPlatformChargebackLogic($platformChargebackLogic) + { + if (is_null($platformChargebackLogic)) { + throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); + } + $this->container['platformChargebackLogic'] = $platformChargebackLogic; + + return $this; + } + /** * Gets recurringExpiry * @@ -2212,7 +2246,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -2239,7 +2273,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreatePaymentAmountUpdateRequest.php b/src/Adyen/Model/Checkout/CreatePaymentAmountUpdateRequest.php index 69b6d0f7b..d15adb33b 100644 --- a/src/Adyen/Model/Checkout/CreatePaymentAmountUpdateRequest.php +++ b/src/Adyen/Model/Checkout/CreatePaymentAmountUpdateRequest.php @@ -46,6 +46,7 @@ class CreatePaymentAmountUpdateRequest implements ModelInterface, ArrayAccess, \ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', 'industryUsage' => 'string', + 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'reference' => 'string', 'splits' => '\Adyen\Model\Checkout\Split[]' @@ -61,6 +62,7 @@ class CreatePaymentAmountUpdateRequest implements ModelInterface, ArrayAccess, \ protected static $openAPIFormats = [ 'amount' => null, 'industryUsage' => null, + 'lineItems' => null, 'merchantAccount' => null, 'reference' => null, 'splits' => null @@ -74,6 +76,7 @@ class CreatePaymentAmountUpdateRequest implements ModelInterface, ArrayAccess, \ protected static $openAPINullables = [ 'amount' => false, 'industryUsage' => false, + 'lineItems' => false, 'merchantAccount' => false, 'reference' => false, 'splits' => false @@ -167,6 +170,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'amount' => 'amount', 'industryUsage' => 'industryUsage', + 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'reference' => 'reference', 'splits' => 'splits' @@ -180,6 +184,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'amount' => 'setAmount', 'industryUsage' => 'setIndustryUsage', + 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'reference' => 'setReference', 'splits' => 'setSplits' @@ -193,6 +198,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'amount' => 'getAmount', 'industryUsage' => 'getIndustryUsage', + 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'reference' => 'getReference', 'splits' => 'getSplits' @@ -273,6 +279,7 @@ public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); + $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); @@ -399,6 +406,33 @@ public function setIndustryUsage($industryUsage) return $this; } + /** + * Gets lineItems + * + * @return \Adyen\Model\Checkout\LineItem[]|null + */ + public function getLineItems() + { + return $this->container['lineItems']; + } + + /** + * Sets lineItems + * + * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. + * + * @return self + */ + public function setLineItems($lineItems) + { + if (is_null($lineItems)) { + throw new \InvalidArgumentException('non-nullable lineItems cannot be null'); + } + $this->container['lineItems'] = $lineItems; + + return $this; + } + /** * Gets merchantAccount * diff --git a/src/Adyen/Model/Checkout/CreatePaymentCaptureRequest.php b/src/Adyen/Model/Checkout/CreatePaymentCaptureRequest.php index e08d7f77b..b9bc929f8 100644 --- a/src/Adyen/Model/Checkout/CreatePaymentCaptureRequest.php +++ b/src/Adyen/Model/Checkout/CreatePaymentCaptureRequest.php @@ -47,8 +47,10 @@ class CreatePaymentCaptureRequest implements ModelInterface, ArrayAccess, \JsonS 'amount' => '\Adyen\Model\Checkout\Amount', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'reference' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]' + 'splits' => '\Adyen\Model\Checkout\Split[]', + 'subMerchants' => '\Adyen\Model\Checkout\SubMerchant2[]' ]; /** @@ -62,8 +64,10 @@ class CreatePaymentCaptureRequest implements ModelInterface, ArrayAccess, \JsonS 'amount' => null, 'lineItems' => null, 'merchantAccount' => null, + 'platformChargebackLogic' => null, 'reference' => null, - 'splits' => null + 'splits' => null, + 'subMerchants' => null ]; /** @@ -75,8 +79,10 @@ class CreatePaymentCaptureRequest implements ModelInterface, ArrayAccess, \JsonS 'amount' => false, 'lineItems' => false, 'merchantAccount' => false, + 'platformChargebackLogic' => false, 'reference' => false, - 'splits' => false + 'splits' => false, + 'subMerchants' => false ]; /** @@ -168,8 +174,10 @@ public function isNullableSetToNull(string $property): bool 'amount' => 'amount', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', + 'platformChargebackLogic' => 'platformChargebackLogic', 'reference' => 'reference', - 'splits' => 'splits' + 'splits' => 'splits', + 'subMerchants' => 'subMerchants' ]; /** @@ -181,8 +189,10 @@ public function isNullableSetToNull(string $property): bool 'amount' => 'setAmount', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', 'reference' => 'setReference', - 'splits' => 'setSplits' + 'splits' => 'setSplits', + 'subMerchants' => 'setSubMerchants' ]; /** @@ -194,8 +204,10 @@ public function isNullableSetToNull(string $property): bool 'amount' => 'getAmount', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', 'reference' => 'getReference', - 'splits' => 'getSplits' + 'splits' => 'getSplits', + 'subMerchants' => 'getSubMerchants' ]; /** @@ -258,8 +270,10 @@ public function __construct(array $data = null) $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('subMerchants', $data ?? [], null); } /** @@ -391,6 +405,33 @@ public function setMerchantAccount($merchantAccount) return $this; } + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Checkout\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Checkout\PlatformChargebackLogic|null $platformChargebackLogic platformChargebackLogic + * + * @return self + */ + public function setPlatformChargebackLogic($platformChargebackLogic) + { + if (is_null($platformChargebackLogic)) { + throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); + } + $this->container['platformChargebackLogic'] = $platformChargebackLogic; + + return $this; + } + /** * Gets reference * @@ -444,6 +485,33 @@ public function setSplits($splits) return $this; } + + /** + * Gets subMerchants + * + * @return \Adyen\Model\Checkout\SubMerchant2[]|null + */ + public function getSubMerchants() + { + return $this->container['subMerchants']; + } + + /** + * Sets subMerchants + * + * @param \Adyen\Model\Checkout\SubMerchant2[]|null $subMerchants A List of sub-merchants. + * + * @return self + */ + public function setSubMerchants($subMerchants) + { + if (is_null($subMerchants)) { + throw new \InvalidArgumentException('non-nullable subMerchants cannot be null'); + } + $this->container['subMerchants'] = $subMerchants; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php b/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php index f4903be6b..3c9278b98 100644 --- a/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php @@ -922,7 +922,7 @@ public function getExpiresAt() /** * Sets expiresAt * - * @param string|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. + * @param string|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created.This value is represented in Zulu format which is utilized for API v70 and lower. * * @return self */ @@ -1138,7 +1138,7 @@ public function getRecurringProcessingModel() /** * Sets recurringProcessingModel * - * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. * * @return self */ @@ -1535,7 +1535,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -1589,7 +1589,7 @@ public function getStorePaymentMethodMode() /** * Sets storePaymentMethodMode * - * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. + * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. * * @return self */ diff --git a/src/Adyen/Model/Checkout/LineItem.php b/src/Adyen/Model/Checkout/LineItem.php index a417a2af6..cfc4c450d 100644 --- a/src/Adyen/Model/Checkout/LineItem.php +++ b/src/Adyen/Model/Checkout/LineItem.php @@ -590,7 +590,7 @@ public function getItemCategory() /** * Sets itemCategory * - * @param string|null $itemCategory Item category, used by the RatePay payment method. + * @param string|null $itemCategory Item category, used by the payment methods PayPal and Ratepay. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index 62ef54b82..80fc9504c 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -46,7 +46,9 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'orderID' => 'string', + 'payeePreferred' => 'string', 'payerID' => 'string', + 'payerSelected' => 'string', 'recurringDetailReference' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', @@ -63,7 +65,9 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'orderID' => null, + 'payeePreferred' => null, 'payerID' => null, + 'payerSelected' => null, 'recurringDetailReference' => null, 'storedPaymentMethodId' => null, 'subtype' => null, @@ -78,7 +82,9 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'orderID' => false, + 'payeePreferred' => false, 'payerID' => false, + 'payerSelected' => false, 'recurringDetailReference' => false, 'storedPaymentMethodId' => false, 'subtype' => false, @@ -173,7 +179,9 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'orderID' => 'orderID', + 'payeePreferred' => 'payeePreferred', 'payerID' => 'payerID', + 'payerSelected' => 'payerSelected', 'recurringDetailReference' => 'recurringDetailReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', @@ -188,7 +196,9 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'orderID' => 'setOrderID', + 'payeePreferred' => 'setPayeePreferred', 'payerID' => 'setPayerID', + 'payerSelected' => 'setPayerSelected', 'recurringDetailReference' => 'setRecurringDetailReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', @@ -203,7 +213,9 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'orderID' => 'getOrderID', + 'payeePreferred' => 'getPayeePreferred', 'payerID' => 'getPayerID', + 'payerSelected' => 'getPayerSelected', 'recurringDetailReference' => 'getRecurringDetailReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', @@ -295,7 +307,9 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('orderID', $data ?? [], null); + $this->setIfExists('payeePreferred', $data ?? [], null); $this->setIfExists('payerID', $data ?? [], null); + $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); @@ -419,6 +433,33 @@ public function setOrderID($orderID) return $this; } + /** + * Gets payeePreferred + * + * @return string|null + */ + public function getPayeePreferred() + { + return $this->container['payeePreferred']; + } + + /** + * Sets payeePreferred + * + * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * + * @return self + */ + public function setPayeePreferred($payeePreferred) + { + if (is_null($payeePreferred)) { + throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + } + $this->container['payeePreferred'] = $payeePreferred; + + return $this; + } + /** * Gets payerID * @@ -446,6 +487,33 @@ public function setPayerID($payerID) return $this; } + /** + * Gets payerSelected + * + * @return string|null + */ + public function getPayerSelected() + { + return $this->container['payerSelected']; + } + + /** + * Sets payerSelected + * + * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * + * @return self + */ + public function setPayerSelected($payerSelected) + { + if (is_null($payerSelected)) { + throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + } + $this->container['payerSelected'] = $payerSelected; + + return $this; + } + /** * Gets recurringDetailReference * diff --git a/src/Adyen/Model/Checkout/PaymentCaptureResource.php b/src/Adyen/Model/Checkout/PaymentCaptureResource.php index fae15ea79..8e1136e0e 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureResource.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureResource.php @@ -48,10 +48,12 @@ class PaymentCaptureResource implements ModelInterface, ArrayAccess, \JsonSerial 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'paymentPspReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'pspReference' => 'string', 'reference' => 'string', 'splits' => '\Adyen\Model\Checkout\Split[]', - 'status' => 'string' + 'status' => 'string', + 'subMerchants' => '\Adyen\Model\Checkout\SubMerchant2[]' ]; /** @@ -66,10 +68,12 @@ class PaymentCaptureResource implements ModelInterface, ArrayAccess, \JsonSerial 'lineItems' => null, 'merchantAccount' => null, 'paymentPspReference' => null, + 'platformChargebackLogic' => null, 'pspReference' => null, 'reference' => null, 'splits' => null, - 'status' => null + 'status' => null, + 'subMerchants' => null ]; /** @@ -82,10 +86,12 @@ class PaymentCaptureResource implements ModelInterface, ArrayAccess, \JsonSerial 'lineItems' => false, 'merchantAccount' => false, 'paymentPspReference' => false, + 'platformChargebackLogic' => false, 'pspReference' => false, 'reference' => false, 'splits' => false, - 'status' => false + 'status' => false, + 'subMerchants' => false ]; /** @@ -178,10 +184,12 @@ public function isNullableSetToNull(string $property): bool 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'paymentPspReference' => 'paymentPspReference', + 'platformChargebackLogic' => 'platformChargebackLogic', 'pspReference' => 'pspReference', 'reference' => 'reference', 'splits' => 'splits', - 'status' => 'status' + 'status' => 'status', + 'subMerchants' => 'subMerchants' ]; /** @@ -194,10 +202,12 @@ public function isNullableSetToNull(string $property): bool 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'paymentPspReference' => 'setPaymentPspReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', 'pspReference' => 'setPspReference', 'reference' => 'setReference', 'splits' => 'setSplits', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'subMerchants' => 'setSubMerchants' ]; /** @@ -210,10 +220,12 @@ public function isNullableSetToNull(string $property): bool 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'paymentPspReference' => 'getPaymentPspReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', 'pspReference' => 'getPspReference', 'reference' => 'getReference', 'splits' => 'getSplits', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'subMerchants' => 'getSubMerchants' ]; /** @@ -289,10 +301,12 @@ public function __construct(array $data = null) $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('paymentPspReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('pspReference', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('subMerchants', $data ?? [], null); } /** @@ -469,6 +483,33 @@ public function setPaymentPspReference($paymentPspReference) return $this; } + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Checkout\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Checkout\PlatformChargebackLogic|null $platformChargebackLogic platformChargebackLogic + * + * @return self + */ + public function setPlatformChargebackLogic($platformChargebackLogic) + { + if (is_null($platformChargebackLogic)) { + throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); + } + $this->container['platformChargebackLogic'] = $platformChargebackLogic; + + return $this; + } + /** * Gets pspReference * @@ -586,6 +627,33 @@ public function setStatus($status) return $this; } + + /** + * Gets subMerchants + * + * @return \Adyen\Model\Checkout\SubMerchant2[]|null + */ + public function getSubMerchants() + { + return $this->container['subMerchants']; + } + + /** + * Sets subMerchants + * + * @param \Adyen\Model\Checkout\SubMerchant2[]|null $subMerchants List of sub-merchants. + * + * @return self + */ + public function setSubMerchants($subMerchants) + { + if (is_null($subMerchants)) { + throw new \InvalidArgumentException('non-nullable subMerchants cannot be null'); + } + $this->container['subMerchants'] = $subMerchants; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php index d4244533c..756ca783f 100644 --- a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php +++ b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php @@ -47,6 +47,7 @@ class PaymentCompletionDetails implements ModelInterface, ArrayAccess, \JsonSeri 'mD' => 'string', 'paReq' => 'string', 'paRes' => 'string', + 'authorizationToken' => 'string', 'billingToken' => 'string', 'cupsecureplusSmscode' => 'string', 'facilitatorAccessToken' => 'string', @@ -74,6 +75,7 @@ class PaymentCompletionDetails implements ModelInterface, ArrayAccess, \JsonSeri 'mD' => null, 'paReq' => null, 'paRes' => null, + 'authorizationToken' => null, 'billingToken' => null, 'cupsecureplusSmscode' => null, 'facilitatorAccessToken' => null, @@ -99,6 +101,7 @@ class PaymentCompletionDetails implements ModelInterface, ArrayAccess, \JsonSeri 'mD' => false, 'paReq' => false, 'paRes' => false, + 'authorizationToken' => false, 'billingToken' => false, 'cupsecureplusSmscode' => false, 'facilitatorAccessToken' => false, @@ -204,6 +207,7 @@ public function isNullableSetToNull(string $property): bool 'mD' => 'MD', 'paReq' => 'PaReq', 'paRes' => 'PaRes', + 'authorizationToken' => 'authorization_token', 'billingToken' => 'billingToken', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'facilitatorAccessToken' => 'facilitatorAccessToken', @@ -229,6 +233,7 @@ public function isNullableSetToNull(string $property): bool 'mD' => 'setMD', 'paReq' => 'setPaReq', 'paRes' => 'setPaRes', + 'authorizationToken' => 'setAuthorizationToken', 'billingToken' => 'setBillingToken', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'facilitatorAccessToken' => 'setFacilitatorAccessToken', @@ -254,6 +259,7 @@ public function isNullableSetToNull(string $property): bool 'mD' => 'getMD', 'paReq' => 'getPaReq', 'paRes' => 'getPaRes', + 'authorizationToken' => 'getAuthorizationToken', 'billingToken' => 'getBillingToken', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'facilitatorAccessToken' => 'getFacilitatorAccessToken', @@ -330,6 +336,7 @@ public function __construct(array $data = null) $this->setIfExists('mD', $data ?? [], null); $this->setIfExists('paReq', $data ?? [], null); $this->setIfExists('paRes', $data ?? [], null); + $this->setIfExists('authorizationToken', $data ?? [], null); $this->setIfExists('billingToken', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('facilitatorAccessToken', $data ?? [], null); @@ -469,6 +476,33 @@ public function setPaRes($paRes) return $this; } + /** + * Gets authorizationToken + * + * @return string|null + */ + public function getAuthorizationToken() + { + return $this->container['authorizationToken']; + } + + /** + * Sets authorizationToken + * + * @param string|null $authorizationToken authorizationToken + * + * @return self + */ + public function setAuthorizationToken($authorizationToken) + { + if (is_null($authorizationToken)) { + throw new \InvalidArgumentException('non-nullable authorizationToken cannot be null'); + } + $this->container['authorizationToken'] = $authorizationToken; + + return $this; + } + /** * Gets billingToken * diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 8e421b5fb..aafa58ece 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -256,17 +256,15 @@ public function getModelName() public const TYPE_MOLPAY_EBANKING_MY = 'molpay_ebanking_MY'; public const TYPE_MOLPAY_EBANKING_DIRECT_MY = 'molpay_ebanking_direct_MY'; public const TYPE_SWISH = 'swish'; + public const TYPE_PIX = 'pix'; public const TYPE_WALLEY = 'walley'; public const TYPE_WALLEY_B2B = 'walley_b2b'; - public const TYPE_PIX = 'pix'; - public const TYPE_BIZUM = 'bizum'; public const TYPE_ALMA = 'alma'; public const TYPE_MOLPAY_FPX = 'molpay_fpx'; public const TYPE_KONBINI = 'konbini'; public const TYPE_DIRECT_EBANKING = 'directEbanking'; public const TYPE_BOLETOBANCARIO = 'boletobancario'; public const TYPE_NETELLER = 'neteller'; - public const TYPE_DANA = 'dana'; public const TYPE_PAYSAFECARD = 'paysafecard'; public const TYPE_CASHTICKET = 'cashticket'; public const TYPE_IKANO = 'ikano'; @@ -305,6 +303,7 @@ public function getModelName() public const TYPE_MAYBANK2U_MAE = 'maybank2u_mae'; public const TYPE_DUITNOW = 'duitnow'; public const TYPE_PROMPTPAY = 'promptpay'; + public const TYPE_TWINT_POS = 'twint_pos'; public const TYPE_ALIPAY_HK = 'alipay_hk'; public const TYPE_ALIPAY_HK_WEB = 'alipay_hk_web'; public const TYPE_ALIPAY_HK_WAP = 'alipay_hk_wap'; @@ -354,17 +353,15 @@ public function getTypeAllowableValues() self::TYPE_MOLPAY_EBANKING_MY, self::TYPE_MOLPAY_EBANKING_DIRECT_MY, self::TYPE_SWISH, + self::TYPE_PIX, self::TYPE_WALLEY, self::TYPE_WALLEY_B2B, - self::TYPE_PIX, - self::TYPE_BIZUM, self::TYPE_ALMA, self::TYPE_MOLPAY_FPX, self::TYPE_KONBINI, self::TYPE_DIRECT_EBANKING, self::TYPE_BOLETOBANCARIO, self::TYPE_NETELLER, - self::TYPE_DANA, self::TYPE_PAYSAFECARD, self::TYPE_CASHTICKET, self::TYPE_IKANO, @@ -403,6 +400,7 @@ public function getTypeAllowableValues() self::TYPE_MAYBANK2U_MAE, self::TYPE_DUITNOW, self::TYPE_PROMPTPAY, + self::TYPE_TWINT_POS, self::TYPE_ALIPAY_HK, self::TYPE_ALIPAY_HK_WEB, self::TYPE_ALIPAY_HK_WAP, diff --git a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php index 034b09c3e..2ff71b86e 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php @@ -306,6 +306,7 @@ public function getModelName() public const RESULT_CODE_CHALLENGE_SHOPPER = 'ChallengeShopper'; public const RESULT_CODE_ERROR = 'Error'; public const RESULT_CODE_IDENTIFY_SHOPPER = 'IdentifyShopper'; + public const RESULT_CODE_PARTIALLY_AUTHORISED = 'PartiallyAuthorised'; public const RESULT_CODE_PENDING = 'Pending'; public const RESULT_CODE_PRESENT_TO_SHOPPER = 'PresentToShopper'; public const RESULT_CODE_RECEIVED = 'Received'; @@ -328,6 +329,7 @@ public function getResultCodeAllowableValues() self::RESULT_CODE_CHALLENGE_SHOPPER, self::RESULT_CODE_ERROR, self::RESULT_CODE_IDENTIFY_SHOPPER, + self::RESULT_CODE_PARTIALLY_AUTHORISED, self::RESULT_CODE_PENDING, self::RESULT_CODE_PRESENT_TO_SHOPPER, self::RESULT_CODE_RECEIVED, @@ -702,7 +704,7 @@ public function getResultCode() /** * Sets resultCode * - * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index fab47d450..73ee3f29a 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -988,7 +988,7 @@ public function getExpiresAt() /** * Sets expiresAt * - * @param string|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. + * @param string|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created.This value is represented in Zulu format which is utilized for API v70 and lower. * * @return self */ @@ -1231,7 +1231,7 @@ public function getRecurringProcessingModel() /** * Sets recurringProcessingModel * - * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. * * @return self */ @@ -1628,7 +1628,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -1719,7 +1719,7 @@ public function getStorePaymentMethodMode() /** * Sets storePaymentMethodMode * - * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. + * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index f2e3f4dde..eae4ce236 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -701,7 +701,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentResponse.php b/src/Adyen/Model/Checkout/PaymentResponse.php index 7ff34ff71..298294231 100644 --- a/src/Adyen/Model/Checkout/PaymentResponse.php +++ b/src/Adyen/Model/Checkout/PaymentResponse.php @@ -306,6 +306,7 @@ public function getModelName() public const RESULT_CODE_CHALLENGE_SHOPPER = 'ChallengeShopper'; public const RESULT_CODE_ERROR = 'Error'; public const RESULT_CODE_IDENTIFY_SHOPPER = 'IdentifyShopper'; + public const RESULT_CODE_PARTIALLY_AUTHORISED = 'PartiallyAuthorised'; public const RESULT_CODE_PENDING = 'Pending'; public const RESULT_CODE_PRESENT_TO_SHOPPER = 'PresentToShopper'; public const RESULT_CODE_RECEIVED = 'Received'; @@ -328,6 +329,7 @@ public function getResultCodeAllowableValues() self::RESULT_CODE_CHALLENGE_SHOPPER, self::RESULT_CODE_ERROR, self::RESULT_CODE_IDENTIFY_SHOPPER, + self::RESULT_CODE_PARTIALLY_AUTHORISED, self::RESULT_CODE_PENDING, self::RESULT_CODE_PRESENT_TO_SHOPPER, self::RESULT_CODE_RECEIVED, @@ -729,7 +731,7 @@ public function getResultCode() /** * Sets resultCode * - * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index 6c7402fa2..f5684dd44 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -49,15 +49,15 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentMethodType' => 'string', 'type' => 'string', 'url' => 'string', + 'authorisationToken' => 'string', + 'token' => 'string', 'data' => 'array', 'method' => 'string', 'nativeRedirectData' => 'string', 'expiresAt' => 'string', 'qrCodeData' => 'string', 'sdkData' => 'array', - 'authorisationToken' => 'string', 'subtype' => 'string', - 'token' => 'string', 'alternativeReference' => 'string', 'collectionInstitutionNumber' => 'string', 'downloadUrl' => 'string', @@ -68,6 +68,7 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'maskedTelephoneNumber' => 'string', 'merchantName' => 'string', 'merchantReference' => 'string', + 'passCreationToken' => 'string', 'reference' => 'string', 'shopperEmail' => 'string', 'shopperName' => 'string', @@ -87,15 +88,15 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentMethodType' => null, 'type' => null, 'url' => null, + 'authorisationToken' => null, + 'token' => null, 'data' => null, 'method' => null, 'nativeRedirectData' => null, 'expiresAt' => null, 'qrCodeData' => null, 'sdkData' => null, - 'authorisationToken' => null, 'subtype' => null, - 'token' => null, 'alternativeReference' => null, 'collectionInstitutionNumber' => null, 'downloadUrl' => null, @@ -106,6 +107,7 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'maskedTelephoneNumber' => null, 'merchantName' => null, 'merchantReference' => null, + 'passCreationToken' => null, 'reference' => null, 'shopperEmail' => null, 'shopperName' => null, @@ -123,15 +125,15 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentMethodType' => false, 'type' => false, 'url' => false, + 'authorisationToken' => false, + 'token' => false, 'data' => false, 'method' => false, 'nativeRedirectData' => false, 'expiresAt' => false, 'qrCodeData' => false, 'sdkData' => false, - 'authorisationToken' => false, 'subtype' => false, - 'token' => false, 'alternativeReference' => false, 'collectionInstitutionNumber' => false, 'downloadUrl' => false, @@ -142,6 +144,7 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'maskedTelephoneNumber' => false, 'merchantName' => false, 'merchantReference' => false, + 'passCreationToken' => false, 'reference' => false, 'shopperEmail' => false, 'shopperName' => false, @@ -239,15 +242,15 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodType' => 'paymentMethodType', 'type' => 'type', 'url' => 'url', + 'authorisationToken' => 'authorisationToken', + 'token' => 'token', 'data' => 'data', 'method' => 'method', 'nativeRedirectData' => 'nativeRedirectData', 'expiresAt' => 'expiresAt', 'qrCodeData' => 'qrCodeData', 'sdkData' => 'sdkData', - 'authorisationToken' => 'authorisationToken', 'subtype' => 'subtype', - 'token' => 'token', 'alternativeReference' => 'alternativeReference', 'collectionInstitutionNumber' => 'collectionInstitutionNumber', 'downloadUrl' => 'downloadUrl', @@ -258,6 +261,7 @@ public function isNullableSetToNull(string $property): bool 'maskedTelephoneNumber' => 'maskedTelephoneNumber', 'merchantName' => 'merchantName', 'merchantReference' => 'merchantReference', + 'passCreationToken' => 'passCreationToken', 'reference' => 'reference', 'shopperEmail' => 'shopperEmail', 'shopperName' => 'shopperName', @@ -275,15 +279,15 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodType' => 'setPaymentMethodType', 'type' => 'setType', 'url' => 'setUrl', + 'authorisationToken' => 'setAuthorisationToken', + 'token' => 'setToken', 'data' => 'setData', 'method' => 'setMethod', 'nativeRedirectData' => 'setNativeRedirectData', 'expiresAt' => 'setExpiresAt', 'qrCodeData' => 'setQrCodeData', 'sdkData' => 'setSdkData', - 'authorisationToken' => 'setAuthorisationToken', 'subtype' => 'setSubtype', - 'token' => 'setToken', 'alternativeReference' => 'setAlternativeReference', 'collectionInstitutionNumber' => 'setCollectionInstitutionNumber', 'downloadUrl' => 'setDownloadUrl', @@ -294,6 +298,7 @@ public function isNullableSetToNull(string $property): bool 'maskedTelephoneNumber' => 'setMaskedTelephoneNumber', 'merchantName' => 'setMerchantName', 'merchantReference' => 'setMerchantReference', + 'passCreationToken' => 'setPassCreationToken', 'reference' => 'setReference', 'shopperEmail' => 'setShopperEmail', 'shopperName' => 'setShopperName', @@ -311,15 +316,15 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodType' => 'getPaymentMethodType', 'type' => 'getType', 'url' => 'getUrl', + 'authorisationToken' => 'getAuthorisationToken', + 'token' => 'getToken', 'data' => 'getData', 'method' => 'getMethod', 'nativeRedirectData' => 'getNativeRedirectData', 'expiresAt' => 'getExpiresAt', 'qrCodeData' => 'getQrCodeData', 'sdkData' => 'getSdkData', - 'authorisationToken' => 'getAuthorisationToken', 'subtype' => 'getSubtype', - 'token' => 'getToken', 'alternativeReference' => 'getAlternativeReference', 'collectionInstitutionNumber' => 'getCollectionInstitutionNumber', 'downloadUrl' => 'getDownloadUrl', @@ -330,6 +335,7 @@ public function isNullableSetToNull(string $property): bool 'maskedTelephoneNumber' => 'getMaskedTelephoneNumber', 'merchantName' => 'getMerchantName', 'merchantReference' => 'getMerchantReference', + 'passCreationToken' => 'getPassCreationToken', 'reference' => 'getReference', 'shopperEmail' => 'getShopperEmail', 'shopperName' => 'getShopperName', @@ -397,15 +403,15 @@ public function __construct(array $data = null) $this->setIfExists('paymentMethodType', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('authorisationToken', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); $this->setIfExists('data', $data ?? [], null); $this->setIfExists('method', $data ?? [], null); $this->setIfExists('nativeRedirectData', $data ?? [], null); $this->setIfExists('expiresAt', $data ?? [], null); $this->setIfExists('qrCodeData', $data ?? [], null); $this->setIfExists('sdkData', $data ?? [], null); - $this->setIfExists('authorisationToken', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('token', $data ?? [], null); $this->setIfExists('alternativeReference', $data ?? [], null); $this->setIfExists('collectionInstitutionNumber', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); @@ -416,6 +422,7 @@ public function __construct(array $data = null) $this->setIfExists('maskedTelephoneNumber', $data ?? [], null); $this->setIfExists('merchantName', $data ?? [], null); $this->setIfExists('merchantReference', $data ?? [], null); + $this->setIfExists('passCreationToken', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('shopperName', $data ?? [], null); @@ -577,6 +584,60 @@ public function setUrl($url) return $this; } + /** + * Gets authorisationToken + * + * @return string|null + */ + public function getAuthorisationToken() + { + return $this->container['authorisationToken']; + } + + /** + * Sets authorisationToken + * + * @param string|null $authorisationToken A token needed to authorise a payment. + * + * @return self + */ + public function setAuthorisationToken($authorisationToken) + { + if (is_null($authorisationToken)) { + throw new \InvalidArgumentException('non-nullable authorisationToken cannot be null'); + } + $this->container['authorisationToken'] = $authorisationToken; + + return $this; + } + + /** + * Gets token + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string|null $token A token to pass to the 3DS2 Component to get the fingerprint. + * + * @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; + } + /** * Gets data * @@ -739,33 +800,6 @@ public function setSdkData($sdkData) return $this; } - /** - * Gets authorisationToken - * - * @return string|null - */ - public function getAuthorisationToken() - { - return $this->container['authorisationToken']; - } - - /** - * Sets authorisationToken - * - * @param string|null $authorisationToken A token needed to authorise a payment. - * - * @return self - */ - public function setAuthorisationToken($authorisationToken) - { - if (is_null($authorisationToken)) { - throw new \InvalidArgumentException('non-nullable authorisationToken cannot be null'); - } - $this->container['authorisationToken'] = $authorisationToken; - - return $this; - } - /** * Gets subtype * @@ -793,33 +827,6 @@ public function setSubtype($subtype) return $this; } - /** - * Gets token - * - * @return string|null - */ - public function getToken() - { - return $this->container['token']; - } - - /** - * Sets token - * - * @param string|null $token A token to pass to the 3DS2 Component to get the fingerprint. - * - * @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; - } - /** * Gets alternativeReference * @@ -1090,6 +1097,33 @@ public function setMerchantReference($merchantReference) return $this; } + /** + * Gets passCreationToken + * + * @return string|null + */ + public function getPassCreationToken() + { + return $this->container['passCreationToken']; + } + + /** + * Sets passCreationToken + * + * @param string|null $passCreationToken A base64 encoded signature of all properties + * + * @return self + */ + public function setPassCreationToken($passCreationToken) + { + if (is_null($passCreationToken)) { + throw new \InvalidArgumentException('non-nullable passCreationToken cannot be null'); + } + $this->container['passCreationToken'] = $passCreationToken; + + return $this; + } + /** * Gets reference * diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index 69fcd0520..ff447481c 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -2142,7 +2142,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php index 61d4217de..7c79c54ee 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php @@ -276,6 +276,7 @@ public function getModelName() public const RESULT_CODE_CHALLENGE_SHOPPER = 'ChallengeShopper'; public const RESULT_CODE_ERROR = 'Error'; public const RESULT_CODE_IDENTIFY_SHOPPER = 'IdentifyShopper'; + public const RESULT_CODE_PARTIALLY_AUTHORISED = 'PartiallyAuthorised'; public const RESULT_CODE_PENDING = 'Pending'; public const RESULT_CODE_PRESENT_TO_SHOPPER = 'PresentToShopper'; public const RESULT_CODE_RECEIVED = 'Received'; @@ -298,6 +299,7 @@ public function getResultCodeAllowableValues() self::RESULT_CODE_CHALLENGE_SHOPPER, self::RESULT_CODE_ERROR, self::RESULT_CODE_IDENTIFY_SHOPPER, + self::RESULT_CODE_PARTIALLY_AUTHORISED, self::RESULT_CODE_PENDING, self::RESULT_CODE_PRESENT_TO_SHOPPER, self::RESULT_CODE_RECEIVED, @@ -592,7 +594,7 @@ public function getResultCode() /** * Sets resultCode * - * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php index 9d20289df..7d77e96e4 100644 --- a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php @@ -328,7 +328,7 @@ public function getBehavior() /** * Sets behavior * - * @param string|null $behavior behavior + * @param string|null $behavior The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. * * @return self */ @@ -365,7 +365,7 @@ public function getCostAllocationAccount() /** * Sets costAllocationAccount * - * @param string|null $costAllocationAccount costAllocationAccount + * @param string|null $costAllocationAccount The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account. * * @return self */ @@ -392,7 +392,7 @@ public function getTargetAccount() /** * Sets targetAccount * - * @param string|null $targetAccount targetAccount + * @param string|null $targetAccount The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**. * * @return self */ diff --git a/src/Adyen/Model/Checkout/SessionResultResponse.php b/src/Adyen/Model/Checkout/SessionResultResponse.php new file mode 100644 index 000000000..58ab652a1 --- /dev/null +++ b/src/Adyen/Model/Checkout/SessionResultResponse.php @@ -0,0 +1,459 @@ + + */ +class SessionResultResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SessionResultResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'id' => 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 = [ + 'id' => 'id', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + '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_ACTIVE = 'active'; + public const STATUS_CANCELED = 'canceled'; + public const STATUS_COMPLETED = 'completed'; + public const STATUS_EXPIRED = 'expired'; + public const STATUS_PAYMENT_PENDING = 'paymentPending'; + public const STATUS_REFUSED = 'refused'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_CANCELED, + self::STATUS_COMPLETED, + self::STATUS_EXPIRED, + self::STATUS_PAYMENT_PENDING, + self::STATUS_REFUSED, + ]; + } + /** + * 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('id', $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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id A unique identifier of the session. + * + * @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 status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed** – The shopper completed the payment. This means that the payment was authorized. * **paymentPending** – The shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow. * **refused** – The session has been refused, due to too many refused payment attempts. Shoppers can no longer complete the payment with this session. * **canceled** – The shopper canceled the payment. * **active** – The session is still active and can be paid. * **expired** – The session expired (default: 1 hour after session creation). Shoppers can no longer complete the payment with this session. + * + * @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/Checkout/Split.php b/src/Adyen/Model/Checkout/Split.php index a68bfbd2d..e4026614a 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -244,6 +244,12 @@ public function getModelName() public const TYPE__DEFAULT = 'Default'; public const TYPE_MARKET_PLACE = 'MarketPlace'; public const TYPE_PAYMENT_FEE = 'PaymentFee'; + public const TYPE_PAYMENT_FEE_ACQUIRING = 'PaymentFeeAcquiring'; + public const TYPE_PAYMENT_FEE_ADYEN = 'PaymentFeeAdyen'; + public const TYPE_PAYMENT_FEE_ADYEN_COMMISSION = 'PaymentFeeAdyenCommission'; + public const TYPE_PAYMENT_FEE_ADYEN_MARKUP = 'PaymentFeeAdyenMarkup'; + public const TYPE_PAYMENT_FEE_INTERCHANGE = 'PaymentFeeInterchange'; + public const TYPE_PAYMENT_FEE_SCHEME_FEE = 'PaymentFeeSchemeFee'; public const TYPE_REMAINDER = 'Remainder'; public const TYPE_SURCHARGE = 'Surcharge'; public const TYPE_TIP = 'Tip'; @@ -263,6 +269,12 @@ public function getTypeAllowableValues() self::TYPE__DEFAULT, self::TYPE_MARKET_PLACE, self::TYPE_PAYMENT_FEE, + self::TYPE_PAYMENT_FEE_ACQUIRING, + self::TYPE_PAYMENT_FEE_ADYEN, + self::TYPE_PAYMENT_FEE_ADYEN_COMMISSION, + self::TYPE_PAYMENT_FEE_ADYEN_MARKUP, + self::TYPE_PAYMENT_FEE_INTERCHANGE, + self::TYPE_PAYMENT_FEE_SCHEME_FEE, self::TYPE_REMAINDER, self::TYPE_SURCHARGE, self::TYPE_TIP, diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index ea66b51f4..aafea8888 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -248,9 +248,9 @@ public function getModelName() public const TYPE_GRABPAY_PH = 'grabpay_PH'; public const TYPE_OXXO = 'oxxo'; public const TYPE_GCASH = 'gcash'; + public const TYPE_DANA = 'dana'; public const TYPE_KAKAOPAY = 'kakaopay'; public const TYPE_TRUEMONEY = 'truemoney'; - public const TYPE_TWINT_POS = 'twint_pos'; /** * Gets allowable values of the enum @@ -275,9 +275,9 @@ public function getTypeAllowableValues() self::TYPE_GRABPAY_PH, self::TYPE_OXXO, self::TYPE_GCASH, + self::TYPE_DANA, self::TYPE_KAKAOPAY, self::TYPE_TRUEMONEY, - self::TYPE_TWINT_POS, ]; } /** diff --git a/src/Adyen/Model/Checkout/SubMerchant2.php b/src/Adyen/Model/Checkout/SubMerchant2.php new file mode 100644 index 000000000..b928328ab --- /dev/null +++ b/src/Adyen/Model/Checkout/SubMerchant2.php @@ -0,0 +1,520 @@ + + */ +class SubMerchant2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubMerchant-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'address' => '\Adyen\Model\Checkout\Address', + 'id' => 'string', + 'mcc' => 'string', + 'name' => 'string', + 'taxId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'address' => null, + 'id' => null, + 'mcc' => null, + 'name' => null, + 'taxId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'address' => false, + 'id' => false, + 'mcc' => false, + 'name' => false, + 'taxId' => 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 = [ + 'address' => 'address', + 'id' => 'id', + 'mcc' => 'mcc', + 'name' => 'name', + 'taxId' => 'taxId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'id' => 'setId', + 'mcc' => 'setMcc', + 'name' => 'setName', + 'taxId' => 'setTaxId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'id' => 'getId', + 'mcc' => 'getMcc', + 'name' => 'getName', + 'taxId' => 'getTaxId' + ]; + + /** + * 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('address', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('taxId', $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 address + * + * @return \Adyen\Model\Checkout\Address|null + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Adyen\Model\Checkout\Address|null $address address + * + * @return self + */ + public function setAddress($address) + { + if (is_null($address)) { + throw new \InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @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 mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc mcc + * + * @return self + */ + public function setMcc($mcc) + { + if (is_null($mcc)) { + throw new \InvalidArgumentException('non-nullable mcc cannot be null'); + } + $this->container['mcc'] = $mcc; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets taxId + * + * @return string|null + */ + public function getTaxId() + { + return $this->container['taxId']; + } + + /** + * Sets taxId + * + * @param string|null $taxId taxId + * + * @return self + */ + public function setTaxId($taxId) + { + if (is_null($taxId)) { + throw new \InvalidArgumentException('non-nullable taxId cannot be null'); + } + $this->container['taxId'] = $taxId; + + 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/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index 5124e7700..d8211a73c 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -581,7 +581,7 @@ public function __construct(array $data = null) $this->setIfExists('homePhone', $data ?? [], null); $this->setIfExists('mcc', $data ?? [], null); $this->setIfExists('merchantName', $data ?? [], null); - $this->setIfExists('messageVersion', $data ?? [], '2.1.0'); + $this->setIfExists('messageVersion', $data ?? [], null); $this->setIfExists('mobilePhone', $data ?? [], null); $this->setIfExists('notificationURL', $data ?? [], null); $this->setIfExists('payTokenInd', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php new file mode 100644 index 000000000..83f1a9ece --- /dev/null +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php @@ -0,0 +1,1800 @@ + + */ +class ThreeDS2RequestData2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS2RequestData-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acctInfo' => '\Adyen\Model\Checkout\AcctInfo', + 'acctType' => 'string', + 'acquirerBIN' => 'string', + 'acquirerMerchantID' => 'string', + 'addrMatch' => 'string', + 'authenticationOnly' => 'bool', + 'challengeIndicator' => 'string', + 'deviceRenderOptions' => '\Adyen\Model\Checkout\DeviceRenderOptions', + 'homePhone' => '\Adyen\Model\Checkout\Phone', + 'mcc' => 'string', + 'merchantName' => 'string', + 'messageVersion' => 'string', + 'mobilePhone' => '\Adyen\Model\Checkout\Phone', + 'notificationURL' => 'string', + 'payTokenInd' => 'bool', + 'paymentAuthenticationUseCase' => 'string', + 'purchaseInstalData' => 'string', + 'recurringExpiry' => 'string', + 'recurringFrequency' => 'string', + 'sdkAppID' => 'string', + 'sdkEphemPubKey' => '\Adyen\Model\Checkout\SDKEphemPubKey', + 'sdkMaxTimeout' => 'int', + 'sdkReferenceNumber' => 'string', + 'sdkTransID' => 'string', + 'threeDSCompInd' => 'string', + 'threeDSRequestorAuthenticationInd' => 'string', + 'threeDSRequestorAuthenticationInfo' => '\Adyen\Model\Checkout\ThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'string', + 'threeDSRequestorID' => 'string', + 'threeDSRequestorName' => 'string', + 'threeDSRequestorPriorAuthenticationInfo' => '\Adyen\Model\Checkout\ThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'string', + 'transType' => 'string', + 'transactionType' => 'string', + 'whiteListStatus' => 'string', + 'workPhone' => '\Adyen\Model\Checkout\Phone' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acctInfo' => null, + 'acctType' => null, + 'acquirerBIN' => null, + 'acquirerMerchantID' => null, + 'addrMatch' => null, + 'authenticationOnly' => null, + 'challengeIndicator' => null, + 'deviceRenderOptions' => null, + 'homePhone' => null, + 'mcc' => null, + 'merchantName' => null, + 'messageVersion' => null, + 'mobilePhone' => null, + 'notificationURL' => null, + 'payTokenInd' => null, + 'paymentAuthenticationUseCase' => null, + 'purchaseInstalData' => null, + 'recurringExpiry' => null, + 'recurringFrequency' => null, + 'sdkAppID' => null, + 'sdkEphemPubKey' => null, + 'sdkMaxTimeout' => 'int32', + 'sdkReferenceNumber' => null, + 'sdkTransID' => null, + 'threeDSCompInd' => null, + 'threeDSRequestorAuthenticationInd' => null, + 'threeDSRequestorAuthenticationInfo' => null, + 'threeDSRequestorChallengeInd' => null, + 'threeDSRequestorID' => null, + 'threeDSRequestorName' => null, + 'threeDSRequestorPriorAuthenticationInfo' => null, + 'threeDSRequestorURL' => null, + 'transType' => null, + 'transactionType' => null, + 'whiteListStatus' => null, + 'workPhone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acctInfo' => false, + 'acctType' => false, + 'acquirerBIN' => false, + 'acquirerMerchantID' => false, + 'addrMatch' => false, + 'authenticationOnly' => false, + 'challengeIndicator' => false, + 'deviceRenderOptions' => false, + 'homePhone' => false, + 'mcc' => false, + 'merchantName' => false, + 'messageVersion' => false, + 'mobilePhone' => false, + 'notificationURL' => false, + 'payTokenInd' => false, + 'paymentAuthenticationUseCase' => false, + 'purchaseInstalData' => false, + 'recurringExpiry' => false, + 'recurringFrequency' => false, + 'sdkAppID' => false, + 'sdkEphemPubKey' => false, + 'sdkMaxTimeout' => true, + 'sdkReferenceNumber' => false, + 'sdkTransID' => false, + 'threeDSCompInd' => false, + 'threeDSRequestorAuthenticationInd' => false, + 'threeDSRequestorAuthenticationInfo' => false, + 'threeDSRequestorChallengeInd' => false, + 'threeDSRequestorID' => false, + 'threeDSRequestorName' => false, + 'threeDSRequestorPriorAuthenticationInfo' => false, + 'threeDSRequestorURL' => false, + 'transType' => false, + 'transactionType' => false, + 'whiteListStatus' => false, + 'workPhone' => 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 = [ + 'acctInfo' => 'acctInfo', + 'acctType' => 'acctType', + 'acquirerBIN' => 'acquirerBIN', + 'acquirerMerchantID' => 'acquirerMerchantID', + 'addrMatch' => 'addrMatch', + 'authenticationOnly' => 'authenticationOnly', + 'challengeIndicator' => 'challengeIndicator', + 'deviceRenderOptions' => 'deviceRenderOptions', + 'homePhone' => 'homePhone', + 'mcc' => 'mcc', + 'merchantName' => 'merchantName', + 'messageVersion' => 'messageVersion', + 'mobilePhone' => 'mobilePhone', + 'notificationURL' => 'notificationURL', + 'payTokenInd' => 'payTokenInd', + 'paymentAuthenticationUseCase' => 'paymentAuthenticationUseCase', + 'purchaseInstalData' => 'purchaseInstalData', + 'recurringExpiry' => 'recurringExpiry', + 'recurringFrequency' => 'recurringFrequency', + 'sdkAppID' => 'sdkAppID', + 'sdkEphemPubKey' => 'sdkEphemPubKey', + 'sdkMaxTimeout' => 'sdkMaxTimeout', + 'sdkReferenceNumber' => 'sdkReferenceNumber', + 'sdkTransID' => 'sdkTransID', + 'threeDSCompInd' => 'threeDSCompInd', + 'threeDSRequestorAuthenticationInd' => 'threeDSRequestorAuthenticationInd', + 'threeDSRequestorAuthenticationInfo' => 'threeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'threeDSRequestorChallengeInd', + 'threeDSRequestorID' => 'threeDSRequestorID', + 'threeDSRequestorName' => 'threeDSRequestorName', + 'threeDSRequestorPriorAuthenticationInfo' => 'threeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'threeDSRequestorURL', + 'transType' => 'transType', + 'transactionType' => 'transactionType', + 'whiteListStatus' => 'whiteListStatus', + 'workPhone' => 'workPhone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acctInfo' => 'setAcctInfo', + 'acctType' => 'setAcctType', + 'acquirerBIN' => 'setAcquirerBIN', + 'acquirerMerchantID' => 'setAcquirerMerchantID', + 'addrMatch' => 'setAddrMatch', + 'authenticationOnly' => 'setAuthenticationOnly', + 'challengeIndicator' => 'setChallengeIndicator', + 'deviceRenderOptions' => 'setDeviceRenderOptions', + 'homePhone' => 'setHomePhone', + 'mcc' => 'setMcc', + 'merchantName' => 'setMerchantName', + 'messageVersion' => 'setMessageVersion', + 'mobilePhone' => 'setMobilePhone', + 'notificationURL' => 'setNotificationURL', + 'payTokenInd' => 'setPayTokenInd', + 'paymentAuthenticationUseCase' => 'setPaymentAuthenticationUseCase', + 'purchaseInstalData' => 'setPurchaseInstalData', + 'recurringExpiry' => 'setRecurringExpiry', + 'recurringFrequency' => 'setRecurringFrequency', + 'sdkAppID' => 'setSdkAppID', + 'sdkEphemPubKey' => 'setSdkEphemPubKey', + 'sdkMaxTimeout' => 'setSdkMaxTimeout', + 'sdkReferenceNumber' => 'setSdkReferenceNumber', + 'sdkTransID' => 'setSdkTransID', + 'threeDSCompInd' => 'setThreeDSCompInd', + 'threeDSRequestorAuthenticationInd' => 'setThreeDSRequestorAuthenticationInd', + 'threeDSRequestorAuthenticationInfo' => 'setThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'setThreeDSRequestorChallengeInd', + 'threeDSRequestorID' => 'setThreeDSRequestorID', + 'threeDSRequestorName' => 'setThreeDSRequestorName', + 'threeDSRequestorPriorAuthenticationInfo' => 'setThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'setThreeDSRequestorURL', + 'transType' => 'setTransType', + 'transactionType' => 'setTransactionType', + 'whiteListStatus' => 'setWhiteListStatus', + 'workPhone' => 'setWorkPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acctInfo' => 'getAcctInfo', + 'acctType' => 'getAcctType', + 'acquirerBIN' => 'getAcquirerBIN', + 'acquirerMerchantID' => 'getAcquirerMerchantID', + 'addrMatch' => 'getAddrMatch', + 'authenticationOnly' => 'getAuthenticationOnly', + 'challengeIndicator' => 'getChallengeIndicator', + 'deviceRenderOptions' => 'getDeviceRenderOptions', + 'homePhone' => 'getHomePhone', + 'mcc' => 'getMcc', + 'merchantName' => 'getMerchantName', + 'messageVersion' => 'getMessageVersion', + 'mobilePhone' => 'getMobilePhone', + 'notificationURL' => 'getNotificationURL', + 'payTokenInd' => 'getPayTokenInd', + 'paymentAuthenticationUseCase' => 'getPaymentAuthenticationUseCase', + 'purchaseInstalData' => 'getPurchaseInstalData', + 'recurringExpiry' => 'getRecurringExpiry', + 'recurringFrequency' => 'getRecurringFrequency', + 'sdkAppID' => 'getSdkAppID', + 'sdkEphemPubKey' => 'getSdkEphemPubKey', + 'sdkMaxTimeout' => 'getSdkMaxTimeout', + 'sdkReferenceNumber' => 'getSdkReferenceNumber', + 'sdkTransID' => 'getSdkTransID', + 'threeDSCompInd' => 'getThreeDSCompInd', + 'threeDSRequestorAuthenticationInd' => 'getThreeDSRequestorAuthenticationInd', + 'threeDSRequestorAuthenticationInfo' => 'getThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'getThreeDSRequestorChallengeInd', + 'threeDSRequestorID' => 'getThreeDSRequestorID', + 'threeDSRequestorName' => 'getThreeDSRequestorName', + 'threeDSRequestorPriorAuthenticationInfo' => 'getThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'getThreeDSRequestorURL', + 'transType' => 'getTransType', + 'transactionType' => 'getTransactionType', + 'whiteListStatus' => 'getWhiteListStatus', + 'workPhone' => 'getWorkPhone' + ]; + + /** + * 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 ACCT_TYPE__01 = '01'; + public const ACCT_TYPE__02 = '02'; + public const ACCT_TYPE__03 = '03'; + public const ADDR_MATCH_Y = 'Y'; + public const ADDR_MATCH_N = 'N'; + public const CHALLENGE_INDICATOR_NO_PREFERENCE = 'noPreference'; + public const CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE = 'requestNoChallenge'; + public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE = 'requestChallenge'; + public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE = 'requestChallengeAsMandate'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__01 = '01'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__02 = '02'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__03 = '03'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__04 = '04'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__05 = '05'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__06 = '06'; + public const TRANS_TYPE__01 = '01'; + public const TRANS_TYPE__03 = '03'; + public const TRANS_TYPE__10 = '10'; + public const TRANS_TYPE__11 = '11'; + public const TRANS_TYPE__28 = '28'; + public const TRANSACTION_TYPE_GOODS_OR_SERVICE_PURCHASE = 'goodsOrServicePurchase'; + public const TRANSACTION_TYPE_CHECK_ACCEPTANCE = 'checkAcceptance'; + public const TRANSACTION_TYPE_ACCOUNT_FUNDING = 'accountFunding'; + public const TRANSACTION_TYPE_QUASI_CASH_TRANSACTION = 'quasiCashTransaction'; + public const TRANSACTION_TYPE_PREPAID_ACTIVATION_AND_LOAD = 'prepaidActivationAndLoad'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAcctTypeAllowableValues() + { + return [ + self::ACCT_TYPE__01, + self::ACCT_TYPE__02, + self::ACCT_TYPE__03, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAddrMatchAllowableValues() + { + return [ + self::ADDR_MATCH_Y, + self::ADDR_MATCH_N, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChallengeIndicatorAllowableValues() + { + return [ + self::CHALLENGE_INDICATOR_NO_PREFERENCE, + self::CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE, + self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE, + self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getThreeDSRequestorChallengeIndAllowableValues() + { + return [ + self::THREE_DS_REQUESTOR_CHALLENGE_IND__01, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__02, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__03, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__04, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__05, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__06, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTransTypeAllowableValues() + { + return [ + self::TRANS_TYPE__01, + self::TRANS_TYPE__03, + self::TRANS_TYPE__10, + self::TRANS_TYPE__11, + self::TRANS_TYPE__28, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTransactionTypeAllowableValues() + { + return [ + self::TRANSACTION_TYPE_GOODS_OR_SERVICE_PURCHASE, + self::TRANSACTION_TYPE_CHECK_ACCEPTANCE, + self::TRANSACTION_TYPE_ACCOUNT_FUNDING, + self::TRANSACTION_TYPE_QUASI_CASH_TRANSACTION, + self::TRANSACTION_TYPE_PREPAID_ACTIVATION_AND_LOAD, + ]; + } + /** + * 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('acctInfo', $data ?? [], null); + $this->setIfExists('acctType', $data ?? [], null); + $this->setIfExists('acquirerBIN', $data ?? [], null); + $this->setIfExists('acquirerMerchantID', $data ?? [], null); + $this->setIfExists('addrMatch', $data ?? [], null); + $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('challengeIndicator', $data ?? [], null); + $this->setIfExists('deviceRenderOptions', $data ?? [], null); + $this->setIfExists('homePhone', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('merchantName', $data ?? [], null); + $this->setIfExists('messageVersion', $data ?? [], null); + $this->setIfExists('mobilePhone', $data ?? [], null); + $this->setIfExists('notificationURL', $data ?? [], null); + $this->setIfExists('payTokenInd', $data ?? [], null); + $this->setIfExists('paymentAuthenticationUseCase', $data ?? [], null); + $this->setIfExists('purchaseInstalData', $data ?? [], null); + $this->setIfExists('recurringExpiry', $data ?? [], null); + $this->setIfExists('recurringFrequency', $data ?? [], null); + $this->setIfExists('sdkAppID', $data ?? [], null); + $this->setIfExists('sdkEphemPubKey', $data ?? [], null); + $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkReferenceNumber', $data ?? [], null); + $this->setIfExists('sdkTransID', $data ?? [], null); + $this->setIfExists('threeDSCompInd', $data ?? [], null); + $this->setIfExists('threeDSRequestorAuthenticationInd', $data ?? [], null); + $this->setIfExists('threeDSRequestorAuthenticationInfo', $data ?? [], null); + $this->setIfExists('threeDSRequestorChallengeInd', $data ?? [], null); + $this->setIfExists('threeDSRequestorID', $data ?? [], null); + $this->setIfExists('threeDSRequestorName', $data ?? [], null); + $this->setIfExists('threeDSRequestorPriorAuthenticationInfo', $data ?? [], null); + $this->setIfExists('threeDSRequestorURL', $data ?? [], null); + $this->setIfExists('transType', $data ?? [], null); + $this->setIfExists('transactionType', $data ?? [], null); + $this->setIfExists('whiteListStatus', $data ?? [], null); + $this->setIfExists('workPhone', $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->getAcctTypeAllowableValues(); + if (!is_null($this->container['acctType']) && !in_array($this->container['acctType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'acctType', must be one of '%s'", + $this->container['acctType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAddrMatchAllowableValues(); + if (!is_null($this->container['addrMatch']) && !in_array($this->container['addrMatch'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'addrMatch', must be one of '%s'", + $this->container['addrMatch'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChallengeIndicatorAllowableValues(); + if (!is_null($this->container['challengeIndicator']) && !in_array($this->container['challengeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'challengeIndicator', must be one of '%s'", + $this->container['challengeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); + if (!is_null($this->container['threeDSRequestorChallengeInd']) && !in_array($this->container['threeDSRequestorChallengeInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'threeDSRequestorChallengeInd', must be one of '%s'", + $this->container['threeDSRequestorChallengeInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTransTypeAllowableValues(); + if (!is_null($this->container['transType']) && !in_array($this->container['transType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'transType', must be one of '%s'", + $this->container['transType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTransactionTypeAllowableValues(); + if (!is_null($this->container['transactionType']) && !in_array($this->container['transactionType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'transactionType', must be one of '%s'", + $this->container['transactionType'], + 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 acctInfo + * + * @return \Adyen\Model\Checkout\AcctInfo|null + */ + public function getAcctInfo() + { + return $this->container['acctInfo']; + } + + /** + * Sets acctInfo + * + * @param \Adyen\Model\Checkout\AcctInfo|null $acctInfo acctInfo + * + * @return self + */ + public function setAcctInfo($acctInfo) + { + if (is_null($acctInfo)) { + throw new \InvalidArgumentException('non-nullable acctInfo cannot be null'); + } + $this->container['acctInfo'] = $acctInfo; + + return $this; + } + + /** + * Gets acctType + * + * @return string|null + */ + public function getAcctType() + { + return $this->container['acctType']; + } + + /** + * Sets acctType + * + * @param string|null $acctType Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit + * + * @return self + */ + public function setAcctType($acctType) + { + if (is_null($acctType)) { + throw new \InvalidArgumentException('non-nullable acctType cannot be null'); + } + $allowedValues = $this->getAcctTypeAllowableValues(); + if (!in_array($acctType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'acctType', must be one of '%s'", + $acctType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['acctType'] = $acctType; + + return $this; + } + + /** + * Gets acquirerBIN + * + * @return string|null + */ + public function getAcquirerBIN() + { + return $this->container['acquirerBIN']; + } + + /** + * Sets acquirerBIN + * + * @param string|null $acquirerBIN Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + * + * @return self + */ + public function setAcquirerBIN($acquirerBIN) + { + if (is_null($acquirerBIN)) { + throw new \InvalidArgumentException('non-nullable acquirerBIN cannot be null'); + } + $this->container['acquirerBIN'] = $acquirerBIN; + + return $this; + } + + /** + * Gets acquirerMerchantID + * + * @return string|null + */ + public function getAcquirerMerchantID() + { + return $this->container['acquirerMerchantID']; + } + + /** + * Sets acquirerMerchantID + * + * @param string|null $acquirerMerchantID Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + * + * @return self + */ + public function setAcquirerMerchantID($acquirerMerchantID) + { + if (is_null($acquirerMerchantID)) { + throw new \InvalidArgumentException('non-nullable acquirerMerchantID cannot be null'); + } + $this->container['acquirerMerchantID'] = $acquirerMerchantID; + + return $this; + } + + /** + * Gets addrMatch + * + * @return string|null + */ + public function getAddrMatch() + { + return $this->container['addrMatch']; + } + + /** + * Sets addrMatch + * + * @param string|null $addrMatch Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. + * + * @return self + */ + public function setAddrMatch($addrMatch) + { + if (is_null($addrMatch)) { + throw new \InvalidArgumentException('non-nullable addrMatch cannot be null'); + } + $allowedValues = $this->getAddrMatchAllowableValues(); + if (!in_array($addrMatch, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'addrMatch', must be one of '%s'", + $addrMatch, + implode("', '", $allowedValues) + ) + ); + } + $this->container['addrMatch'] = $addrMatch; + + return $this; + } + + /** + * Gets authenticationOnly + * + * @return bool|null + * @deprecated + */ + public function getAuthenticationOnly() + { + return $this->container['authenticationOnly']; + } + + /** + * Sets authenticationOnly + * + * @param bool|null $authenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + * + * @return self + * @deprecated + */ + public function setAuthenticationOnly($authenticationOnly) + { + if (is_null($authenticationOnly)) { + throw new \InvalidArgumentException('non-nullable authenticationOnly cannot be null'); + } + $this->container['authenticationOnly'] = $authenticationOnly; + + return $this; + } + + /** + * Gets challengeIndicator + * + * @return string|null + * @deprecated + */ + public function getChallengeIndicator() + { + return $this->container['challengeIndicator']; + } + + /** + * Sets challengeIndicator + * + * @param string|null $challengeIndicator Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` + * + * @return self + * @deprecated + */ + public function setChallengeIndicator($challengeIndicator) + { + if (is_null($challengeIndicator)) { + throw new \InvalidArgumentException('non-nullable challengeIndicator cannot be null'); + } + $allowedValues = $this->getChallengeIndicatorAllowableValues(); + if (!in_array($challengeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'challengeIndicator', must be one of '%s'", + $challengeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['challengeIndicator'] = $challengeIndicator; + + return $this; + } + + /** + * Gets deviceRenderOptions + * + * @return \Adyen\Model\Checkout\DeviceRenderOptions|null + */ + public function getDeviceRenderOptions() + { + return $this->container['deviceRenderOptions']; + } + + /** + * Sets deviceRenderOptions + * + * @param \Adyen\Model\Checkout\DeviceRenderOptions|null $deviceRenderOptions deviceRenderOptions + * + * @return self + */ + public function setDeviceRenderOptions($deviceRenderOptions) + { + if (is_null($deviceRenderOptions)) { + throw new \InvalidArgumentException('non-nullable deviceRenderOptions cannot be null'); + } + $this->container['deviceRenderOptions'] = $deviceRenderOptions; + + return $this; + } + + /** + * Gets homePhone + * + * @return \Adyen\Model\Checkout\Phone|null + */ + public function getHomePhone() + { + return $this->container['homePhone']; + } + + /** + * Sets homePhone + * + * @param \Adyen\Model\Checkout\Phone|null $homePhone homePhone + * + * @return self + */ + public function setHomePhone($homePhone) + { + if (is_null($homePhone)) { + throw new \InvalidArgumentException('non-nullable homePhone cannot be null'); + } + $this->container['homePhone'] = $homePhone; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. + * + * @return self + */ + public function setMcc($mcc) + { + if (is_null($mcc)) { + throw new \InvalidArgumentException('non-nullable mcc cannot be null'); + } + $this->container['mcc'] = $mcc; + + return $this; + } + + /** + * Gets merchantName + * + * @return string|null + */ + public function getMerchantName() + { + return $this->container['merchantName']; + } + + /** + * Sets merchantName + * + * @param string|null $merchantName Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. + * + * @return self + */ + public function setMerchantName($merchantName) + { + if (is_null($merchantName)) { + throw new \InvalidArgumentException('non-nullable merchantName cannot be null'); + } + $this->container['merchantName'] = $merchantName; + + return $this; + } + + /** + * Gets messageVersion + * + * @return string|null + */ + public function getMessageVersion() + { + return $this->container['messageVersion']; + } + + /** + * Sets messageVersion + * + * @param string|null $messageVersion The `messageVersion` value indicating the 3D Secure 2 protocol version. + * + * @return self + */ + public function setMessageVersion($messageVersion) + { + if (is_null($messageVersion)) { + throw new \InvalidArgumentException('non-nullable messageVersion cannot be null'); + } + $this->container['messageVersion'] = $messageVersion; + + return $this; + } + + /** + * Gets mobilePhone + * + * @return \Adyen\Model\Checkout\Phone|null + */ + public function getMobilePhone() + { + return $this->container['mobilePhone']; + } + + /** + * Sets mobilePhone + * + * @param \Adyen\Model\Checkout\Phone|null $mobilePhone mobilePhone + * + * @return self + */ + public function setMobilePhone($mobilePhone) + { + if (is_null($mobilePhone)) { + throw new \InvalidArgumentException('non-nullable mobilePhone cannot be null'); + } + $this->container['mobilePhone'] = $mobilePhone; + + return $this; + } + + /** + * Gets notificationURL + * + * @return string|null + */ + public function getNotificationURL() + { + return $this->container['notificationURL']; + } + + /** + * Sets notificationURL + * + * @param string|null $notificationURL URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. + * + * @return self + */ + public function setNotificationURL($notificationURL) + { + if (is_null($notificationURL)) { + throw new \InvalidArgumentException('non-nullable notificationURL cannot be null'); + } + $this->container['notificationURL'] = $notificationURL; + + return $this; + } + + /** + * Gets payTokenInd + * + * @return bool|null + */ + public function getPayTokenInd() + { + return $this->container['payTokenInd']; + } + + /** + * Sets payTokenInd + * + * @param bool|null $payTokenInd Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. + * + * @return self + */ + public function setPayTokenInd($payTokenInd) + { + if (is_null($payTokenInd)) { + throw new \InvalidArgumentException('non-nullable payTokenInd cannot be null'); + } + $this->container['payTokenInd'] = $payTokenInd; + + return $this; + } + + /** + * Gets paymentAuthenticationUseCase + * + * @return string|null + */ + public function getPaymentAuthenticationUseCase() + { + return $this->container['paymentAuthenticationUseCase']; + } + + /** + * Sets paymentAuthenticationUseCase + * + * @param string|null $paymentAuthenticationUseCase Indicates the type of payment for which an authentication is requested (message extension) + * + * @return self + */ + public function setPaymentAuthenticationUseCase($paymentAuthenticationUseCase) + { + if (is_null($paymentAuthenticationUseCase)) { + throw new \InvalidArgumentException('non-nullable paymentAuthenticationUseCase cannot be null'); + } + $this->container['paymentAuthenticationUseCase'] = $paymentAuthenticationUseCase; + + return $this; + } + + /** + * Gets purchaseInstalData + * + * @return string|null + */ + public function getPurchaseInstalData() + { + return $this->container['purchaseInstalData']; + } + + /** + * Sets purchaseInstalData + * + * @param string|null $purchaseInstalData Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. + * + * @return self + */ + public function setPurchaseInstalData($purchaseInstalData) + { + if (is_null($purchaseInstalData)) { + throw new \InvalidArgumentException('non-nullable purchaseInstalData cannot be null'); + } + $this->container['purchaseInstalData'] = $purchaseInstalData; + + return $this; + } + + /** + * Gets recurringExpiry + * + * @return string|null + */ + public function getRecurringExpiry() + { + return $this->container['recurringExpiry']; + } + + /** + * Sets recurringExpiry + * + * @param string|null $recurringExpiry Date after which no further authorisations shall be performed. Format: YYYYMMDD + * + * @return self + */ + public function setRecurringExpiry($recurringExpiry) + { + if (is_null($recurringExpiry)) { + throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); + } + $this->container['recurringExpiry'] = $recurringExpiry; + + return $this; + } + + /** + * Gets recurringFrequency + * + * @return string|null + */ + public function getRecurringFrequency() + { + return $this->container['recurringFrequency']; + } + + /** + * Sets recurringFrequency + * + * @param string|null $recurringFrequency Indicates the minimum number of days between authorisations. Maximum length: 4 characters. + * + * @return self + */ + public function setRecurringFrequency($recurringFrequency) + { + if (is_null($recurringFrequency)) { + throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); + } + $this->container['recurringFrequency'] = $recurringFrequency; + + return $this; + } + + /** + * Gets sdkAppID + * + * @return string|null + */ + public function getSdkAppID() + { + return $this->container['sdkAppID']; + } + + /** + * Sets sdkAppID + * + * @param string|null $sdkAppID The `sdkAppID` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setSdkAppID($sdkAppID) + { + if (is_null($sdkAppID)) { + throw new \InvalidArgumentException('non-nullable sdkAppID cannot be null'); + } + $this->container['sdkAppID'] = $sdkAppID; + + return $this; + } + + /** + * Gets sdkEphemPubKey + * + * @return \Adyen\Model\Checkout\SDKEphemPubKey|null + */ + public function getSdkEphemPubKey() + { + return $this->container['sdkEphemPubKey']; + } + + /** + * Sets sdkEphemPubKey + * + * @param \Adyen\Model\Checkout\SDKEphemPubKey|null $sdkEphemPubKey sdkEphemPubKey + * + * @return self + */ + public function setSdkEphemPubKey($sdkEphemPubKey) + { + if (is_null($sdkEphemPubKey)) { + throw new \InvalidArgumentException('non-nullable sdkEphemPubKey cannot be null'); + } + $this->container['sdkEphemPubKey'] = $sdkEphemPubKey; + + return $this; + } + + /** + * Gets sdkMaxTimeout + * + * @return int|null + */ + public function getSdkMaxTimeout() + { + return $this->container['sdkMaxTimeout']; + } + + /** + * Sets sdkMaxTimeout + * + * @param int|null $sdkMaxTimeout The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. + * + * @return self + */ + public function setSdkMaxTimeout($sdkMaxTimeout) + { + // Do nothing for nullable integers + $this->container['sdkMaxTimeout'] = $sdkMaxTimeout; + + return $this; + } + + /** + * Gets sdkReferenceNumber + * + * @return string|null + */ + public function getSdkReferenceNumber() + { + return $this->container['sdkReferenceNumber']; + } + + /** + * Sets sdkReferenceNumber + * + * @param string|null $sdkReferenceNumber The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setSdkReferenceNumber($sdkReferenceNumber) + { + if (is_null($sdkReferenceNumber)) { + throw new \InvalidArgumentException('non-nullable sdkReferenceNumber cannot be null'); + } + $this->container['sdkReferenceNumber'] = $sdkReferenceNumber; + + return $this; + } + + /** + * Gets sdkTransID + * + * @return string|null + */ + public function getSdkTransID() + { + return $this->container['sdkTransID']; + } + + /** + * Sets sdkTransID + * + * @param string|null $sdkTransID The `sdkTransID` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setSdkTransID($sdkTransID) + { + if (is_null($sdkTransID)) { + throw new \InvalidArgumentException('non-nullable sdkTransID cannot be null'); + } + $this->container['sdkTransID'] = $sdkTransID; + + return $this; + } + + /** + * Gets threeDSCompInd + * + * @return string|null + */ + public function getThreeDSCompInd() + { + return $this->container['threeDSCompInd']; + } + + /** + * Sets threeDSCompInd + * + * @param string|null $threeDSCompInd Completion indicator for the device fingerprinting. + * + * @return self + */ + public function setThreeDSCompInd($threeDSCompInd) + { + if (is_null($threeDSCompInd)) { + throw new \InvalidArgumentException('non-nullable threeDSCompInd cannot be null'); + } + $this->container['threeDSCompInd'] = $threeDSCompInd; + + return $this; + } + + /** + * Gets threeDSRequestorAuthenticationInd + * + * @return string|null + */ + public function getThreeDSRequestorAuthenticationInd() + { + return $this->container['threeDSRequestorAuthenticationInd']; + } + + /** + * Sets threeDSRequestorAuthenticationInd + * + * @param string|null $threeDSRequestorAuthenticationInd Indicates the type of Authentication request. + * + * @return self + */ + public function setThreeDSRequestorAuthenticationInd($threeDSRequestorAuthenticationInd) + { + if (is_null($threeDSRequestorAuthenticationInd)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorAuthenticationInd cannot be null'); + } + $this->container['threeDSRequestorAuthenticationInd'] = $threeDSRequestorAuthenticationInd; + + return $this; + } + + /** + * Gets threeDSRequestorAuthenticationInfo + * + * @return \Adyen\Model\Checkout\ThreeDSRequestorAuthenticationInfo|null + */ + public function getThreeDSRequestorAuthenticationInfo() + { + return $this->container['threeDSRequestorAuthenticationInfo']; + } + + /** + * Sets threeDSRequestorAuthenticationInfo + * + * @param \Adyen\Model\Checkout\ThreeDSRequestorAuthenticationInfo|null $threeDSRequestorAuthenticationInfo threeDSRequestorAuthenticationInfo + * + * @return self + */ + public function setThreeDSRequestorAuthenticationInfo($threeDSRequestorAuthenticationInfo) + { + if (is_null($threeDSRequestorAuthenticationInfo)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorAuthenticationInfo cannot be null'); + } + $this->container['threeDSRequestorAuthenticationInfo'] = $threeDSRequestorAuthenticationInfo; + + return $this; + } + + /** + * Gets threeDSRequestorChallengeInd + * + * @return string|null + */ + public function getThreeDSRequestorChallengeInd() + { + return $this->container['threeDSRequestorChallengeInd']; + } + + /** + * Sets threeDSRequestorChallengeInd + * + * @param string|null $threeDSRequestorChallengeInd Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only + * + * @return self + */ + public function setThreeDSRequestorChallengeInd($threeDSRequestorChallengeInd) + { + if (is_null($threeDSRequestorChallengeInd)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorChallengeInd cannot be null'); + } + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); + if (!in_array($threeDSRequestorChallengeInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'threeDSRequestorChallengeInd', must be one of '%s'", + $threeDSRequestorChallengeInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['threeDSRequestorChallengeInd'] = $threeDSRequestorChallengeInd; + + return $this; + } + + /** + * Gets threeDSRequestorID + * + * @return string|null + */ + public function getThreeDSRequestorID() + { + return $this->container['threeDSRequestorID']; + } + + /** + * Sets threeDSRequestorID + * + * @param string|null $threeDSRequestorID Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. + * + * @return self + */ + public function setThreeDSRequestorID($threeDSRequestorID) + { + if (is_null($threeDSRequestorID)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorID cannot be null'); + } + $this->container['threeDSRequestorID'] = $threeDSRequestorID; + + return $this; + } + + /** + * Gets threeDSRequestorName + * + * @return string|null + */ + public function getThreeDSRequestorName() + { + return $this->container['threeDSRequestorName']; + } + + /** + * Sets threeDSRequestorName + * + * @param string|null $threeDSRequestorName Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. + * + * @return self + */ + public function setThreeDSRequestorName($threeDSRequestorName) + { + if (is_null($threeDSRequestorName)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorName cannot be null'); + } + $this->container['threeDSRequestorName'] = $threeDSRequestorName; + + return $this; + } + + /** + * Gets threeDSRequestorPriorAuthenticationInfo + * + * @return \Adyen\Model\Checkout\ThreeDSRequestorPriorAuthenticationInfo|null + */ + public function getThreeDSRequestorPriorAuthenticationInfo() + { + return $this->container['threeDSRequestorPriorAuthenticationInfo']; + } + + /** + * Sets threeDSRequestorPriorAuthenticationInfo + * + * @param \Adyen\Model\Checkout\ThreeDSRequestorPriorAuthenticationInfo|null $threeDSRequestorPriorAuthenticationInfo threeDSRequestorPriorAuthenticationInfo + * + * @return self + */ + public function setThreeDSRequestorPriorAuthenticationInfo($threeDSRequestorPriorAuthenticationInfo) + { + if (is_null($threeDSRequestorPriorAuthenticationInfo)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorPriorAuthenticationInfo cannot be null'); + } + $this->container['threeDSRequestorPriorAuthenticationInfo'] = $threeDSRequestorPriorAuthenticationInfo; + + return $this; + } + + /** + * Gets threeDSRequestorURL + * + * @return string|null + */ + public function getThreeDSRequestorURL() + { + return $this->container['threeDSRequestorURL']; + } + + /** + * Sets threeDSRequestorURL + * + * @param string|null $threeDSRequestorURL URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. + * + * @return self + */ + public function setThreeDSRequestorURL($threeDSRequestorURL) + { + if (is_null($threeDSRequestorURL)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorURL cannot be null'); + } + $this->container['threeDSRequestorURL'] = $threeDSRequestorURL; + + return $this; + } + + /** + * Gets transType + * + * @return string|null + */ + public function getTransType() + { + return $this->container['transType']; + } + + /** + * Sets transType + * + * @param string|null $transType Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load + * + * @return self + */ + public function setTransType($transType) + { + if (is_null($transType)) { + throw new \InvalidArgumentException('non-nullable transType cannot be null'); + } + $allowedValues = $this->getTransTypeAllowableValues(); + if (!in_array($transType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'transType', must be one of '%s'", + $transType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['transType'] = $transType; + + return $this; + } + + /** + * Gets transactionType + * + * @return string|null + */ + public function getTransactionType() + { + return $this->container['transactionType']; + } + + /** + * Sets transactionType + * + * @param string|null $transactionType Identify the type of the transaction being authenticated. + * + * @return self + */ + public function setTransactionType($transactionType) + { + if (is_null($transactionType)) { + throw new \InvalidArgumentException('non-nullable transactionType cannot be null'); + } + $allowedValues = $this->getTransactionTypeAllowableValues(); + if (!in_array($transactionType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'transactionType', must be one of '%s'", + $transactionType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['transactionType'] = $transactionType; + + return $this; + } + + /** + * Gets whiteListStatus + * + * @return string|null + */ + public function getWhiteListStatus() + { + return $this->container['whiteListStatus']; + } + + /** + * Sets whiteListStatus + * + * @param string|null $whiteListStatus The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. + * + * @return self + */ + public function setWhiteListStatus($whiteListStatus) + { + if (is_null($whiteListStatus)) { + throw new \InvalidArgumentException('non-nullable whiteListStatus cannot be null'); + } + $this->container['whiteListStatus'] = $whiteListStatus; + + return $this; + } + + /** + * Gets workPhone + * + * @return \Adyen\Model\Checkout\Phone|null + */ + public function getWorkPhone() + { + return $this->container['workPhone']; + } + + /** + * Sets workPhone + * + * @param \Adyen\Model\Checkout\Phone|null $workPhone workPhone + * + * @return self + */ + public function setWorkPhone($workPhone) + { + if (is_null($workPhone)) { + throw new \InvalidArgumentException('non-nullable workPhone cannot be null'); + } + $this->container['workPhone'] = $workPhone; + + 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/Checkout/ThreeDS2Result.php b/src/Adyen/Model/Checkout/ThreeDS2Result.php index 4fab4aa6e..7e4c19684 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2Result.php +++ b/src/Adyen/Model/Checkout/ThreeDS2Result.php @@ -47,12 +47,12 @@ class ThreeDS2Result implements ModelInterface, ArrayAccess, \JsonSerializable 'authenticationValue' => 'string', 'cavvAlgorithm' => 'string', 'challengeCancel' => 'string', - 'challengeIndicator' => 'string', 'dsTransID' => 'string', 'eci' => 'string', 'exemptionIndicator' => 'string', 'messageVersion' => 'string', 'riskScore' => 'string', + 'threeDSRequestorChallengeInd' => 'string', 'threeDSServerTransID' => 'string', 'timestamp' => 'string', 'transStatus' => 'string', @@ -71,12 +71,12 @@ class ThreeDS2Result implements ModelInterface, ArrayAccess, \JsonSerializable 'authenticationValue' => null, 'cavvAlgorithm' => null, 'challengeCancel' => null, - 'challengeIndicator' => null, 'dsTransID' => null, 'eci' => null, 'exemptionIndicator' => null, 'messageVersion' => null, 'riskScore' => null, + 'threeDSRequestorChallengeInd' => null, 'threeDSServerTransID' => null, 'timestamp' => null, 'transStatus' => null, @@ -93,12 +93,12 @@ class ThreeDS2Result implements ModelInterface, ArrayAccess, \JsonSerializable 'authenticationValue' => false, 'cavvAlgorithm' => false, 'challengeCancel' => false, - 'challengeIndicator' => false, 'dsTransID' => false, 'eci' => false, 'exemptionIndicator' => false, 'messageVersion' => false, 'riskScore' => false, + 'threeDSRequestorChallengeInd' => false, 'threeDSServerTransID' => false, 'timestamp' => false, 'transStatus' => false, @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool 'authenticationValue' => 'authenticationValue', 'cavvAlgorithm' => 'cavvAlgorithm', 'challengeCancel' => 'challengeCancel', - 'challengeIndicator' => 'challengeIndicator', 'dsTransID' => 'dsTransID', 'eci' => 'eci', 'exemptionIndicator' => 'exemptionIndicator', 'messageVersion' => 'messageVersion', 'riskScore' => 'riskScore', + 'threeDSRequestorChallengeInd' => 'threeDSRequestorChallengeInd', 'threeDSServerTransID' => 'threeDSServerTransID', 'timestamp' => 'timestamp', 'transStatus' => 'transStatus', @@ -217,12 +217,12 @@ public function isNullableSetToNull(string $property): bool 'authenticationValue' => 'setAuthenticationValue', 'cavvAlgorithm' => 'setCavvAlgorithm', 'challengeCancel' => 'setChallengeCancel', - 'challengeIndicator' => 'setChallengeIndicator', 'dsTransID' => 'setDsTransID', 'eci' => 'setEci', 'exemptionIndicator' => 'setExemptionIndicator', 'messageVersion' => 'setMessageVersion', 'riskScore' => 'setRiskScore', + 'threeDSRequestorChallengeInd' => 'setThreeDSRequestorChallengeInd', 'threeDSServerTransID' => 'setThreeDSServerTransID', 'timestamp' => 'setTimestamp', 'transStatus' => 'setTransStatus', @@ -239,12 +239,12 @@ public function isNullableSetToNull(string $property): bool 'authenticationValue' => 'getAuthenticationValue', 'cavvAlgorithm' => 'getCavvAlgorithm', 'challengeCancel' => 'getChallengeCancel', - 'challengeIndicator' => 'getChallengeIndicator', 'dsTransID' => 'getDsTransID', 'eci' => 'getEci', 'exemptionIndicator' => 'getExemptionIndicator', 'messageVersion' => 'getMessageVersion', 'riskScore' => 'getRiskScore', + 'threeDSRequestorChallengeInd' => 'getThreeDSRequestorChallengeInd', 'threeDSServerTransID' => 'getThreeDSServerTransID', 'timestamp' => 'getTimestamp', 'transStatus' => 'getTransStatus', @@ -300,14 +300,16 @@ public function getModelName() public const CHALLENGE_CANCEL__05 = '05'; public const CHALLENGE_CANCEL__06 = '06'; public const CHALLENGE_CANCEL__07 = '07'; - public const CHALLENGE_INDICATOR_NO_PREFERENCE = 'noPreference'; - public const CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE = 'requestNoChallenge'; - public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE = 'requestChallenge'; - public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE = 'requestChallengeAsMandate'; public const EXEMPTION_INDICATOR_LOW_VALUE = 'lowValue'; public const EXEMPTION_INDICATOR_SECURE_CORPORATE = 'secureCorporate'; public const EXEMPTION_INDICATOR_TRUSTED_BENEFICIARY = 'trustedBeneficiary'; public const EXEMPTION_INDICATOR_TRANSACTION_RISK_ANALYSIS = 'transactionRiskAnalysis'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__01 = '01'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__02 = '02'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__03 = '03'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__04 = '04'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__05 = '05'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__06 = '06'; /** * Gets allowable values of the enum @@ -331,13 +333,13 @@ public function getChallengeCancelAllowableValues() * * @return string[] */ - public function getChallengeIndicatorAllowableValues() + public function getExemptionIndicatorAllowableValues() { return [ - self::CHALLENGE_INDICATOR_NO_PREFERENCE, - self::CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE, - self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE, - self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE, + self::EXEMPTION_INDICATOR_LOW_VALUE, + self::EXEMPTION_INDICATOR_SECURE_CORPORATE, + self::EXEMPTION_INDICATOR_TRUSTED_BENEFICIARY, + self::EXEMPTION_INDICATOR_TRANSACTION_RISK_ANALYSIS, ]; } /** @@ -345,13 +347,15 @@ public function getChallengeIndicatorAllowableValues() * * @return string[] */ - public function getExemptionIndicatorAllowableValues() + public function getThreeDSRequestorChallengeIndAllowableValues() { return [ - self::EXEMPTION_INDICATOR_LOW_VALUE, - self::EXEMPTION_INDICATOR_SECURE_CORPORATE, - self::EXEMPTION_INDICATOR_TRUSTED_BENEFICIARY, - self::EXEMPTION_INDICATOR_TRANSACTION_RISK_ANALYSIS, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__01, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__02, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__03, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__04, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__05, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__06, ]; } /** @@ -372,12 +376,12 @@ public function __construct(array $data = null) $this->setIfExists('authenticationValue', $data ?? [], null); $this->setIfExists('cavvAlgorithm', $data ?? [], null); $this->setIfExists('challengeCancel', $data ?? [], null); - $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('dsTransID', $data ?? [], null); $this->setIfExists('eci', $data ?? [], null); $this->setIfExists('exemptionIndicator', $data ?? [], null); $this->setIfExists('messageVersion', $data ?? [], null); $this->setIfExists('riskScore', $data ?? [], null); + $this->setIfExists('threeDSRequestorChallengeInd', $data ?? [], null); $this->setIfExists('threeDSServerTransID', $data ?? [], null); $this->setIfExists('timestamp', $data ?? [], null); $this->setIfExists('transStatus', $data ?? [], null); @@ -421,20 +425,20 @@ public function listInvalidProperties() ); } - $allowedValues = $this->getChallengeIndicatorAllowableValues(); - if (!is_null($this->container['challengeIndicator']) && !in_array($this->container['challengeIndicator'], $allowedValues, true)) { + $allowedValues = $this->getExemptionIndicatorAllowableValues(); + if (!is_null($this->container['exemptionIndicator']) && !in_array($this->container['exemptionIndicator'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'challengeIndicator', must be one of '%s'", - $this->container['challengeIndicator'], + "invalid value '%s' for 'exemptionIndicator', must be one of '%s'", + $this->container['exemptionIndicator'], implode("', '", $allowedValues) ); } - $allowedValues = $this->getExemptionIndicatorAllowableValues(); - if (!is_null($this->container['exemptionIndicator']) && !in_array($this->container['exemptionIndicator'], $allowedValues, true)) { + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); + if (!is_null($this->container['threeDSRequestorChallengeInd']) && !in_array($this->container['threeDSRequestorChallengeInd'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'exemptionIndicator', must be one of '%s'", - $this->container['exemptionIndicator'], + "invalid value '%s' for 'threeDSRequestorChallengeInd', must be one of '%s'", + $this->container['threeDSRequestorChallengeInd'], implode("', '", $allowedValues) ); } @@ -545,43 +549,6 @@ public function setChallengeCancel($challengeCancel) return $this; } - /** - * Gets challengeIndicator - * - * @return string|null - */ - public function getChallengeIndicator() - { - return $this->container['challengeIndicator']; - } - - /** - * Sets challengeIndicator - * - * @param string|null $challengeIndicator Specifies a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - * - * @return self - */ - public function setChallengeIndicator($challengeIndicator) - { - if (is_null($challengeIndicator)) { - throw new \InvalidArgumentException('non-nullable challengeIndicator cannot be null'); - } - $allowedValues = $this->getChallengeIndicatorAllowableValues(); - if (!in_array($challengeIndicator, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'challengeIndicator', must be one of '%s'", - $challengeIndicator, - implode("', '", $allowedValues) - ) - ); - } - $this->container['challengeIndicator'] = $challengeIndicator; - - return $this; - } - /** * Gets dsTransID * @@ -727,6 +694,43 @@ public function setRiskScore($riskScore) return $this; } + /** + * Gets threeDSRequestorChallengeInd + * + * @return string|null + */ + public function getThreeDSRequestorChallengeInd() + { + return $this->container['threeDSRequestorChallengeInd']; + } + + /** + * Sets threeDSRequestorChallengeInd + * + * @param string|null $threeDSRequestorChallengeInd Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only + * + * @return self + */ + public function setThreeDSRequestorChallengeInd($threeDSRequestorChallengeInd) + { + if (is_null($threeDSRequestorChallengeInd)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorChallengeInd cannot be null'); + } + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); + if (!in_array($threeDSRequestorChallengeInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'threeDSRequestorChallengeInd', must be one of '%s'", + $threeDSRequestorChallengeInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['threeDSRequestorChallengeInd'] = $threeDSRequestorChallengeInd; + + return $this; + } + /** * Gets threeDSServerTransID * diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestData.php b/src/Adyen/Model/Checkout/ThreeDSRequestData.php index 8dafba716..f292fc144 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestData.php @@ -241,8 +241,8 @@ public function getModelName() public const DATA_ONLY_FALSE = 'false'; public const DATA_ONLY_TRUE = 'true'; public const NATIVE_THREE_DS_PREFERRED = 'preferred'; - public const THREE_DS_VERSION__1_0 = '2.1.0'; - public const THREE_DS_VERSION__2_0 = '2.2.0'; + public const THREE_DS_VERSION__1_0 = 'V_2_1_0'; + public const THREE_DS_VERSION__2_0 = 'V_2_2_0'; /** * Gets allowable values of the enum diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php index 28c363746..acbabd33e 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php @@ -268,6 +268,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['acceptedBy'] === null) { + $invalidProperties[] = "'acceptedBy' can't be null"; + } return $invalidProperties; } @@ -286,7 +289,7 @@ public function valid() /** * Gets acceptedBy * - * @return string|null + * @return string */ public function getAcceptedBy() { @@ -296,7 +299,7 @@ public function getAcceptedBy() /** * Sets acceptedBy * - * @param string|null $acceptedBy The unique identifier of the user accepting the Terms of Service. + * @param string $acceptedBy The unique identifier of the user accepting the Terms of Service. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Address.php b/src/Adyen/Model/LegalEntityManagement/Address.php index f789fbd1e..f08cb68ee 100644 --- a/src/Adyen/Model/LegalEntityManagement/Address.php +++ b/src/Adyen/Model/LegalEntityManagement/Address.php @@ -408,7 +408,7 @@ public function getStateOrProvince() /** * Sets stateOrProvince * - * @param string|null $stateOrProvince The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. + * @param string|null $stateOrProvince The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 2dd02ccb8..77b637fd6 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -46,7 +46,8 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'accountIdentification' => '\Adyen\Model\LegalEntityManagement\BankAccount', 'accountType' => 'string', - 'countryCode' => 'string' + 'countryCode' => 'string', + 'trustedSource' => 'bool' ]; /** @@ -59,7 +60,8 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'accountIdentification' => null, 'accountType' => null, - 'countryCode' => null + 'countryCode' => null, + 'trustedSource' => null ]; /** @@ -70,7 +72,8 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'accountIdentification' => false, 'accountType' => false, - 'countryCode' => false + 'countryCode' => false, + 'trustedSource' => false ]; /** @@ -161,7 +164,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountIdentification' => 'accountIdentification', 'accountType' => 'accountType', - 'countryCode' => 'countryCode' + 'countryCode' => 'countryCode', + 'trustedSource' => 'trustedSource' ]; /** @@ -172,7 +176,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountIdentification' => 'setAccountIdentification', 'accountType' => 'setAccountType', - 'countryCode' => 'setCountryCode' + 'countryCode' => 'setCountryCode', + 'trustedSource' => 'setTrustedSource' ]; /** @@ -183,7 +188,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountIdentification' => 'getAccountIdentification', 'accountType' => 'getAccountType', - 'countryCode' => 'getCountryCode' + 'countryCode' => 'getCountryCode', + 'trustedSource' => 'getTrustedSource' ]; /** @@ -246,6 +252,7 @@ public function __construct(array $data = null) $this->setIfExists('accountIdentification', $data ?? [], null); $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('countryCode', $data ?? [], null); + $this->setIfExists('trustedSource', $data ?? [], null); } /** @@ -372,6 +379,33 @@ public function setCountryCode($countryCode) return $this; } + + /** + * Gets trustedSource + * + * @return bool|null + */ + public function getTrustedSource() + { + return $this->container['trustedSource']; + } + + /** + * Sets trustedSource + * + * @param bool|null $trustedSource Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). + * + * @return self + */ + public function setTrustedSource($trustedSource) + { + if (is_null($trustedSource)) { + throw new \InvalidArgumentException('non-nullable trustedSource cannot be null'); + } + $this->container['trustedSource'] = $trustedSource; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 425ba8aff..159ded8ec 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -269,10 +269,26 @@ public function getModelName() return self::$openAPIModelName; } + public const CAPABILITY_RECEIVE_PAYMENTS = 'receivePayments'; + public const CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; + public const CAPABILITY_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; public const SERVICE_PAYMENT_PROCESSING = 'paymentProcessing'; public const SERVICE_ISSUING = 'issuing'; public const SERVICE_BANKING = 'banking'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilityAllowableValues() + { + return [ + self::CAPABILITY_RECEIVE_PAYMENTS, + self::CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITY_ISSUE_BANK_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -340,6 +356,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCapabilityAllowableValues(); + if (!is_null($this->container['capability']) && !in_array($this->container['capability'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'capability', must be one of '%s'", + $this->container['capability'], + implode("', '", $allowedValues) + ); + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } @@ -390,7 +415,7 @@ public function getCapability() /** * Sets capability * - * @param string|null $capability The capability for which you are creating the business line. For example, **receivePayments**. + * @param string|null $capability The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** * * @return self * @deprecated @@ -400,6 +425,16 @@ public function setCapability($capability) if (is_null($capability)) { throw new \InvalidArgumentException('non-nullable capability cannot be null'); } + $allowedValues = $this->getCapabilityAllowableValues(); + if (!in_array($capability, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'capability', must be one of '%s'", + $capability, + implode("', '", $allowedValues) + ) + ); + } $this->container['capability'] = $capability; return $this; @@ -553,7 +588,7 @@ public function getService() /** * Sets service * - * @param string $service The service for which you are creating the business line. Possible values:**paymentProcessing**, **issuing**, **banking** + * @param string $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index a4c57ddae..e1fef84c8 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -257,10 +257,26 @@ public function getModelName() return self::$openAPIModelName; } + public const CAPABILITY_RECEIVE_PAYMENTS = 'receivePayments'; + public const CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; + public const CAPABILITY_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; public const SERVICE_PAYMENT_PROCESSING = 'paymentProcessing'; public const SERVICE_ISSUING = 'issuing'; public const SERVICE_BANKING = 'banking'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilityAllowableValues() + { + return [ + self::CAPABILITY_RECEIVE_PAYMENTS, + self::CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITY_ISSUE_BANK_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -326,6 +342,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCapabilityAllowableValues(); + if (!is_null($this->container['capability']) && !in_array($this->container['capability'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'capability', must be one of '%s'", + $this->container['capability'], + implode("', '", $allowedValues) + ); + } + if ($this->container['industryCode'] === null) { $invalidProperties[] = "'industryCode' can't be null"; } @@ -373,7 +398,7 @@ public function getCapability() /** * Sets capability * - * @param string|null $capability The capability for which you are creating the business line. For example, **receivePayments**. + * @param string|null $capability The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** * * @return self * @deprecated @@ -383,6 +408,16 @@ public function setCapability($capability) if (is_null($capability)) { throw new \InvalidArgumentException('non-nullable capability cannot be null'); } + $allowedValues = $this->getCapabilityAllowableValues(); + if (!in_array($capability, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'capability', must be one of '%s'", + $capability, + implode("', '", $allowedValues) + ) + ); + } $this->container['capability'] = $capability; return $this; @@ -482,7 +517,7 @@ public function getService() /** * Sets service * - * @param string $service The service for which you are creating the business line. Possible values:**paymentProcessing**, **issuing**, **banking** + * @param string $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php index f31318638..2329225c2 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php @@ -257,10 +257,26 @@ public function getModelName() return self::$openAPIModelName; } + public const CAPABILITY_RECEIVE_PAYMENTS = 'receivePayments'; + public const CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; + public const CAPABILITY_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; public const SERVICE_PAYMENT_PROCESSING = 'paymentProcessing'; public const SERVICE_ISSUING = 'issuing'; public const SERVICE_BANKING = 'banking'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilityAllowableValues() + { + return [ + self::CAPABILITY_RECEIVE_PAYMENTS, + self::CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITY_ISSUE_BANK_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -326,6 +342,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCapabilityAllowableValues(); + if (!is_null($this->container['capability']) && !in_array($this->container['capability'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'capability', must be one of '%s'", + $this->container['capability'], + implode("', '", $allowedValues) + ); + } + if ($this->container['service'] === null) { $invalidProperties[] = "'service' can't be null"; } @@ -377,6 +402,16 @@ public function setCapability($capability) if (is_null($capability)) { throw new \InvalidArgumentException('non-nullable capability cannot be null'); } + $allowedValues = $this->getCapabilityAllowableValues(); + if (!in_array($capability, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'capability', must be one of '%s'", + $capability, + implode("', '", $allowedValues) + ) + ); + } $this->container['capability'] = $capability; return $this; @@ -476,7 +511,7 @@ public function getService() /** * Sets service * - * @param string $service The service for which you are creating the business line. Possible values:**paymentProcessing**, **issuing**, **banking** + * @param string $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php new file mode 100644 index 000000000..29fe6bdf3 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php @@ -0,0 +1,417 @@ + + */ +class CalculateTermsOfServiceStatusResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CalculateTermsOfServiceStatusResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'termsOfServiceTypes' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'termsOfServiceTypes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'termsOfServiceTypes' => 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 = [ + 'termsOfServiceTypes' => 'termsOfServiceTypes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'termsOfServiceTypes' => 'setTermsOfServiceTypes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'termsOfServiceTypes' => 'getTermsOfServiceTypes' + ]; + + /** + * 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 TERMS_OF_SERVICE_TYPES_ADYEN_ACCOUNT = 'adyenAccount'; + public const TERMS_OF_SERVICE_TYPES_ADYEN_CAPITAL = 'adyenCapital'; + public const TERMS_OF_SERVICE_TYPES_ADYEN_CARD = 'adyenCard'; + public const TERMS_OF_SERVICE_TYPES_ADYEN_FOR_PLATFORMS_ADVANCED = 'adyenForPlatformsAdvanced'; + public const TERMS_OF_SERVICE_TYPES_ADYEN_FOR_PLATFORMS_MANAGE = 'adyenForPlatformsManage'; + public const TERMS_OF_SERVICE_TYPES_ADYEN_FRANCHISEE = 'adyenFranchisee'; + public const TERMS_OF_SERVICE_TYPES_ADYEN_ISSUING = 'adyenIssuing'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTermsOfServiceTypesAllowableValues() + { + return [ + self::TERMS_OF_SERVICE_TYPES_ADYEN_ACCOUNT, + self::TERMS_OF_SERVICE_TYPES_ADYEN_CAPITAL, + self::TERMS_OF_SERVICE_TYPES_ADYEN_CARD, + self::TERMS_OF_SERVICE_TYPES_ADYEN_FOR_PLATFORMS_ADVANCED, + self::TERMS_OF_SERVICE_TYPES_ADYEN_FOR_PLATFORMS_MANAGE, + self::TERMS_OF_SERVICE_TYPES_ADYEN_FRANCHISEE, + self::TERMS_OF_SERVICE_TYPES_ADYEN_ISSUING, + ]; + } + /** + * 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('termsOfServiceTypes', $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 termsOfServiceTypes + * + * @return string[]|null + */ + public function getTermsOfServiceTypes() + { + return $this->container['termsOfServiceTypes']; + } + + /** + * Sets termsOfServiceTypes + * + * @param string[]|null $termsOfServiceTypes The type of Terms of Service that the legal entity needs to accept. If empty, no Terms of Service needs to be accepted. + * + * @return self + */ + public function setTermsOfServiceTypes($termsOfServiceTypes) + { + if (is_null($termsOfServiceTypes)) { + throw new \InvalidArgumentException('non-nullable termsOfServiceTypes cannot be null'); + } + $allowedValues = $this->getTermsOfServiceTypesAllowableValues(); + if (array_diff($termsOfServiceTypes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'termsOfServiceTypes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['termsOfServiceTypes'] = $termsOfServiceTypes; + + 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/LegalEntityManagement/CapabilityProblemEntity.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php index 05a427816..ae97db0fd 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php @@ -236,6 +236,7 @@ public function getModelName() public const TYPE_BANK_ACCOUNT = 'BankAccount'; public const TYPE_DOCUMENT = 'Document'; public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + public const TYPE_PRODUCT = 'product'; /** * Gets allowable values of the enum @@ -248,6 +249,7 @@ public function getTypeAllowableValues() self::TYPE_BANK_ACCOUNT, self::TYPE_DOCUMENT, self::TYPE_LEGAL_ENTITY, + self::TYPE_PRODUCT, ]; } /** diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php index 9e270d4d5..f8ddbbc68 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php @@ -230,6 +230,7 @@ public function getModelName() public const TYPE_BANK_ACCOUNT = 'BankAccount'; public const TYPE_DOCUMENT = 'Document'; public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + public const TYPE_PRODUCT = 'product'; /** * Gets allowable values of the enum @@ -242,6 +243,7 @@ public function getTypeAllowableValues() self::TYPE_BANK_ACCOUNT, self::TYPE_DOCUMENT, self::TYPE_LEGAL_ENTITY, + self::TYPE_PRODUCT, ]; } /** diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 7ce1199d3..77f0c3945 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -300,6 +300,7 @@ public function getModelName() public const TYPE_PROOF_OF_ORGANIZATION_TAX_INFO = 'proofOfOrganizationTaxInfo'; public const TYPE_PROOF_OF_INDUSTRY = 'proofOfIndustry'; public const TYPE_CONSTITUTIONAL_DOCUMENT = 'constitutionalDocument'; + public const TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE = 'proofOfFundingOrWealthSource'; /** * Gets allowable values of the enum @@ -322,6 +323,7 @@ public function getTypeAllowableValues() self::TYPE_PROOF_OF_ORGANIZATION_TAX_INFO, self::TYPE_PROOF_OF_INDUSTRY, self::TYPE_CONSTITUTIONAL_DOCUMENT, + self::TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE, ]; } /** @@ -760,7 +762,7 @@ public function getType() /** * Sets type * - * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, or **proofOfIndustry**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, or **proofOfIndividualTaxId**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @return self */ diff --git a/src/Adyen/Model/Management/ShopperStatement.php b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php similarity index 82% rename from src/Adyen/Model/Management/ShopperStatement.php rename to src/Adyen/Model/LegalEntityManagement/DocumentPage.php index f310117ff..bffbfc865 100644 --- a/src/Adyen/Model/Management/ShopperStatement.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php @@ -1,9 +1,9 @@ */ -class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentPage implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'ShopperStatement'; + protected static $openAPIModelName = 'DocumentPage'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,7 +44,8 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'doingBusinessAsName' => 'string', + 'pageName' => 'string', + 'pageNumber' => 'int', 'type' => 'string' ]; @@ -56,7 +57,8 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'doingBusinessAsName' => null, + 'pageName' => null, + 'pageNumber' => 'int32', 'type' => null ]; @@ -66,7 +68,8 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'doingBusinessAsName' => false, + 'pageName' => false, + 'pageNumber' => true, 'type' => false ]; @@ -156,7 +159,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'doingBusinessAsName' => 'doingBusinessAsName', + 'pageName' => 'pageName', + 'pageNumber' => 'pageNumber', 'type' => 'type' ]; @@ -166,7 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'doingBusinessAsName' => 'setDoingBusinessAsName', + 'pageName' => 'setPageName', + 'pageNumber' => 'setPageNumber', 'type' => 'setType' ]; @@ -176,7 +181,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'doingBusinessAsName' => 'getDoingBusinessAsName', + 'pageName' => 'getPageName', + 'pageNumber' => 'getPageNumber', 'type' => 'getType' ]; @@ -221,9 +227,9 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_APPEND = 'append'; - public const TYPE_DYNAMIC = 'dynamic'; - public const TYPE_FIXED = 'fixed'; + public const TYPE_BACK = 'BACK'; + public const TYPE_FRONT = 'FRONT'; + public const TYPE_UNDEFINED = 'UNDEFINED'; /** * Gets allowable values of the enum @@ -233,9 +239,9 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_APPEND, - self::TYPE_DYNAMIC, - self::TYPE_FIXED, + self::TYPE_BACK, + self::TYPE_FRONT, + self::TYPE_UNDEFINED, ]; } /** @@ -253,8 +259,9 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('doingBusinessAsName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dynamic'); + $this->setIfExists('pageName', $data ?? [], null); + $this->setIfExists('pageNumber', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -309,28 +316,53 @@ public function valid() /** - * Gets doingBusinessAsName + * Gets pageName * * @return string|null */ - public function getDoingBusinessAsName() + public function getPageName() { - return $this->container['doingBusinessAsName']; + return $this->container['pageName']; } /** - * Sets doingBusinessAsName + * Sets pageName * - * @param string|null $doingBusinessAsName The name you want to be shown on the shopper's bank or credit card statement. Can't be all numbers. If a shopper statement is present, this field is required. + * @param string|null $pageName pageName * * @return self */ - public function setDoingBusinessAsName($doingBusinessAsName) + public function setPageName($pageName) { - if (is_null($doingBusinessAsName)) { - throw new \InvalidArgumentException('non-nullable doingBusinessAsName cannot be null'); + if (is_null($pageName)) { + throw new \InvalidArgumentException('non-nullable pageName cannot be null'); } - $this->container['doingBusinessAsName'] = $doingBusinessAsName; + $this->container['pageName'] = $pageName; + + return $this; + } + + /** + * Gets pageNumber + * + * @return int|null + */ + public function getPageNumber() + { + return $this->container['pageNumber']; + } + + /** + * Sets pageNumber + * + * @param int|null $pageNumber pageNumber + * + * @return self + */ + public function setPageNumber($pageNumber) + { + // Do nothing for nullable integers + $this->container['pageNumber'] = $pageNumber; return $this; } @@ -348,7 +380,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of shopperstatement you want to use: fixed, append or dynamic + * @param string|null $type type * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php index 98f0ecfed..5a71d1d70 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php @@ -49,6 +49,7 @@ class DocumentReference implements ModelInterface, ArrayAccess, \JsonSerializabl 'fileName' => 'string', 'id' => 'string', 'modificationDate' => '\DateTime', + 'pages' => '\Adyen\Model\LegalEntityManagement\DocumentPage[]', 'type' => 'string' ]; @@ -65,6 +66,7 @@ class DocumentReference implements ModelInterface, ArrayAccess, \JsonSerializabl 'fileName' => null, 'id' => null, 'modificationDate' => 'date-time', + 'pages' => null, 'type' => null ]; @@ -79,6 +81,7 @@ class DocumentReference implements ModelInterface, ArrayAccess, \JsonSerializabl 'fileName' => false, 'id' => false, 'modificationDate' => false, + 'pages' => false, 'type' => false ]; @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool 'fileName' => 'fileName', 'id' => 'id', 'modificationDate' => 'modificationDate', + 'pages' => 'pages', 'type' => 'type' ]; @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'fileName' => 'setFileName', 'id' => 'setId', 'modificationDate' => 'setModificationDate', + 'pages' => 'setPages', 'type' => 'setType' ]; @@ -201,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'fileName' => 'getFileName', 'id' => 'getId', 'modificationDate' => 'getModificationDate', + 'pages' => 'getPages', 'type' => 'getType' ]; @@ -266,6 +272,7 @@ public function __construct(array $data = null) $this->setIfExists('fileName', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('modificationDate', $data ?? [], null); + $this->setIfExists('pages', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -446,6 +453,33 @@ public function setModificationDate($modificationDate) return $this; } + /** + * Gets pages + * + * @return \Adyen\Model\LegalEntityManagement\DocumentPage[]|null + */ + public function getPages() + { + return $this->container['pages']; + } + + /** + * Sets pages + * + * @param \Adyen\Model\LegalEntityManagement\DocumentPage[]|null $pages List of document pages + * + * @return self + */ + public function setPages($pages) + { + if (is_null($pages)) { + throw new \InvalidArgumentException('non-nullable pages cannot be null'); + } + $this->container['pages'] = $pages; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 47db1b652..8791221cb 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -264,6 +264,7 @@ public function getModelName() public const TYPE_PROOF_OF_ORGANIZATION_TAX_INFO = 'proofOfOrganizationTaxInfo'; public const TYPE_PROOF_OF_INDUSTRY = 'proofOfIndustry'; public const TYPE_CONSTITUTIONAL_DOCUMENT = 'constitutionalDocument'; + public const TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE = 'proofOfFundingOrWealthSource'; /** * Gets allowable values of the enum @@ -286,6 +287,7 @@ public function getTypeAllowableValues() self::TYPE_PROOF_OF_ORGANIZATION_TAX_INFO, self::TYPE_PROOF_OF_INDUSTRY, self::TYPE_CONSTITUTIONAL_DOCUMENT, + self::TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE, ]; } /** @@ -545,7 +547,7 @@ public function getType() /** * Sets type * - * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, or **proofOfIndustry**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, or **proofOfIndividualTaxId**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 38c41fae1..6e5fd33a6 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -55,7 +55,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'transferInstruments' => '\Adyen\Model\LegalEntityManagement\TransferInstrumentReference[]', - 'type' => 'string' + 'type' => 'string', + 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]' ]; /** @@ -77,7 +78,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => null, 'soleProprietorship' => null, 'transferInstruments' => null, - 'type' => null + 'type' => null, + 'verificationDeadlines' => null ]; /** @@ -97,7 +99,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => false, 'soleProprietorship' => false, 'transferInstruments' => false, - 'type' => false + 'type' => false, + 'verificationDeadlines' => false ]; /** @@ -197,7 +200,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', 'transferInstruments' => 'transferInstruments', - 'type' => 'type' + 'type' => 'type', + 'verificationDeadlines' => 'verificationDeadlines' ]; /** @@ -217,7 +221,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', 'transferInstruments' => 'setTransferInstruments', - 'type' => 'setType' + 'type' => 'setType', + 'verificationDeadlines' => 'setVerificationDeadlines' ]; /** @@ -237,7 +242,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', 'transferInstruments' => 'getTransferInstruments', - 'type' => 'getType' + 'type' => 'getType', + 'verificationDeadlines' => 'getVerificationDeadlines' ]; /** @@ -329,6 +335,7 @@ public function __construct(array $data = null) $this->setIfExists('soleProprietorship', $data ?? [], null); $this->setIfExists('transferInstruments', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('verificationDeadlines', $data ?? [], null); } /** @@ -720,6 +727,33 @@ public function setType($type) return $this; } + + /** + * Gets verificationDeadlines + * + * @return \Adyen\Model\LegalEntityManagement\VerificationDeadline[]|null + */ + public function getVerificationDeadlines() + { + return $this->container['verificationDeadlines']; + } + + /** + * Sets verificationDeadlines + * + * @param \Adyen\Model\LegalEntityManagement\VerificationDeadline[]|null $verificationDeadlines List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. + * + * @return self + */ + public function setVerificationDeadlines($verificationDeadlines) + { + if (is_null($verificationDeadlines)) { + throw new \InvalidArgumentException('non-nullable verificationDeadlines cannot be null'); + } + $this->container['verificationDeadlines'] = $verificationDeadlines; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 58c973242..012921e27 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -388,7 +388,7 @@ public function getEntityType() /** * Sets entityType * - * @param string|null $entityType The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. + * @param string|null $entityType The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. * * @return self */ @@ -496,7 +496,7 @@ public function getType() /** * Sets type * - * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. + * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index e8b527cdb..146f08123 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -364,7 +364,7 @@ public function getSettings() /** * Sets settings * - * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. By default, the values are set to **true**. Set to **false** to not allow the action. Possible keys: - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. + * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index d0a7b4191..329d5ba48 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -778,7 +778,7 @@ public function getType() /** * Sets type * - * @param string|null $type Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. + * @param string|null $type Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php new file mode 100644 index 000000000..bf7536380 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php @@ -0,0 +1,489 @@ + + */ +class SGLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SGLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'bic' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountNumber' => null, + 'bic' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'bic' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'accountNumber' => 'accountNumber', + 'bic' => 'bic', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bic' => 'setBic', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'bic' => 'getBic', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_SG_LOCAL = 'sgLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_SG_LOCAL, + ]; + } + /** + * 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('accountNumber', $data ?? [], null); + $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'sgLocal'); + } + + /** + * 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['accountNumber'] === null) { + $invalidProperties[] = "'accountNumber' can't be null"; + } + if ($this->container['bic'] === null) { + $invalidProperties[] = "'bic' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets accountNumber + * + * @return string + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string $accountNumber The 4- to 19-digit bank account number, without separators or whitespace. + * + * @return self + */ + public function setAccountNumber($accountNumber) + { + if (is_null($accountNumber)) { + throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); + } + $this->container['accountNumber'] = $accountNumber; + + return $this; + } + + /** + * Gets bic + * + * @return string + */ + public function getBic() + { + return $this->container['bic']; + } + + /** + * Sets bic + * + * @param string $bic The bank's 8- or 11-character BIC or SWIFT code. + * + * @return self + */ + public function setBic($bic) + { + if (is_null($bic)) { + throw new \InvalidArgumentException('non-nullable bic cannot be null'); + } + $this->container['bic'] = $bic; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **sgLocal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * 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/LegalEntityManagement/TransferInstrumentReference.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php index 1c0bc8b4c..45c3b7437 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php @@ -397,7 +397,7 @@ public function getTrustedSource() /** * Sets trustedSource * - * @param bool|null $trustedSource Identifies if the TI was created from a trusted source. + * @param bool|null $trustedSource Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php new file mode 100644 index 000000000..6beca55c7 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php @@ -0,0 +1,543 @@ + + */ +class VerificationDeadline implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VerificationDeadline'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'capabilities' => 'string[]', + 'expiresAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'capabilities' => null, + 'expiresAt' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'expiresAt' => 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 = [ + 'capabilities' => 'capabilities', + 'expiresAt' => 'expiresAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'expiresAt' => 'setExpiresAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'expiresAt' => 'getExpiresAt' + ]; + + /** + * 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 CAPABILITIES_ACCEPT_EXTERNAL_FUNDING = 'acceptExternalFunding'; + public const CAPABILITIES_ACCEPT_PSP_FUNDING = 'acceptPspFunding'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES = 'acceptTransactionInRestrictedCountries'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'acceptTransactionInRestrictedCountriesCommercial'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_CONSUMER = 'acceptTransactionInRestrictedCountriesConsumer'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES = 'acceptTransactionInRestrictedIndustries'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_COMMERCIAL = 'acceptTransactionInRestrictedIndustriesCommercial'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_CONSUMER = 'acceptTransactionInRestrictedIndustriesConsumer'; + public const CAPABILITIES_ACQUIRING = 'acquiring'; + public const CAPABILITIES_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const CAPABILITIES_ATM_WITHDRAWAL_COMMERCIAL = 'atmWithdrawalCommercial'; + public const CAPABILITIES_ATM_WITHDRAWAL_CONSUMER = 'atmWithdrawalConsumer'; + public const CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES = 'atmWithdrawalInRestrictedCountries'; + public const CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'atmWithdrawalInRestrictedCountriesCommercial'; + public const CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_CONSUMER = 'atmWithdrawalInRestrictedCountriesConsumer'; + public const CAPABILITIES_AUTHORISED_PAYMENT_INSTRUMENT_USER = 'authorisedPaymentInstrumentUser'; + public const CAPABILITIES_GET_GRANT_OFFERS = 'getGrantOffers'; + public const CAPABILITIES_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; + public const CAPABILITIES_ISSUE_CARD = 'issueCard'; + public const CAPABILITIES_ISSUE_CARD_COMMERCIAL = 'issueCardCommercial'; + public const CAPABILITIES_ISSUE_CARD_CONSUMER = 'issueCardConsumer'; + public const CAPABILITIES_LOCAL_ACCEPTANCE = 'localAcceptance'; + public const CAPABILITIES_PAYOUT = 'payout'; + public const CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT = 'payoutToTransferInstrument'; + public const CAPABILITIES_PROCESSING = 'processing'; + public const CAPABILITIES_RECEIVE_FROM_BALANCE_ACCOUNT = 'receiveFromBalanceAccount'; + public const CAPABILITIES_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; + public const CAPABILITIES_RECEIVE_FROM_THIRD_PARTY = 'receiveFromThirdParty'; + public const CAPABILITIES_RECEIVE_FROM_TRANSFER_INSTRUMENT = 'receiveFromTransferInstrument'; + public const CAPABILITIES_RECEIVE_GRANTS = 'receiveGrants'; + public const CAPABILITIES_RECEIVE_PAYMENTS = 'receivePayments'; + public const CAPABILITIES_SEND_TO_BALANCE_ACCOUNT = 'sendToBalanceAccount'; + public const CAPABILITIES_SEND_TO_THIRD_PARTY = 'sendToThirdParty'; + public const CAPABILITIES_SEND_TO_TRANSFER_INSTRUMENT = 'sendToTransferInstrument'; + public const CAPABILITIES_THIRD_PARTY_FUNDING = 'thirdPartyFunding'; + public const CAPABILITIES_USE_CARD = 'useCard'; + public const CAPABILITIES_USE_CARD_COMMERCIAL = 'useCardCommercial'; + public const CAPABILITIES_USE_CARD_CONSUMER = 'useCardConsumer'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES = 'useCardInRestrictedCountries'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'useCardInRestrictedCountriesCommercial'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_CONSUMER = 'useCardInRestrictedCountriesConsumer'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES = 'useCardInRestrictedIndustries'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_COMMERCIAL = 'useCardInRestrictedIndustriesCommercial'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_CONSUMER = 'useCardInRestrictedIndustriesConsumer'; + public const CAPABILITIES_WITHDRAW_FROM_ATM = 'withdrawFromAtm'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_COMMERCIAL = 'withdrawFromAtmCommercial'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_CONSUMER = 'withdrawFromAtmConsumer'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES = 'withdrawFromAtmInRestrictedCountries'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'withdrawFromAtmInRestrictedCountriesCommercial'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_CONSUMER = 'withdrawFromAtmInRestrictedCountriesConsumer'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilitiesAllowableValues() + { + return [ + self::CAPABILITIES_ACCEPT_EXTERNAL_FUNDING, + self::CAPABILITIES_ACCEPT_PSP_FUNDING, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_CONSUMER, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_COMMERCIAL, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_CONSUMER, + self::CAPABILITIES_ACQUIRING, + self::CAPABILITIES_ATM_WITHDRAWAL, + self::CAPABILITIES_ATM_WITHDRAWAL_COMMERCIAL, + self::CAPABILITIES_ATM_WITHDRAWAL_CONSUMER, + self::CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_CONSUMER, + self::CAPABILITIES_AUTHORISED_PAYMENT_INSTRUMENT_USER, + self::CAPABILITIES_GET_GRANT_OFFERS, + self::CAPABILITIES_ISSUE_BANK_ACCOUNT, + self::CAPABILITIES_ISSUE_CARD, + self::CAPABILITIES_ISSUE_CARD_COMMERCIAL, + self::CAPABILITIES_ISSUE_CARD_CONSUMER, + self::CAPABILITIES_LOCAL_ACCEPTANCE, + self::CAPABILITIES_PAYOUT, + self::CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT, + self::CAPABILITIES_PROCESSING, + self::CAPABILITIES_RECEIVE_FROM_BALANCE_ACCOUNT, + self::CAPABILITIES_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITIES_RECEIVE_FROM_THIRD_PARTY, + self::CAPABILITIES_RECEIVE_FROM_TRANSFER_INSTRUMENT, + self::CAPABILITIES_RECEIVE_GRANTS, + self::CAPABILITIES_RECEIVE_PAYMENTS, + self::CAPABILITIES_SEND_TO_BALANCE_ACCOUNT, + self::CAPABILITIES_SEND_TO_THIRD_PARTY, + self::CAPABILITIES_SEND_TO_TRANSFER_INSTRUMENT, + self::CAPABILITIES_THIRD_PARTY_FUNDING, + self::CAPABILITIES_USE_CARD, + self::CAPABILITIES_USE_CARD_COMMERCIAL, + self::CAPABILITIES_USE_CARD_CONSUMER, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_CONSUMER, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_COMMERCIAL, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_CONSUMER, + self::CAPABILITIES_WITHDRAW_FROM_ATM, + self::CAPABILITIES_WITHDRAW_FROM_ATM_COMMERCIAL, + self::CAPABILITIES_WITHDRAW_FROM_ATM_CONSUMER, + self::CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_CONSUMER, + ]; + } + /** + * 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('capabilities', $data ?? [], null); + $this->setIfExists('expiresAt', $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['capabilities'] === null) { + $invalidProperties[] = "'capabilities' can't be null"; + } + if ($this->container['expiresAt'] === null) { + $invalidProperties[] = "'expiresAt' 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 capabilities + * + * @return string[] + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param string[] $capabilities The names of the capabilities to be disallowed. + * + * @return self + */ + public function setCapabilities($capabilities) + { + if (is_null($capabilities)) { + throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); + } + $allowedValues = $this->getCapabilitiesAllowableValues(); + if (array_diff($capabilities, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'capabilities', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['capabilities'] = $capabilities; + + return $this; + } + + /** + * Gets expiresAt + * + * @return \DateTime + */ + public function getExpiresAt() + { + return $this->container['expiresAt']; + } + + /** + * Sets expiresAt + * + * @param \DateTime $expiresAt The date that verification is due by before capabilities are disallowed. + * + * @return self + */ + public function setExpiresAt($expiresAt) + { + if (is_null($expiresAt)) { + throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); + } + $this->container['expiresAt'] = $expiresAt; + + 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/LegalEntityManagement/VerificationError.php b/src/Adyen/Model/LegalEntityManagement/VerificationError.php index 5c1b6b8f3..886494472 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationError.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationError.php @@ -296,8 +296,10 @@ public function getModelName() public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'withdrawFromAtmInRestrictedCountriesCommercial'; public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_CONSUMER = 'withdrawFromAtmInRestrictedCountriesConsumer'; public const TYPE_DATA_MISSING = 'dataMissing'; + public const TYPE_DATA_REVIEW = 'dataReview'; public const TYPE_INVALID_INPUT = 'invalidInput'; public const TYPE_PENDING_STATUS = 'pendingStatus'; + public const TYPE_REJECTED = 'rejected'; /** * Gets allowable values of the enum @@ -368,8 +370,10 @@ public function getTypeAllowableValues() { return [ self::TYPE_DATA_MISSING, + self::TYPE_DATA_REVIEW, self::TYPE_INVALID_INPUT, self::TYPE_PENDING_STATUS, + self::TYPE_REJECTED, ]; } /** diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php index 443b6b3c9..2029f9c9d 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php @@ -290,8 +290,10 @@ public function getModelName() public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'withdrawFromAtmInRestrictedCountriesCommercial'; public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_CONSUMER = 'withdrawFromAtmInRestrictedCountriesConsumer'; public const TYPE_DATA_MISSING = 'dataMissing'; + public const TYPE_DATA_REVIEW = 'dataReview'; public const TYPE_INVALID_INPUT = 'invalidInput'; public const TYPE_PENDING_STATUS = 'pendingStatus'; + public const TYPE_REJECTED = 'rejected'; /** * Gets allowable values of the enum @@ -362,8 +364,10 @@ public function getTypeAllowableValues() { return [ self::TYPE_DATA_MISSING, + self::TYPE_DATA_REVIEW, self::TYPE_INVALID_INPUT, self::TYPE_PENDING_STATUS, + self::TYPE_REJECTED, ]; } /** diff --git a/src/Adyen/Model/Management/AdditionalCommission.php b/src/Adyen/Model/Management/AdditionalCommission.php new file mode 100644 index 000000000..7a8bc05a6 --- /dev/null +++ b/src/Adyen/Model/Management/AdditionalCommission.php @@ -0,0 +1,452 @@ + + */ +class AdditionalCommission implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalCommission'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balanceAccountId' => 'string', + 'fixedAmount' => 'int', + 'variablePercentage' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balanceAccountId' => null, + 'fixedAmount' => 'int64', + 'variablePercentage' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balanceAccountId' => false, + 'fixedAmount' => false, + 'variablePercentage' => 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 = [ + 'balanceAccountId' => 'balanceAccountId', + 'fixedAmount' => 'fixedAmount', + 'variablePercentage' => 'variablePercentage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balanceAccountId' => 'setBalanceAccountId', + 'fixedAmount' => 'setFixedAmount', + 'variablePercentage' => 'setVariablePercentage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balanceAccountId' => 'getBalanceAccountId', + 'fixedAmount' => 'getFixedAmount', + 'variablePercentage' => 'getVariablePercentage' + ]; + + /** + * 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('balanceAccountId', $data ?? [], null); + $this->setIfExists('fixedAmount', $data ?? [], null); + $this->setIfExists('variablePercentage', $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 balanceAccountId + * + * @return string|null + */ + public function getBalanceAccountId() + { + return $this->container['balanceAccountId']; + } + + /** + * Sets balanceAccountId + * + * @param string|null $balanceAccountId Unique identifier of the balance account to which the additional commission is booked. + * + * @return self + */ + public function setBalanceAccountId($balanceAccountId) + { + if (is_null($balanceAccountId)) { + throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); + } + $this->container['balanceAccountId'] = $balanceAccountId; + + return $this; + } + + /** + * Gets fixedAmount + * + * @return int|null + */ + public function getFixedAmount() + { + return $this->container['fixedAmount']; + } + + /** + * Sets fixedAmount + * + * @param int|null $fixedAmount A fixed commission fee, in minor units. + * + * @return self + */ + public function setFixedAmount($fixedAmount) + { + if (is_null($fixedAmount)) { + throw new \InvalidArgumentException('non-nullable fixedAmount cannot be null'); + } + $this->container['fixedAmount'] = $fixedAmount; + + return $this; + } + + /** + * Gets variablePercentage + * + * @return int|null + */ + public function getVariablePercentage() + { + return $this->container['variablePercentage']; + } + + /** + * Sets variablePercentage + * + * @param int|null $variablePercentage A variable commission fee, in basis points. + * + * @return self + */ + public function setVariablePercentage($variablePercentage) + { + if (is_null($variablePercentage)) { + throw new \InvalidArgumentException('non-nullable variablePercentage cannot be null'); + } + $this->container['variablePercentage'] = $variablePercentage; + + 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/AfterpayTouchInfo.php b/src/Adyen/Model/Management/AfterpayTouchInfo.php new file mode 100644 index 000000000..57591d5bf --- /dev/null +++ b/src/Adyen/Model/Management/AfterpayTouchInfo.php @@ -0,0 +1,387 @@ + + */ +class AfterpayTouchInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AfterpayTouchInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'supportUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'supportUrl' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'supportUrl' => 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 = [ + 'supportUrl' => 'supportUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'supportUrl' => 'setSupportUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'supportUrl' => 'getSupportUrl' + ]; + + /** + * 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('supportUrl', $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['supportUrl'] === null) { + $invalidProperties[] = "'supportUrl' 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 supportUrl + * + * @return string + */ + public function getSupportUrl() + { + return $this->container['supportUrl']; + } + + /** + * Sets supportUrl + * + * @param string $supportUrl Support Url + * + * @return self + */ + public function setSupportUrl($supportUrl) + { + if (is_null($supportUrl)) { + throw new \InvalidArgumentException('non-nullable supportUrl cannot be null'); + } + $this->container['supportUrl'] = $supportUrl; + + 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/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index 525eafe29..52361f9c4 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -418,7 +418,7 @@ public function getPackageName() /** * Sets packageName * - * @param string|null $packageName The package name of the app. + * @param string|null $packageName The package name that uniquely identifies the Android app. * * @return self */ @@ -472,7 +472,7 @@ public function getVersionCode() /** * Sets versionCode * - * @param int|null $versionCode The internal version number of the app. + * @param int|null $versionCode The version number of the app. * * @return self */ diff --git a/src/Adyen/Model/Management/ClearpayInfo.php b/src/Adyen/Model/Management/ClearpayInfo.php new file mode 100644 index 000000000..107e4072c --- /dev/null +++ b/src/Adyen/Model/Management/ClearpayInfo.php @@ -0,0 +1,387 @@ + + */ +class ClearpayInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ClearpayInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'supportUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'supportUrl' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'supportUrl' => 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 = [ + 'supportUrl' => 'supportUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'supportUrl' => 'setSupportUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'supportUrl' => 'getSupportUrl' + ]; + + /** + * 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('supportUrl', $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['supportUrl'] === null) { + $invalidProperties[] = "'supportUrl' 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 supportUrl + * + * @return string + */ + public function getSupportUrl() + { + return $this->container['supportUrl']; + } + + /** + * Sets supportUrl + * + * @param string $supportUrl Support Url + * + * @return self + */ + public function setSupportUrl($supportUrl) + { + if (is_null($supportUrl)) { + throw new \InvalidArgumentException('non-nullable supportUrl cannot be null'); + } + $this->container['supportUrl'] = $supportUrl; + + 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/Commission.php b/src/Adyen/Model/Management/Commission.php new file mode 100644 index 000000000..772378455 --- /dev/null +++ b/src/Adyen/Model/Management/Commission.php @@ -0,0 +1,418 @@ + + */ +class Commission implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Commission'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fixedAmount' => 'int', + 'variablePercentage' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fixedAmount' => 'int64', + 'variablePercentage' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'fixedAmount' => false, + 'variablePercentage' => 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 = [ + 'fixedAmount' => 'fixedAmount', + 'variablePercentage' => 'variablePercentage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fixedAmount' => 'setFixedAmount', + 'variablePercentage' => 'setVariablePercentage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fixedAmount' => 'getFixedAmount', + 'variablePercentage' => 'getVariablePercentage' + ]; + + /** + * 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('fixedAmount', $data ?? [], null); + $this->setIfExists('variablePercentage', $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 fixedAmount + * + * @return int|null + */ + public function getFixedAmount() + { + return $this->container['fixedAmount']; + } + + /** + * Sets fixedAmount + * + * @param int|null $fixedAmount A fixed commission fee, in minor units. + * + * @return self + */ + public function setFixedAmount($fixedAmount) + { + if (is_null($fixedAmount)) { + throw new \InvalidArgumentException('non-nullable fixedAmount cannot be null'); + } + $this->container['fixedAmount'] = $fixedAmount; + + return $this; + } + + /** + * Gets variablePercentage + * + * @return int|null + */ + public function getVariablePercentage() + { + return $this->container['variablePercentage']; + } + + /** + * Sets variablePercentage + * + * @param int|null $variablePercentage A variable commission fee, in basis points. + * + * @return self + */ + public function setVariablePercentage($variablePercentage) + { + if (is_null($variablePercentage)) { + throw new \InvalidArgumentException('non-nullable variablePercentage cannot be null'); + } + $this->container['variablePercentage'] = $variablePercentage; + + 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/CompanyUser.php b/src/Adyen/Model/Management/CompanyUser.php index 43309e5b6..e571929f9 100644 --- a/src/Adyen/Model/Management/CompanyUser.php +++ b/src/Adyen/Model/Management/CompanyUser.php @@ -47,8 +47,8 @@ class CompanyUser implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', + 'apps' => 'string[]', 'associatedMerchantAccounts' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -68,8 +68,8 @@ class CompanyUser implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => null, 'accountGroups' => null, 'active' => null, + 'apps' => null, 'associatedMerchantAccounts' => null, - 'authnApps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -87,8 +87,8 @@ class CompanyUser implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => false, 'accountGroups' => false, 'active' => false, + 'apps' => false, 'associatedMerchantAccounts' => false, - 'authnApps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -186,8 +186,8 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', + 'apps' => 'apps', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnApps' => 'authnApps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -205,8 +205,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', + 'apps' => 'setApps', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -224,8 +224,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', + 'apps' => 'getApps', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -294,8 +294,8 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -443,55 +443,55 @@ public function setActive($active) } /** - * Gets associatedMerchantAccounts + * Gets apps * * @return string[]|null */ - public function getAssociatedMerchantAccounts() + public function getApps() { - return $this->container['associatedMerchantAccounts']; + return $this->container['apps']; } /** - * Sets associatedMerchantAccounts + * Sets apps * - * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAssociatedMerchantAccounts($associatedMerchantAccounts) + public function setApps($apps) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; + $this->container['apps'] = $apps; return $this; } /** - * Gets authnApps + * Gets associatedMerchantAccounts * * @return string[]|null */ - public function getAuthnApps() + public function getAssociatedMerchantAccounts() { - return $this->container['authnApps']; + return $this->container['associatedMerchantAccounts']; } /** - * Sets authnApps + * Sets associatedMerchantAccounts * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. * * @return self */ - public function setAuthnApps($authnApps) + public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($associatedMerchantAccounts)) { + throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; } diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php index 541298707..3afcb43b2 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php @@ -391,7 +391,7 @@ public function getRoles() /** * Sets roles * - * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) of the API credential. + * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateCompanyUserRequest.php b/src/Adyen/Model/Management/CreateCompanyUserRequest.php index 5cf133c68..c6990b649 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyUserRequest.php @@ -46,7 +46,6 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPITypes = [ 'accountGroups' => 'string[]', 'associatedMerchantAccounts' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name', 'roles' => 'string[]', @@ -64,7 +63,6 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPIFormats = [ 'accountGroups' => null, 'associatedMerchantAccounts' => null, - 'authnApps' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -80,7 +78,6 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPINullables = [ 'accountGroups' => false, 'associatedMerchantAccounts' => false, - 'authnApps' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -176,7 +173,6 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountGroups' => 'accountGroups', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnApps' => 'authnApps', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -192,7 +188,6 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountGroups' => 'setAccountGroups', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -208,7 +203,6 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountGroups' => 'getAccountGroups', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -275,7 +269,6 @@ public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -388,33 +381,6 @@ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) return $this; } - /** - * Gets authnApps - * - * @return string[]|null - */ - public function getAuthnApps() - { - return $this->container['authnApps']; - } - - /** - * Sets authnApps - * - * @param string[]|null $authnApps Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnApps($authnApps) - { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); - } - $this->container['authnApps'] = $authnApps; - - return $this; - } - /** * Gets email * @@ -536,7 +502,7 @@ public function getUsername() /** * Sets username * - * @param string $username The username for this user. Allowed length: 255 alphanumeric characters. + * @param string $username The user's email address that will be their username. Must be the same as the one in the `email` field. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateCompanyUserResponse.php b/src/Adyen/Model/Management/CreateCompanyUserResponse.php index 72fe184af..e568db7d6 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyUserResponse.php @@ -47,8 +47,8 @@ class CreateCompanyUserResponse implements ModelInterface, ArrayAccess, \JsonSer 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', + 'apps' => 'string[]', 'associatedMerchantAccounts' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -68,8 +68,8 @@ class CreateCompanyUserResponse implements ModelInterface, ArrayAccess, \JsonSer 'links' => null, 'accountGroups' => null, 'active' => null, + 'apps' => null, 'associatedMerchantAccounts' => null, - 'authnApps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -87,8 +87,8 @@ class CreateCompanyUserResponse implements ModelInterface, ArrayAccess, \JsonSer 'links' => false, 'accountGroups' => false, 'active' => false, + 'apps' => false, 'associatedMerchantAccounts' => false, - 'authnApps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -186,8 +186,8 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', + 'apps' => 'apps', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnApps' => 'authnApps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -205,8 +205,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', + 'apps' => 'setApps', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -224,8 +224,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', + 'apps' => 'getApps', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -294,8 +294,8 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -443,55 +443,55 @@ public function setActive($active) } /** - * Gets associatedMerchantAccounts + * Gets apps * * @return string[]|null */ - public function getAssociatedMerchantAccounts() + public function getApps() { - return $this->container['associatedMerchantAccounts']; + return $this->container['apps']; } /** - * Sets associatedMerchantAccounts + * Sets apps * - * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAssociatedMerchantAccounts($associatedMerchantAccounts) + public function setApps($apps) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; + $this->container['apps'] = $apps; return $this; } /** - * Gets authnApps + * Gets associatedMerchantAccounts * * @return string[]|null */ - public function getAuthnApps() + public function getAssociatedMerchantAccounts() { - return $this->container['authnApps']; + return $this->container['associatedMerchantAccounts']; } /** - * Sets authnApps + * Sets associatedMerchantAccounts * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. * * @return self */ - public function setAuthnApps($authnApps) + public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($associatedMerchantAccounts)) { + throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; } diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index 4d96317bf..79cfe809b 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -311,14 +311,9 @@ public function getModelName() public const FILTER_MERCHANT_ACCOUNT_TYPE_ALL_ACCOUNTS = 'allAccounts'; public const FILTER_MERCHANT_ACCOUNT_TYPE_EXCLUDE_ACCOUNTS = 'excludeAccounts'; public const FILTER_MERCHANT_ACCOUNT_TYPE_INCLUDE_ACCOUNTS = 'includeAccounts'; - public const NETWORK_TYPE_LOCAL = 'LOCAL'; - public const NETWORK_TYPE__PUBLIC = 'PUBLIC'; + public const NETWORK_TYPE_LOCAL = 'local'; + public const NETWORK_TYPE__PUBLIC = 'public'; public const SSL_VERSION_HTTP = 'HTTP'; - public const SSL_VERSION_SSL = 'SSL'; - public const SSL_VERSION_SSLV3 = 'SSLv3'; - public const SSL_VERSION_TLS = 'TLS'; - public const SSL_VERSION_TLSV1 = 'TLSv1'; - public const SSL_VERSION_TLSV1_1 = 'TLSv1.1'; public const SSL_VERSION_TLSV1_2 = 'TLSv1.2'; public const SSL_VERSION_TLSV1_3 = 'TLSv1.3'; @@ -369,11 +364,6 @@ public function getSslVersionAllowableValues() { return [ self::SSL_VERSION_HTTP, - self::SSL_VERSION_SSL, - self::SSL_VERSION_SSLV3, - self::SSL_VERSION_TLS, - self::SSL_VERSION_TLSV1, - self::SSL_VERSION_TLSV1_1, self::SSL_VERSION_TLSV1_2, self::SSL_VERSION_TLSV1_3, ]; diff --git a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php index 09914a2f5..ad5531baf 100644 --- a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php @@ -357,7 +357,7 @@ public function getRoles() /** * Sets roles * - * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateMerchantUserRequest.php b/src/Adyen/Model/Management/CreateMerchantUserRequest.php index 64a68f32b..deee403e0 100644 --- a/src/Adyen/Model/Management/CreateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantUserRequest.php @@ -45,7 +45,6 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPITypes = [ 'accountGroups' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name', 'roles' => 'string[]', @@ -62,7 +61,6 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPIFormats = [ 'accountGroups' => null, - 'authnApps' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -77,7 +75,6 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPINullables = [ 'accountGroups' => false, - 'authnApps' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -172,7 +169,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountGroups' => 'accountGroups', - 'authnApps' => 'authnApps', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -187,7 +183,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountGroups' => 'setAccountGroups', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -202,7 +197,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountGroups' => 'getAccountGroups', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -268,7 +262,6 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -354,33 +347,6 @@ public function setAccountGroups($accountGroups) return $this; } - /** - * Gets authnApps - * - * @return string[]|null - */ - public function getAuthnApps() - { - return $this->container['authnApps']; - } - - /** - * Sets authnApps - * - * @param string[]|null $authnApps Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnApps($authnApps) - { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); - } - $this->container['authnApps'] = $authnApps; - - return $this; - } - /** * Gets email * @@ -502,7 +468,7 @@ public function getUsername() /** * Sets username * - * @param string $username The username for this user. Allowed length: 255 alphanumeric characters. + * @param string $username The user's email address that will be their username. Must be the same as the one in the `email` field. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index 62710d681..b96274e96 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -296,14 +296,9 @@ public function getModelName() public const COMMUNICATION_FORMAT_HTTP = 'http'; public const COMMUNICATION_FORMAT_JSON = 'json'; public const COMMUNICATION_FORMAT_SOAP = 'soap'; - public const NETWORK_TYPE_LOCAL = 'LOCAL'; - public const NETWORK_TYPE__PUBLIC = 'PUBLIC'; + public const NETWORK_TYPE_LOCAL = 'local'; + public const NETWORK_TYPE__PUBLIC = 'public'; public const SSL_VERSION_HTTP = 'HTTP'; - public const SSL_VERSION_SSL = 'SSL'; - public const SSL_VERSION_SSLV3 = 'SSLv3'; - public const SSL_VERSION_TLS = 'TLS'; - public const SSL_VERSION_TLSV1 = 'TLSv1'; - public const SSL_VERSION_TLSV1_1 = 'TLSv1.1'; public const SSL_VERSION_TLSV1_2 = 'TLSv1.2'; public const SSL_VERSION_TLSV1_3 = 'TLSv1.3'; @@ -341,11 +336,6 @@ public function getSslVersionAllowableValues() { return [ self::SSL_VERSION_HTTP, - self::SSL_VERSION_SSL, - self::SSL_VERSION_SSLV3, - self::SSL_VERSION_TLS, - self::SSL_VERSION_TLSV1, - self::SSL_VERSION_TLSV1_1, self::SSL_VERSION_TLSV1_2, self::SSL_VERSION_TLSV1_3, ]; diff --git a/src/Adyen/Model/Management/CreateUserResponse.php b/src/Adyen/Model/Management/CreateUserResponse.php index 152d3817f..60ebde706 100644 --- a/src/Adyen/Model/Management/CreateUserResponse.php +++ b/src/Adyen/Model/Management/CreateUserResponse.php @@ -47,7 +47,7 @@ class CreateUserResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', - 'authnApps' => 'string[]', + 'apps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -67,7 +67,7 @@ class CreateUserResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'links' => null, 'accountGroups' => null, 'active' => null, - 'authnApps' => null, + 'apps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -85,7 +85,7 @@ class CreateUserResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'links' => false, 'accountGroups' => false, 'active' => false, - 'authnApps' => false, + 'apps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', - 'authnApps' => 'authnApps', + 'apps' => 'apps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -201,7 +201,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', - 'authnApps' => 'setAuthnApps', + 'apps' => 'setApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -219,7 +219,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', - 'authnApps' => 'getAuthnApps', + 'apps' => 'getApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -288,7 +288,7 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -436,28 +436,28 @@ public function setActive($active) } /** - * Gets authnApps + * Gets apps * * @return string[]|null */ - public function getAuthnApps() + public function getApps() { - return $this->container['authnApps']; + return $this->container['apps']; } /** - * Sets authnApps + * Sets apps * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAuthnApps($authnApps) + public function setApps($apps) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['apps'] = $apps; return $this; } diff --git a/src/Adyen/Model/Management/Currency.php b/src/Adyen/Model/Management/Currency.php index 1596b5a97..ec66db7b8 100644 --- a/src/Adyen/Model/Management/Currency.php +++ b/src/Adyen/Model/Management/Currency.php @@ -46,7 +46,7 @@ class Currency implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'amount' => 'int', 'currencyCode' => 'string', - 'percentage' => 'object' + 'percentage' => 'float' ]; /** @@ -59,7 +59,7 @@ class Currency implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'amount' => 'int32', 'currencyCode' => null, - 'percentage' => null + 'percentage' => 'double' ]; /** @@ -348,7 +348,7 @@ public function setCurrencyCode($currencyCode) /** * Gets percentage * - * @return object|null + * @return float|null */ public function getPercentage() { @@ -358,7 +358,7 @@ public function getPercentage() /** * Sets percentage * - * @param object|null $percentage percentage + * @param float|null $percentage Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. * * @return self */ diff --git a/src/Adyen/Model/Management/Hardware.php b/src/Adyen/Model/Management/Hardware.php index 709fc0db0..f2dfa3b9f 100644 --- a/src/Adyen/Model/Management/Hardware.php +++ b/src/Adyen/Model/Management/Hardware.php @@ -44,7 +44,8 @@ class Hardware implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'displayMaximumBackLight' => 'int' + 'displayMaximumBackLight' => 'int', + 'restartHour' => 'int' ]; /** @@ -55,7 +56,8 @@ class Hardware implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'displayMaximumBackLight' => 'int32' + 'displayMaximumBackLight' => 'int32', + 'restartHour' => 'int32' ]; /** @@ -64,7 +66,8 @@ class Hardware implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'displayMaximumBackLight' => true + 'displayMaximumBackLight' => true, + 'restartHour' => true ]; /** @@ -153,7 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'displayMaximumBackLight' => 'displayMaximumBackLight' + 'displayMaximumBackLight' => 'displayMaximumBackLight', + 'restartHour' => 'restartHour' ]; /** @@ -162,7 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'displayMaximumBackLight' => 'setDisplayMaximumBackLight' + 'displayMaximumBackLight' => 'setDisplayMaximumBackLight', + 'restartHour' => 'setRestartHour' ]; /** @@ -171,7 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'displayMaximumBackLight' => 'getDisplayMaximumBackLight' + 'displayMaximumBackLight' => 'getDisplayMaximumBackLight', + 'restartHour' => 'getRestartHour' ]; /** @@ -232,6 +238,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('displayMaximumBackLight', $data ?? [], null); + $this->setIfExists('restartHour', $data ?? [], null); } /** @@ -300,6 +307,31 @@ public function setDisplayMaximumBackLight($displayMaximumBackLight) return $this; } + + /** + * Gets restartHour + * + * @return int|null + */ + public function getRestartHour() + { + return $this->container['restartHour']; + } + + /** + * Sets restartHour + * + * @param int|null $restartHour The hour (0 - 23) in which the device will reboot, reboot will happen in the timezone of the device + * + * @return self + */ + public function setRestartHour($restartHour) + { + // Do nothing for nullable integers + $this->container['restartHour'] = $restartHour; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/InvalidFieldWrapper.php b/src/Adyen/Model/Management/InvalidFieldWrapper.php new file mode 100644 index 000000000..357145df7 --- /dev/null +++ b/src/Adyen/Model/Management/InvalidFieldWrapper.php @@ -0,0 +1,384 @@ + + */ +class InvalidFieldWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'InvalidFieldWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'invalidField' => '\Adyen\Model\Management\InvalidField' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'invalidField' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'invalidField' => 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 = [ + 'invalidField' => 'InvalidField' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'invalidField' => 'setInvalidField' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'invalidField' => 'getInvalidField' + ]; + + /** + * 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('invalidField', $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 invalidField + * + * @return \Adyen\Model\Management\InvalidField|null + */ + public function getInvalidField() + { + return $this->container['invalidField']; + } + + /** + * Sets invalidField + * + * @param \Adyen\Model\Management\InvalidField|null $invalidField invalidField + * + * @return self + */ + public function setInvalidField($invalidField) + { + if (is_null($invalidField)) { + throw new \InvalidArgumentException('non-nullable invalidField cannot be null'); + } + $this->container['invalidField'] = $invalidField; + + 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/JSONObject.php b/src/Adyen/Model/Management/JSONObject.php index 32df5be45..de992412f 100644 --- a/src/Adyen/Model/Management/JSONObject.php +++ b/src/Adyen/Model/Management/JSONObject.php @@ -44,7 +44,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\Management\JSONPath[]', + 'paths' => '\Adyen\Model\Management\JSONPathWrapper[]', 'rootPath' => '\Adyen\Model\Management\JSONPath' ]; @@ -286,7 +286,7 @@ public function valid() /** * Gets paths * - * @return \Adyen\Model\Management\JSONPath[]|null + * @return \Adyen\Model\Management\JSONPathWrapper[]|null */ public function getPaths() { @@ -296,7 +296,7 @@ public function getPaths() /** * Sets paths * - * @param \Adyen\Model\Management\JSONPath[]|null $paths paths + * @param \Adyen\Model\Management\JSONPathWrapper[]|null $paths paths * * @return self */ diff --git a/src/Adyen/Model/Management/JSONPathWrapper.php b/src/Adyen/Model/Management/JSONPathWrapper.php new file mode 100644 index 000000000..595430c9a --- /dev/null +++ b/src/Adyen/Model/Management/JSONPathWrapper.php @@ -0,0 +1,384 @@ + + */ +class JSONPathWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'JSONPathWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'jSONPath' => '\Adyen\Model\Management\JSONPath' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'jSONPath' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'jSONPath' => 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 = [ + 'jSONPath' => 'JSONPath' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'jSONPath' => 'setJSONPath' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'jSONPath' => 'getJSONPath' + ]; + + /** + * 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('jSONPath', $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 jSONPath + * + * @return \Adyen\Model\Management\JSONPath|null + */ + public function getJSONPath() + { + return $this->container['jSONPath']; + } + + /** + * Sets jSONPath + * + * @param \Adyen\Model\Management\JSONPath|null $jSONPath jSONPath + * + * @return self + */ + public function setJSONPath($jSONPath) + { + if (is_null($jSONPath)) { + throw new \InvalidArgumentException('non-nullable jSONPath cannot be null'); + } + $this->container['jSONPath'] = $jSONPath; + + 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/ListTerminalsResponse.php b/src/Adyen/Model/Management/ListTerminalsResponse.php index 7eacf4a0a..a05328ddb 100644 --- a/src/Adyen/Model/Management/ListTerminalsResponse.php +++ b/src/Adyen/Model/Management/ListTerminalsResponse.php @@ -44,7 +44,10 @@ class ListTerminalsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'data' => '\Adyen\Model\Management\Terminal[]' + 'links' => '\Adyen\Model\Management\PaginationLinks', + 'data' => '\Adyen\Model\Management\Terminal[]', + 'itemsTotal' => 'int', + 'pagesTotal' => 'int' ]; /** @@ -55,7 +58,10 @@ class ListTerminalsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'data' => null + 'links' => null, + 'data' => null, + 'itemsTotal' => 'int32', + 'pagesTotal' => 'int32' ]; /** @@ -64,7 +70,10 @@ class ListTerminalsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static $openAPINullables = [ - 'data' => false + 'links' => false, + 'data' => false, + 'itemsTotal' => true, + 'pagesTotal' => true ]; /** @@ -153,7 +162,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'links' => '_links', + 'data' => 'data', + 'itemsTotal' => 'itemsTotal', + 'pagesTotal' => 'pagesTotal' ]; /** @@ -162,7 +174,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'links' => 'setLinks', + 'data' => 'setData', + 'itemsTotal' => 'setItemsTotal', + 'pagesTotal' => 'setPagesTotal' ]; /** @@ -171,7 +186,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'links' => 'getLinks', + 'data' => 'getData', + 'itemsTotal' => 'getItemsTotal', + 'pagesTotal' => 'getPagesTotal' ]; /** @@ -231,7 +249,10 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('itemsTotal', $data ?? [], null); + $this->setIfExists('pagesTotal', $data ?? [], null); } /** @@ -261,6 +282,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['itemsTotal'] === null) { + $invalidProperties[] = "'itemsTotal' can't be null"; + } + if ($this->container['pagesTotal'] === null) { + $invalidProperties[] = "'pagesTotal' can't be null"; + } return $invalidProperties; } @@ -276,6 +303,33 @@ public function valid() } + /** + * Gets links + * + * @return \Adyen\Model\Management\PaginationLinks|null + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \Adyen\Model\Management\PaginationLinks|null $links links + * + * @return self + */ + public function setLinks($links) + { + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + /** * Gets data * @@ -302,6 +356,56 @@ public function setData($data) return $this; } + + /** + * Gets itemsTotal + * + * @return int + */ + public function getItemsTotal() + { + return $this->container['itemsTotal']; + } + + /** + * Sets itemsTotal + * + * @param int $itemsTotal Total number of items. + * + * @return self + */ + public function setItemsTotal($itemsTotal) + { + // Do nothing for nullable integers + $this->container['itemsTotal'] = $itemsTotal; + + return $this; + } + + /** + * Gets pagesTotal + * + * @return int + */ + public function getPagesTotal() + { + return $this->container['pagesTotal']; + } + + /** + * Sets pagesTotal + * + * @param int $pagesTotal Total number of pages. + * + * @return self + */ + public function setPagesTotal($pagesTotal) + { + // Do nothing for nullable integers + $this->container['pagesTotal'] = $pagesTotal; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/Nexo.php b/src/Adyen/Model/Management/Nexo.php index 044140bb4..5304b117e 100644 --- a/src/Adyen/Model/Management/Nexo.php +++ b/src/Adyen/Model/Management/Nexo.php @@ -47,7 +47,8 @@ class Nexo implements ModelInterface, ArrayAccess, \JsonSerializable 'displayUrls' => '\Adyen\Model\Management\NotificationUrl', 'encryptionKey' => '\Adyen\Model\Management\Key', 'eventUrls' => '\Adyen\Model\Management\EventUrl', - 'nexoEventUrls' => 'string[]' + 'nexoEventUrls' => 'string[]', + 'notification' => '\Adyen\Model\Management\Notification' ]; /** @@ -61,7 +62,8 @@ class Nexo implements ModelInterface, ArrayAccess, \JsonSerializable 'displayUrls' => null, 'encryptionKey' => null, 'eventUrls' => null, - 'nexoEventUrls' => null + 'nexoEventUrls' => null, + 'notification' => null ]; /** @@ -73,7 +75,8 @@ class Nexo implements ModelInterface, ArrayAccess, \JsonSerializable 'displayUrls' => false, 'encryptionKey' => false, 'eventUrls' => false, - 'nexoEventUrls' => false + 'nexoEventUrls' => false, + 'notification' => false ]; /** @@ -165,7 +168,8 @@ public function isNullableSetToNull(string $property): bool 'displayUrls' => 'displayUrls', 'encryptionKey' => 'encryptionKey', 'eventUrls' => 'eventUrls', - 'nexoEventUrls' => 'nexoEventUrls' + 'nexoEventUrls' => 'nexoEventUrls', + 'notification' => 'notification' ]; /** @@ -177,7 +181,8 @@ public function isNullableSetToNull(string $property): bool 'displayUrls' => 'setDisplayUrls', 'encryptionKey' => 'setEncryptionKey', 'eventUrls' => 'setEventUrls', - 'nexoEventUrls' => 'setNexoEventUrls' + 'nexoEventUrls' => 'setNexoEventUrls', + 'notification' => 'setNotification' ]; /** @@ -189,7 +194,8 @@ public function isNullableSetToNull(string $property): bool 'displayUrls' => 'getDisplayUrls', 'encryptionKey' => 'getEncryptionKey', 'eventUrls' => 'getEventUrls', - 'nexoEventUrls' => 'getNexoEventUrls' + 'nexoEventUrls' => 'getNexoEventUrls', + 'notification' => 'getNotification' ]; /** @@ -253,6 +259,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptionKey', $data ?? [], null); $this->setIfExists('eventUrls', $data ?? [], null); $this->setIfExists('nexoEventUrls', $data ?? [], null); + $this->setIfExists('notification', $data ?? [], null); } /** @@ -406,6 +413,33 @@ public function setNexoEventUrls($nexoEventUrls) return $this; } + + /** + * Gets notification + * + * @return \Adyen\Model\Management\Notification|null + */ + public function getNotification() + { + return $this->container['notification']; + } + + /** + * Sets notification + * + * @param \Adyen\Model\Management\Notification|null $notification notification + * + * @return self + */ + public function setNotification($notification) + { + if (is_null($notification)) { + throw new \InvalidArgumentException('non-nullable notification cannot be null'); + } + $this->container['notification'] = $notification; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php new file mode 100644 index 000000000..8c60d6807 --- /dev/null +++ b/src/Adyen/Model/Management/Notification.php @@ -0,0 +1,384 @@ + + */ +class Notification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Notification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'showButton' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'showButton' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'showButton' => 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 = [ + 'showButton' => 'showButton' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'showButton' => 'setShowButton' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'showButton' => 'getShowButton' + ]; + + /** + * 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('showButton', $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 showButton + * + * @return bool|null + */ + public function getShowButton() + { + return $this->container['showButton']; + } + + /** + * Sets showButton + * + * @param bool|null $showButton Toggle to show or hide Notification button on the terminal + * + * @return self + */ + public function setShowButton($showButton) + { + if (is_null($showButton)) { + throw new \InvalidArgumentException('non-nullable showButton cannot be null'); + } + $this->container['showButton'] = $showButton; + + 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/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index adbb66acc..ec629a823 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -44,11 +44,13 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'allowed' => 'bool', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', 'bcmc' => '\Adyen\Model\Management\BcmcInfo', 'businessLineId' => 'string', 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', + 'clearpay' => '\Adyen\Model\Management\ClearpayInfo', 'countries' => 'string[]', 'currencies' => 'string[]', 'customRoutingFlags' => 'string[]', @@ -64,6 +66,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'sofort' => '\Adyen\Model\Management\SofortInfo', 'storeId' => 'string', 'swish' => '\Adyen\Model\Management\SwishInfo', + 'twint' => '\Adyen\Model\Management\TwintInfo', 'type' => 'string', 'verificationStatus' => 'string', 'vipps' => '\Adyen\Model\Management\VippsInfo' @@ -77,11 +80,13 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'afterpayTouch' => null, 'allowed' => null, 'applePay' => null, 'bcmc' => null, 'businessLineId' => null, 'cartesBancaires' => null, + 'clearpay' => null, 'countries' => null, 'currencies' => null, 'customRoutingFlags' => null, @@ -97,6 +102,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'sofort' => null, 'storeId' => null, 'swish' => null, + 'twint' => null, 'type' => null, 'verificationStatus' => null, 'vipps' => null @@ -108,11 +114,13 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'afterpayTouch' => false, 'allowed' => false, 'applePay' => false, 'bcmc' => false, 'businessLineId' => false, 'cartesBancaires' => false, + 'clearpay' => false, 'countries' => false, 'currencies' => false, 'customRoutingFlags' => false, @@ -128,6 +136,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'sofort' => false, 'storeId' => false, 'swish' => false, + 'twint' => false, 'type' => false, 'verificationStatus' => false, 'vipps' => false @@ -219,11 +228,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'afterpayTouch' => 'afterpayTouch', 'allowed' => 'allowed', 'applePay' => 'applePay', 'bcmc' => 'bcmc', 'businessLineId' => 'businessLineId', 'cartesBancaires' => 'cartesBancaires', + 'clearpay' => 'clearpay', 'countries' => 'countries', 'currencies' => 'currencies', 'customRoutingFlags' => 'customRoutingFlags', @@ -239,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'sofort', 'storeId' => 'storeId', 'swish' => 'swish', + 'twint' => 'twint', 'type' => 'type', 'verificationStatus' => 'verificationStatus', 'vipps' => 'vipps' @@ -250,11 +262,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'afterpayTouch' => 'setAfterpayTouch', 'allowed' => 'setAllowed', 'applePay' => 'setApplePay', 'bcmc' => 'setBcmc', 'businessLineId' => 'setBusinessLineId', 'cartesBancaires' => 'setCartesBancaires', + 'clearpay' => 'setClearpay', 'countries' => 'setCountries', 'currencies' => 'setCurrencies', 'customRoutingFlags' => 'setCustomRoutingFlags', @@ -270,6 +284,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'setSofort', 'storeId' => 'setStoreId', 'swish' => 'setSwish', + 'twint' => 'setTwint', 'type' => 'setType', 'verificationStatus' => 'setVerificationStatus', 'vipps' => 'setVipps' @@ -281,11 +296,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'afterpayTouch' => 'getAfterpayTouch', 'allowed' => 'getAllowed', 'applePay' => 'getApplePay', 'bcmc' => 'getBcmc', 'businessLineId' => 'getBusinessLineId', 'cartesBancaires' => 'getCartesBancaires', + 'clearpay' => 'getClearpay', 'countries' => 'getCountries', 'currencies' => 'getCurrencies', 'customRoutingFlags' => 'getCustomRoutingFlags', @@ -301,6 +318,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'getSofort', 'storeId' => 'getStoreId', 'swish' => 'getSwish', + 'twint' => 'getTwint', 'type' => 'getType', 'verificationStatus' => 'getVerificationStatus', 'vipps' => 'getVipps' @@ -381,11 +399,13 @@ public function getVerificationStatusAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('allowed', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); $this->setIfExists('bcmc', $data ?? [], null); $this->setIfExists('businessLineId', $data ?? [], null); $this->setIfExists('cartesBancaires', $data ?? [], null); + $this->setIfExists('clearpay', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); $this->setIfExists('customRoutingFlags', $data ?? [], null); @@ -401,6 +421,7 @@ public function __construct(array $data = null) $this->setIfExists('sofort', $data ?? [], null); $this->setIfExists('storeId', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); + $this->setIfExists('twint', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('verificationStatus', $data ?? [], null); $this->setIfExists('vipps', $data ?? [], null); @@ -460,6 +481,33 @@ public function valid() } + /** + * Gets afterpayTouch + * + * @return \Adyen\Model\Management\AfterpayTouchInfo|null + */ + public function getAfterpayTouch() + { + return $this->container['afterpayTouch']; + } + + /** + * Sets afterpayTouch + * + * @param \Adyen\Model\Management\AfterpayTouchInfo|null $afterpayTouch afterpayTouch + * + * @return self + */ + public function setAfterpayTouch($afterpayTouch) + { + if (is_null($afterpayTouch)) { + throw new \InvalidArgumentException('non-nullable afterpayTouch cannot be null'); + } + $this->container['afterpayTouch'] = $afterpayTouch; + + return $this; + } + /** * Gets allowed * @@ -595,6 +643,33 @@ public function setCartesBancaires($cartesBancaires) return $this; } + /** + * Gets clearpay + * + * @return \Adyen\Model\Management\ClearpayInfo|null + */ + public function getClearpay() + { + return $this->container['clearpay']; + } + + /** + * Sets clearpay + * + * @param \Adyen\Model\Management\ClearpayInfo|null $clearpay clearpay + * + * @return self + */ + public function setClearpay($clearpay) + { + if (is_null($clearpay)) { + throw new \InvalidArgumentException('non-nullable clearpay cannot be null'); + } + $this->container['clearpay'] = $clearpay; + + return $this; + } + /** * Gets countries * @@ -1000,6 +1075,33 @@ public function setSwish($swish) return $this; } + /** + * Gets twint + * + * @return \Adyen\Model\Management\TwintInfo|null + */ + public function getTwint() + { + return $this->container['twint']; + } + + /** + * Sets twint + * + * @param \Adyen\Model\Management\TwintInfo|null $twint twint + * + * @return self + */ + public function setTwint($twint) + { + if (is_null($twint)) { + throw new \InvalidArgumentException('non-nullable twint cannot be null'); + } + $this->container['twint'] = $twint; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index a46973265..5733869b4 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -45,7 +45,7 @@ class PaymentMethodResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'links' => '\Adyen\Model\Management\PaginationLinks', - 'data' => '\Adyen\Model\Management\PaymentMethod[]', + 'data' => '\Adyen\Model\Management\PaymentMethodWrapper[]', 'itemsTotal' => 'int', 'pagesTotal' => 'int', 'typesWithErrors' => 'string[]' @@ -259,7 +259,6 @@ public function getModelName() public const TYPES_WITH_ERRORS_ELOCREDIT = 'elocredit'; public const TYPES_WITH_ERRORS_ELODEBIT = 'elodebit'; public const TYPES_WITH_ERRORS_GIROCARD = 'girocard'; - public const TYPES_WITH_ERRORS_GIROPAY = 'giropay'; public const TYPES_WITH_ERRORS_GOOGLEPAY = 'googlepay'; public const TYPES_WITH_ERRORS_HIPER = 'hiper'; public const TYPES_WITH_ERRORS_HIPERCARD = 'hipercard'; @@ -277,10 +276,13 @@ public function getModelName() public const TYPES_WITH_ERRORS_MOBILEPAY = 'mobilepay'; public const TYPES_WITH_ERRORS_MULTIBANCO = 'multibanco'; public const TYPES_WITH_ERRORS_ONLINE_BANKING_PL = 'onlineBanking_PL'; + public const TYPES_WITH_ERRORS_PAYBYBANK = 'paybybank'; public const TYPES_WITH_ERRORS_PAYPAL = 'paypal'; public const TYPES_WITH_ERRORS_PAYSHOP = 'payshop'; public const TYPES_WITH_ERRORS_SWISH = 'swish'; public const TYPES_WITH_ERRORS_TRUSTLY = 'trustly'; + public const TYPES_WITH_ERRORS_TWINT = 'twint'; + public const TYPES_WITH_ERRORS_TWINT_POS = 'twint_pos'; public const TYPES_WITH_ERRORS_VIPPS = 'vipps'; public const TYPES_WITH_ERRORS_VISA = 'visa'; public const TYPES_WITH_ERRORS_VISADEBIT = 'visadebit'; @@ -316,7 +318,6 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_ELOCREDIT, self::TYPES_WITH_ERRORS_ELODEBIT, self::TYPES_WITH_ERRORS_GIROCARD, - self::TYPES_WITH_ERRORS_GIROPAY, self::TYPES_WITH_ERRORS_GOOGLEPAY, self::TYPES_WITH_ERRORS_HIPER, self::TYPES_WITH_ERRORS_HIPERCARD, @@ -334,10 +335,13 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_MOBILEPAY, self::TYPES_WITH_ERRORS_MULTIBANCO, self::TYPES_WITH_ERRORS_ONLINE_BANKING_PL, + self::TYPES_WITH_ERRORS_PAYBYBANK, self::TYPES_WITH_ERRORS_PAYPAL, self::TYPES_WITH_ERRORS_PAYSHOP, self::TYPES_WITH_ERRORS_SWISH, self::TYPES_WITH_ERRORS_TRUSTLY, + self::TYPES_WITH_ERRORS_TWINT, + self::TYPES_WITH_ERRORS_TWINT_POS, self::TYPES_WITH_ERRORS_VIPPS, self::TYPES_WITH_ERRORS_VISA, self::TYPES_WITH_ERRORS_VISADEBIT, @@ -446,7 +450,7 @@ public function setLinks($links) /** * Gets data * - * @return \Adyen\Model\Management\PaymentMethod[]|null + * @return \Adyen\Model\Management\PaymentMethodWrapper[]|null */ public function getData() { @@ -456,7 +460,7 @@ public function getData() /** * Sets data * - * @param \Adyen\Model\Management\PaymentMethod[]|null $data Payment methods details. + * @param \Adyen\Model\Management\PaymentMethodWrapper[]|null $data Payment methods details. * * @return self */ diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 142a6529f..8a4dd4bf3 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -44,10 +44,12 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ + 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', 'bcmc' => '\Adyen\Model\Management\BcmcInfo', 'businessLineId' => 'string', 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', + 'clearpay' => '\Adyen\Model\Management\ClearpayInfo', 'countries' => 'string[]', 'currencies' => 'string[]', 'customRoutingFlags' => 'string[]', @@ -61,6 +63,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'sofort' => '\Adyen\Model\Management\SofortInfo', 'storeId' => 'string', 'swish' => '\Adyen\Model\Management\SwishInfo', + 'twint' => '\Adyen\Model\Management\TwintInfo', 'type' => 'string', 'vipps' => '\Adyen\Model\Management\VippsInfo' ]; @@ -73,10 +76,12 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ + 'afterpayTouch' => null, 'applePay' => null, 'bcmc' => null, 'businessLineId' => null, 'cartesBancaires' => null, + 'clearpay' => null, 'countries' => null, 'currencies' => null, 'customRoutingFlags' => null, @@ -90,6 +95,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'sofort' => null, 'storeId' => null, 'swish' => null, + 'twint' => null, 'type' => null, 'vipps' => null ]; @@ -100,10 +106,12 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static $openAPINullables = [ + 'afterpayTouch' => false, 'applePay' => false, 'bcmc' => false, 'businessLineId' => false, 'cartesBancaires' => false, + 'clearpay' => false, 'countries' => false, 'currencies' => false, 'customRoutingFlags' => false, @@ -117,6 +125,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'sofort' => false, 'storeId' => false, 'swish' => false, + 'twint' => false, 'type' => false, 'vipps' => false ]; @@ -207,10 +216,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'afterpayTouch' => 'afterpayTouch', 'applePay' => 'applePay', 'bcmc' => 'bcmc', 'businessLineId' => 'businessLineId', 'cartesBancaires' => 'cartesBancaires', + 'clearpay' => 'clearpay', 'countries' => 'countries', 'currencies' => 'currencies', 'customRoutingFlags' => 'customRoutingFlags', @@ -224,6 +235,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'sofort', 'storeId' => 'storeId', 'swish' => 'swish', + 'twint' => 'twint', 'type' => 'type', 'vipps' => 'vipps' ]; @@ -234,10 +246,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'afterpayTouch' => 'setAfterpayTouch', 'applePay' => 'setApplePay', 'bcmc' => 'setBcmc', 'businessLineId' => 'setBusinessLineId', 'cartesBancaires' => 'setCartesBancaires', + 'clearpay' => 'setClearpay', 'countries' => 'setCountries', 'currencies' => 'setCurrencies', 'customRoutingFlags' => 'setCustomRoutingFlags', @@ -251,6 +265,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'setSofort', 'storeId' => 'setStoreId', 'swish' => 'setSwish', + 'twint' => 'setTwint', 'type' => 'setType', 'vipps' => 'setVipps' ]; @@ -261,10 +276,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'afterpayTouch' => 'getAfterpayTouch', 'applePay' => 'getApplePay', 'bcmc' => 'getBcmc', 'businessLineId' => 'getBusinessLineId', 'cartesBancaires' => 'getCartesBancaires', + 'clearpay' => 'getClearpay', 'countries' => 'getCountries', 'currencies' => 'getCurrencies', 'customRoutingFlags' => 'getCustomRoutingFlags', @@ -278,6 +295,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'getSofort', 'storeId' => 'getStoreId', 'swish' => 'getSwish', + 'twint' => 'getTwint', 'type' => 'getType', 'vipps' => 'getVipps' ]; @@ -347,7 +365,6 @@ public function getModelName() public const TYPE_ELOCREDIT = 'elocredit'; public const TYPE_ELODEBIT = 'elodebit'; public const TYPE_GIROCARD = 'girocard'; - public const TYPE_GIROPAY = 'giropay'; public const TYPE_GOOGLEPAY = 'googlepay'; public const TYPE_HIPER = 'hiper'; public const TYPE_HIPERCARD = 'hipercard'; @@ -365,10 +382,13 @@ public function getModelName() public const TYPE_MOBILEPAY = 'mobilepay'; public const TYPE_MULTIBANCO = 'multibanco'; public const TYPE_ONLINE_BANKING_PL = 'onlineBanking_PL'; + public const TYPE_PAYBYBANK = 'paybybank'; public const TYPE_PAYPAL = 'paypal'; public const TYPE_PAYSHOP = 'payshop'; public const TYPE_SWISH = 'swish'; public const TYPE_TRUSTLY = 'trustly'; + public const TYPE_TWINT = 'twint'; + public const TYPE_TWINT_POS = 'twint_pos'; public const TYPE_VIPPS = 'vipps'; public const TYPE_VISA = 'visa'; public const TYPE_VISADEBIT = 'visadebit'; @@ -418,7 +438,6 @@ public function getTypeAllowableValues() self::TYPE_ELOCREDIT, self::TYPE_ELODEBIT, self::TYPE_GIROCARD, - self::TYPE_GIROPAY, self::TYPE_GOOGLEPAY, self::TYPE_HIPER, self::TYPE_HIPERCARD, @@ -436,10 +455,13 @@ public function getTypeAllowableValues() self::TYPE_MOBILEPAY, self::TYPE_MULTIBANCO, self::TYPE_ONLINE_BANKING_PL, + self::TYPE_PAYBYBANK, self::TYPE_PAYPAL, self::TYPE_PAYSHOP, self::TYPE_SWISH, self::TYPE_TRUSTLY, + self::TYPE_TWINT, + self::TYPE_TWINT_POS, self::TYPE_VIPPS, self::TYPE_VISA, self::TYPE_VISADEBIT, @@ -463,10 +485,12 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); $this->setIfExists('bcmc', $data ?? [], null); $this->setIfExists('businessLineId', $data ?? [], null); $this->setIfExists('cartesBancaires', $data ?? [], null); + $this->setIfExists('clearpay', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); $this->setIfExists('customRoutingFlags', $data ?? [], null); @@ -480,6 +504,7 @@ public function __construct(array $data = null) $this->setIfExists('sofort', $data ?? [], null); $this->setIfExists('storeId', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); + $this->setIfExists('twint', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('vipps', $data ?? [], null); } @@ -544,6 +569,33 @@ public function valid() } + /** + * Gets afterpayTouch + * + * @return \Adyen\Model\Management\AfterpayTouchInfo|null + */ + public function getAfterpayTouch() + { + return $this->container['afterpayTouch']; + } + + /** + * Sets afterpayTouch + * + * @param \Adyen\Model\Management\AfterpayTouchInfo|null $afterpayTouch afterpayTouch + * + * @return self + */ + public function setAfterpayTouch($afterpayTouch) + { + if (is_null($afterpayTouch)) { + throw new \InvalidArgumentException('non-nullable afterpayTouch cannot be null'); + } + $this->container['afterpayTouch'] = $afterpayTouch; + + return $this; + } + /** * Gets applePay * @@ -652,6 +704,33 @@ public function setCartesBancaires($cartesBancaires) return $this; } + /** + * Gets clearpay + * + * @return \Adyen\Model\Management\ClearpayInfo|null + */ + public function getClearpay() + { + return $this->container['clearpay']; + } + + /** + * Sets clearpay + * + * @param \Adyen\Model\Management\ClearpayInfo|null $clearpay clearpay + * + * @return self + */ + public function setClearpay($clearpay) + { + if (is_null($clearpay)) { + throw new \InvalidArgumentException('non-nullable clearpay cannot be null'); + } + $this->container['clearpay'] = $clearpay; + + return $this; + } + /** * Gets countries * @@ -1013,6 +1092,33 @@ public function setSwish($swish) return $this; } + /** + * Gets twint + * + * @return \Adyen\Model\Management\TwintInfo|null + */ + public function getTwint() + { + return $this->container['twint']; + } + + /** + * Sets twint + * + * @param \Adyen\Model\Management\TwintInfo|null $twint twint + * + * @return self + */ + public function setTwint($twint) + { + if (is_null($twint)) { + throw new \InvalidArgumentException('non-nullable twint cannot be null'); + } + $this->container['twint'] = $twint; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Management/PaymentMethodWrapper.php b/src/Adyen/Model/Management/PaymentMethodWrapper.php new file mode 100644 index 000000000..fe06ccc8e --- /dev/null +++ b/src/Adyen/Model/Management/PaymentMethodWrapper.php @@ -0,0 +1,384 @@ + + */ +class PaymentMethodWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'paymentMethod' => '\Adyen\Model\Management\PaymentMethod' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'paymentMethod' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'paymentMethod' => 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 = [ + 'paymentMethod' => 'PaymentMethod' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'paymentMethod' => 'setPaymentMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'paymentMethod' => 'getPaymentMethod' + ]; + + /** + * 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('paymentMethod', $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 paymentMethod + * + * @return \Adyen\Model\Management\PaymentMethod|null + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param \Adyen\Model\Management\PaymentMethod|null $paymentMethod paymentMethod + * + * @return self + */ + public function setPaymentMethod($paymentMethod) + { + if (is_null($paymentMethod)) { + throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); + } + $this->container['paymentMethod'] = $paymentMethod; + + 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/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index a66ee465d..acf97d1ca 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -47,7 +47,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'detail' => 'string', 'errorCode' => 'string', 'instance' => 'string', - 'invalidFields' => '\Adyen\Model\Management\InvalidField[]', + 'invalidFields' => '\Adyen\Model\Management\InvalidFieldWrapper[]', 'requestId' => 'string', 'response' => '\Adyen\Model\Management\JSONObject', 'status' => 'int', @@ -431,7 +431,7 @@ public function setInstance($instance) /** * Gets invalidFields * - * @return \Adyen\Model\Management\InvalidField[]|null + * @return \Adyen\Model\Management\InvalidFieldWrapper[]|null */ public function getInvalidFields() { @@ -441,7 +441,7 @@ public function getInvalidFields() /** * Sets invalidFields * - * @param \Adyen\Model\Management\InvalidField[]|null $invalidFields Detailed explanation of each validation error, when applicable. + * @param \Adyen\Model\Management\InvalidFieldWrapper[]|null $invalidFields Detailed explanation of each validation error, when applicable. * * @return self */ diff --git a/src/Adyen/Model/Management/SplitConfiguration.php b/src/Adyen/Model/Management/SplitConfiguration.php new file mode 100644 index 000000000..037b20009 --- /dev/null +++ b/src/Adyen/Model/Management/SplitConfiguration.php @@ -0,0 +1,492 @@ + + */ +class SplitConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SplitConfiguration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'rules' => '\Adyen\Model\Management\SplitConfigurationRule[]', + 'splitConfigurationId' => 'string', + 'stores' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'rules' => null, + 'splitConfigurationId' => null, + 'stores' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'rules' => false, + 'splitConfigurationId' => false, + 'stores' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', + 'rules' => 'rules', + 'splitConfigurationId' => 'splitConfigurationId', + 'stores' => 'stores' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'rules' => 'setRules', + 'splitConfigurationId' => 'setSplitConfigurationId', + 'stores' => 'setStores' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'rules' => 'getRules', + 'splitConfigurationId' => 'getSplitConfigurationId', + 'stores' => 'getStores' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('rules', $data ?? [], null); + $this->setIfExists('splitConfigurationId', $data ?? [], null); + $this->setIfExists('stores', $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['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['rules'] === null) { + $invalidProperties[] = "'rules' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Your description for the split configuration. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets rules + * + * @return \Adyen\Model\Management\SplitConfigurationRule[] + */ + public function getRules() + { + return $this->container['rules']; + } + + /** + * Sets rules + * + * @param \Adyen\Model\Management\SplitConfigurationRule[] $rules Array of rules that define the split configuration behavior. + * + * @return self + */ + public function setRules($rules) + { + if (is_null($rules)) { + throw new \InvalidArgumentException('non-nullable rules cannot be null'); + } + $this->container['rules'] = $rules; + + return $this; + } + + /** + * Gets splitConfigurationId + * + * @return string|null + */ + public function getSplitConfigurationId() + { + return $this->container['splitConfigurationId']; + } + + /** + * Sets splitConfigurationId + * + * @param string|null $splitConfigurationId Unique identifier of the split configuration. + * + * @return self + */ + public function setSplitConfigurationId($splitConfigurationId) + { + if (is_null($splitConfigurationId)) { + throw new \InvalidArgumentException('non-nullable splitConfigurationId cannot be null'); + } + $this->container['splitConfigurationId'] = $splitConfigurationId; + + return $this; + } + + /** + * Gets stores + * + * @return string[]|null + */ + public function getStores() + { + return $this->container['stores']; + } + + /** + * Sets stores + * + * @param string[]|null $stores List of stores to which the split configuration applies. + * + * @return self + */ + public function setStores($stores) + { + if (is_null($stores)) { + throw new \InvalidArgumentException('non-nullable stores cannot be null'); + } + $this->container['stores'] = $stores; + + 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/SplitConfigurationList.php b/src/Adyen/Model/Management/SplitConfigurationList.php new file mode 100644 index 000000000..044b9ac46 --- /dev/null +++ b/src/Adyen/Model/Management/SplitConfigurationList.php @@ -0,0 +1,384 @@ + + */ +class SplitConfigurationList implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SplitConfigurationList'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\Management\SplitConfiguration[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => 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' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * 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); + } + + /** + * 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 data + * + * @return \Adyen\Model\Management\SplitConfiguration[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\Management\SplitConfiguration[]|null $data List of split configurations applied to the stores under the merchant account. + * + * @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; + } + /** + * 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/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php new file mode 100644 index 000000000..9667ea2bb --- /dev/null +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -0,0 +1,795 @@ + + */ +class SplitConfigurationLogic implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SplitConfigurationLogic'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalCommission' => '\Adyen\Model\Management\AdditionalCommission', + 'chargeback' => 'string', + 'commission' => '\Adyen\Model\Management\Commission', + 'paymentFee' => 'string', + 'remainder' => 'string', + 'splitLogicId' => 'string', + 'surcharge' => 'string', + 'tip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalCommission' => null, + 'chargeback' => null, + 'commission' => null, + 'paymentFee' => null, + 'remainder' => null, + 'splitLogicId' => null, + 'surcharge' => null, + 'tip' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalCommission' => false, + 'chargeback' => false, + 'commission' => false, + 'paymentFee' => false, + 'remainder' => false, + 'splitLogicId' => false, + 'surcharge' => false, + 'tip' => 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 = [ + 'additionalCommission' => 'additionalCommission', + 'chargeback' => 'chargeback', + 'commission' => 'commission', + 'paymentFee' => 'paymentFee', + 'remainder' => 'remainder', + 'splitLogicId' => 'splitLogicId', + 'surcharge' => 'surcharge', + 'tip' => 'tip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalCommission' => 'setAdditionalCommission', + 'chargeback' => 'setChargeback', + 'commission' => 'setCommission', + 'paymentFee' => 'setPaymentFee', + 'remainder' => 'setRemainder', + 'splitLogicId' => 'setSplitLogicId', + 'surcharge' => 'setSurcharge', + 'tip' => 'setTip' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalCommission' => 'getAdditionalCommission', + 'chargeback' => 'getChargeback', + 'commission' => 'getCommission', + 'paymentFee' => 'getPaymentFee', + 'remainder' => 'getRemainder', + 'splitLogicId' => 'getSplitLogicId', + 'surcharge' => 'getSurcharge', + 'tip' => 'getTip' + ]; + + /** + * 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 CHARGEBACK_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const CHARGEBACK_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO = 'deductAccordingToSplitRatio'; + public const PAYMENT_FEE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const PAYMENT_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const REMAINDER_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; + public const REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + public const SURCHARGE_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; + public const SURCHARGE_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + public const TIP_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; + public const TIP_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChargebackAllowableValues() + { + return [ + self::CHARGEBACK_DEDUCT_FROM_LIABLE_ACCOUNT, + self::CHARGEBACK_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + self::CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaymentFeeAllowableValues() + { + return [ + self::PAYMENT_FEE_DEDUCT_FROM_LIABLE_ACCOUNT, + self::PAYMENT_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRemainderAllowableValues() + { + return [ + self::REMAINDER_ADD_TO_LIABLE_ACCOUNT, + self::REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSurchargeAllowableValues() + { + return [ + self::SURCHARGE_ADD_TO_LIABLE_ACCOUNT, + self::SURCHARGE_ADD_TO_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTipAllowableValues() + { + return [ + self::TIP_ADD_TO_LIABLE_ACCOUNT, + self::TIP_ADD_TO_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * 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('additionalCommission', $data ?? [], null); + $this->setIfExists('chargeback', $data ?? [], null); + $this->setIfExists('commission', $data ?? [], null); + $this->setIfExists('paymentFee', $data ?? [], null); + $this->setIfExists('remainder', $data ?? [], null); + $this->setIfExists('splitLogicId', $data ?? [], null); + $this->setIfExists('surcharge', $data ?? [], null); + $this->setIfExists('tip', $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->getChargebackAllowableValues(); + if (!is_null($this->container['chargeback']) && !in_array($this->container['chargeback'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chargeback', must be one of '%s'", + $this->container['chargeback'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['commission'] === null) { + $invalidProperties[] = "'commission' can't be null"; + } + if ($this->container['paymentFee'] === null) { + $invalidProperties[] = "'paymentFee' can't be null"; + } + $allowedValues = $this->getPaymentFeeAllowableValues(); + if (!is_null($this->container['paymentFee']) && !in_array($this->container['paymentFee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paymentFee', must be one of '%s'", + $this->container['paymentFee'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getRemainderAllowableValues(); + if (!is_null($this->container['remainder']) && !in_array($this->container['remainder'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'remainder', must be one of '%s'", + $this->container['remainder'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSurchargeAllowableValues(); + if (!is_null($this->container['surcharge']) && !in_array($this->container['surcharge'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'surcharge', must be one of '%s'", + $this->container['surcharge'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTipAllowableValues(); + if (!is_null($this->container['tip']) && !in_array($this->container['tip'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tip', must be one of '%s'", + $this->container['tip'], + 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 additionalCommission + * + * @return \Adyen\Model\Management\AdditionalCommission|null + */ + public function getAdditionalCommission() + { + return $this->container['additionalCommission']; + } + + /** + * Sets additionalCommission + * + * @param \Adyen\Model\Management\AdditionalCommission|null $additionalCommission additionalCommission + * + * @return self + */ + public function setAdditionalCommission($additionalCommission) + { + if (is_null($additionalCommission)) { + throw new \InvalidArgumentException('non-nullable additionalCommission cannot be null'); + } + $this->container['additionalCommission'] = $additionalCommission; + + return $this; + } + + /** + * Gets chargeback + * + * @return string|null + */ + public function getChargeback() + { + return $this->container['chargeback']; + } + + /** + * Sets chargeback + * + * @param string|null $chargeback Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + * + * @return self + */ + public function setChargeback($chargeback) + { + if (is_null($chargeback)) { + throw new \InvalidArgumentException('non-nullable chargeback cannot be null'); + } + $allowedValues = $this->getChargebackAllowableValues(); + if (!in_array($chargeback, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chargeback', must be one of '%s'", + $chargeback, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chargeback'] = $chargeback; + + return $this; + } + + /** + * Gets commission + * + * @return \Adyen\Model\Management\Commission + */ + public function getCommission() + { + return $this->container['commission']; + } + + /** + * Sets commission + * + * @param \Adyen\Model\Management\Commission $commission commission + * + * @return self + */ + public function setCommission($commission) + { + if (is_null($commission)) { + throw new \InvalidArgumentException('non-nullable commission cannot be null'); + } + $this->container['commission'] = $commission; + + return $this; + } + + /** + * Gets paymentFee + * + * @return string + */ + public function getPaymentFee() + { + return $this->container['paymentFee']; + } + + /** + * Sets paymentFee + * + * @param string $paymentFee Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setPaymentFee($paymentFee) + { + if (is_null($paymentFee)) { + throw new \InvalidArgumentException('non-nullable paymentFee cannot be null'); + } + $allowedValues = $this->getPaymentFeeAllowableValues(); + if (!in_array($paymentFee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paymentFee', must be one of '%s'", + $paymentFee, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paymentFee'] = $paymentFee; + + return $this; + } + + /** + * Gets remainder + * + * @return string|null + */ + public function getRemainder() + { + return $this->container['remainder']; + } + + /** + * Sets remainder + * + * @param string|null $remainder Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + * + * @return self + */ + public function setRemainder($remainder) + { + if (is_null($remainder)) { + throw new \InvalidArgumentException('non-nullable remainder cannot be null'); + } + $allowedValues = $this->getRemainderAllowableValues(); + if (!in_array($remainder, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'remainder', must be one of '%s'", + $remainder, + implode("', '", $allowedValues) + ) + ); + } + $this->container['remainder'] = $remainder; + + return $this; + } + + /** + * Gets splitLogicId + * + * @return string|null + */ + public function getSplitLogicId() + { + return $this->container['splitLogicId']; + } + + /** + * Sets splitLogicId + * + * @param string|null $splitLogicId Unique identifier of the split logic that is applied when the split configuration conditions are met. + * + * @return self + */ + public function setSplitLogicId($splitLogicId) + { + if (is_null($splitLogicId)) { + throw new \InvalidArgumentException('non-nullable splitLogicId cannot be null'); + } + $this->container['splitLogicId'] = $splitLogicId; + + return $this; + } + + /** + * Gets surcharge + * + * @return string|null + */ + public function getSurcharge() + { + return $this->container['surcharge']; + } + + /** + * Sets surcharge + * + * @param string|null $surcharge Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + * + * @return self + */ + public function setSurcharge($surcharge) + { + if (is_null($surcharge)) { + throw new \InvalidArgumentException('non-nullable surcharge cannot be null'); + } + $allowedValues = $this->getSurchargeAllowableValues(); + if (!in_array($surcharge, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'surcharge', must be one of '%s'", + $surcharge, + implode("', '", $allowedValues) + ) + ); + } + $this->container['surcharge'] = $surcharge; + + return $this; + } + + /** + * Gets tip + * + * @return string|null + */ + public function getTip() + { + return $this->container['tip']; + } + + /** + * Sets tip + * + * @param string|null $tip Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + * + * @return self + */ + public function setTip($tip) + { + if (is_null($tip)) { + throw new \InvalidArgumentException('non-nullable tip cannot be null'); + } + $allowedValues = $this->getTipAllowableValues(); + if (!in_array($tip, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tip', must be one of '%s'", + $tip, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tip'] = $tip; + + 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/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php new file mode 100644 index 000000000..c2d8335cb --- /dev/null +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -0,0 +1,640 @@ + + */ +class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SplitConfigurationRule'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'fundingSource' => 'string', + 'paymentMethod' => 'string', + 'ruleId' => 'string', + 'shopperInteraction' => 'string', + 'splitLogic' => '\Adyen\Model\Management\SplitConfigurationLogic' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'fundingSource' => null, + 'paymentMethod' => null, + 'ruleId' => null, + 'shopperInteraction' => null, + 'splitLogic' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'fundingSource' => false, + 'paymentMethod' => false, + 'ruleId' => false, + 'shopperInteraction' => false, + 'splitLogic' => 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 = [ + 'currency' => 'currency', + 'fundingSource' => 'fundingSource', + 'paymentMethod' => 'paymentMethod', + 'ruleId' => 'ruleId', + 'shopperInteraction' => 'shopperInteraction', + 'splitLogic' => 'splitLogic' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'fundingSource' => 'setFundingSource', + 'paymentMethod' => 'setPaymentMethod', + 'ruleId' => 'setRuleId', + 'shopperInteraction' => 'setShopperInteraction', + 'splitLogic' => 'setSplitLogic' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'fundingSource' => 'getFundingSource', + 'paymentMethod' => 'getPaymentMethod', + 'ruleId' => 'getRuleId', + 'shopperInteraction' => 'getShopperInteraction', + 'splitLogic' => 'getSplitLogic' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const FUNDING_SOURCE_ANY = 'ANY'; + public const SHOPPER_INTERACTION_ECOMMERCE = 'Ecommerce'; + public const SHOPPER_INTERACTION_CONT_AUTH = 'ContAuth'; + public const SHOPPER_INTERACTION_MOTO = 'Moto'; + public const SHOPPER_INTERACTION_POS = 'POS'; + public const SHOPPER_INTERACTION_ANY = 'ANY'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + self::FUNDING_SOURCE_ANY, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShopperInteractionAllowableValues() + { + return [ + self::SHOPPER_INTERACTION_ECOMMERCE, + self::SHOPPER_INTERACTION_CONT_AUTH, + self::SHOPPER_INTERACTION_MOTO, + self::SHOPPER_INTERACTION_POS, + self::SHOPPER_INTERACTION_ANY, + ]; + } + /** + * 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('currency', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('ruleId', $data ?? [], null); + $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('splitLogic', $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['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['paymentMethod'] === null) { + $invalidProperties[] = "'paymentMethod' can't be null"; + } + if ($this->container['shopperInteraction'] === null) { + $invalidProperties[] = "'shopperInteraction' can't be null"; + } + $allowedValues = $this->getShopperInteractionAllowableValues(); + if (!is_null($this->container['shopperInteraction']) && !in_array($this->container['shopperInteraction'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'shopperInteraction', must be one of '%s'", + $this->container['shopperInteraction'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['splitLogic'] === null) { + $invalidProperties[] = "'splitLogic' 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 currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + * + * @return self + */ + public function setCurrency($currency) + { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets paymentMethod + * + * @return string + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param string $paymentMethod The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. + * + * @return self + */ + public function setPaymentMethod($paymentMethod) + { + if (is_null($paymentMethod)) { + throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); + } + $this->container['paymentMethod'] = $paymentMethod; + + return $this; + } + + /** + * Gets ruleId + * + * @return string|null + */ + public function getRuleId() + { + return $this->container['ruleId']; + } + + /** + * Sets ruleId + * + * @param string|null $ruleId The unique identifier of the split configuration rule. + * + * @return self + */ + public function setRuleId($ruleId) + { + if (is_null($ruleId)) { + throw new \InvalidArgumentException('non-nullable ruleId cannot be null'); + } + $this->container['ruleId'] = $ruleId; + + return $this; + } + + /** + * Gets shopperInteraction + * + * @return string + */ + public function getShopperInteraction() + { + return $this->container['shopperInteraction']; + } + + /** + * Sets shopperInteraction + * + * @param string $shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. + * + * @return self + */ + public function setShopperInteraction($shopperInteraction) + { + if (is_null($shopperInteraction)) { + throw new \InvalidArgumentException('non-nullable shopperInteraction cannot be null'); + } + $allowedValues = $this->getShopperInteractionAllowableValues(); + if (!in_array($shopperInteraction, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'shopperInteraction', must be one of '%s'", + $shopperInteraction, + implode("', '", $allowedValues) + ) + ); + } + $this->container['shopperInteraction'] = $shopperInteraction; + + return $this; + } + + /** + * Gets splitLogic + * + * @return \Adyen\Model\Management\SplitConfigurationLogic + */ + public function getSplitLogic() + { + return $this->container['splitLogic']; + } + + /** + * Sets splitLogic + * + * @param \Adyen\Model\Management\SplitConfigurationLogic $splitLogic splitLogic + * + * @return self + */ + public function setSplitLogic($splitLogic) + { + if (is_null($splitLogic)) { + throw new \InvalidArgumentException('non-nullable splitLogic cannot be null'); + } + $this->container['splitLogic'] = $splitLogic; + + 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/StoreCreationRequest.php b/src/Adyen/Model/Management/StoreCreationRequest.php index 1392056e8..75f9987c4 100644 --- a/src/Adyen/Model/Management/StoreCreationRequest.php +++ b/src/Adyen/Model/Management/StoreCreationRequest.php @@ -377,7 +377,7 @@ public function getBusinessLineIds() /** * Sets businessLineIds * - * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. * * @return self */ @@ -431,7 +431,7 @@ public function getExternalReferenceId() /** * Sets externalReferenceId * - * @param string|null $externalReferenceId When using the Zip payment method: The location ID that Zip has assigned to your store. + * @param string|null $externalReferenceId Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. * * @return self */ @@ -485,7 +485,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). * * @return self */ diff --git a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php index 26bdb04fc..588c51c91 100644 --- a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php +++ b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php @@ -387,7 +387,7 @@ public function getBusinessLineIds() /** * Sets businessLineIds * - * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. * * @return self */ @@ -441,7 +441,7 @@ public function getExternalReferenceId() /** * Sets externalReferenceId * - * @param string|null $externalReferenceId When using the Zip payment method: The location ID that Zip has assigned to your store. + * @param string|null $externalReferenceId Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. * * @return self */ @@ -522,7 +522,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). * * @return self */ diff --git a/src/Adyen/Model/Management/TerminalOrderRequest.php b/src/Adyen/Model/Management/TerminalOrderRequest.php index 7e3f2e98b..baee03954 100644 --- a/src/Adyen/Model/Management/TerminalOrderRequest.php +++ b/src/Adyen/Model/Management/TerminalOrderRequest.php @@ -47,6 +47,7 @@ class TerminalOrderRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'billingEntityId' => 'string', 'customerOrderReference' => 'string', 'items' => '\Adyen\Model\Management\OrderItem[]', + 'orderType' => 'string', 'shippingLocationId' => 'string', 'taxId' => 'string' ]; @@ -62,6 +63,7 @@ class TerminalOrderRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'billingEntityId' => null, 'customerOrderReference' => null, 'items' => null, + 'orderType' => null, 'shippingLocationId' => null, 'taxId' => null ]; @@ -75,6 +77,7 @@ class TerminalOrderRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'billingEntityId' => false, 'customerOrderReference' => false, 'items' => false, + 'orderType' => false, 'shippingLocationId' => false, 'taxId' => false ]; @@ -168,6 +171,7 @@ public function isNullableSetToNull(string $property): bool 'billingEntityId' => 'billingEntityId', 'customerOrderReference' => 'customerOrderReference', 'items' => 'items', + 'orderType' => 'orderType', 'shippingLocationId' => 'shippingLocationId', 'taxId' => 'taxId' ]; @@ -181,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'billingEntityId' => 'setBillingEntityId', 'customerOrderReference' => 'setCustomerOrderReference', 'items' => 'setItems', + 'orderType' => 'setOrderType', 'shippingLocationId' => 'setShippingLocationId', 'taxId' => 'setTaxId' ]; @@ -194,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'billingEntityId' => 'getBillingEntityId', 'customerOrderReference' => 'getCustomerOrderReference', 'items' => 'getItems', + 'orderType' => 'getOrderType', 'shippingLocationId' => 'getShippingLocationId', 'taxId' => 'getTaxId' ]; @@ -258,6 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('billingEntityId', $data ?? [], null); $this->setIfExists('customerOrderReference', $data ?? [], null); $this->setIfExists('items', $data ?? [], null); + $this->setIfExists('orderType', $data ?? [], null); $this->setIfExists('shippingLocationId', $data ?? [], null); $this->setIfExists('taxId', $data ?? [], null); } @@ -385,6 +392,33 @@ public function setItems($items) return $this; } + /** + * Gets orderType + * + * @return string|null + */ + public function getOrderType() + { + return $this->container['orderType']; + } + + /** + * Sets orderType + * + * @param string|null $orderType Type of order + * + * @return self + */ + public function setOrderType($orderType) + { + if (is_null($orderType)) { + throw new \InvalidArgumentException('non-nullable orderType cannot be null'); + } + $this->container['orderType'] = $orderType; + + return $this; + } + /** * Gets shippingLocationId * diff --git a/src/Adyen/Model/Management/TerminalProductPrice.php b/src/Adyen/Model/Management/TerminalProductPrice.php index 3fbeb8fbc..aa5dee09c 100644 --- a/src/Adyen/Model/Management/TerminalProductPrice.php +++ b/src/Adyen/Model/Management/TerminalProductPrice.php @@ -45,7 +45,7 @@ class TerminalProductPrice implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPITypes = [ 'currency' => 'string', - 'value' => 'object' + 'value' => 'float' ]; /** @@ -57,7 +57,7 @@ class TerminalProductPrice implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPIFormats = [ 'currency' => null, - 'value' => null + 'value' => 'double' ]; /** @@ -313,7 +313,7 @@ public function setCurrency($currency) /** * Gets value * - * @return object|null + * @return float|null */ public function getValue() { @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param object|null $value value + * @param float|null $value The price of the item. * * @return self */ diff --git a/src/Adyen/Model/Management/TwintInfo.php b/src/Adyen/Model/Management/TwintInfo.php new file mode 100644 index 000000000..31b53cf05 --- /dev/null +++ b/src/Adyen/Model/Management/TwintInfo.php @@ -0,0 +1,387 @@ + + */ +class TwintInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TwintInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'logo' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'logo' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'logo' => 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 = [ + 'logo' => 'logo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'logo' => 'setLogo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'logo' => 'getLogo' + ]; + + /** + * 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('logo', $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['logo'] === null) { + $invalidProperties[] = "'logo' 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 logo + * + * @return string + */ + public function getLogo() + { + return $this->container['logo']; + } + + /** + * Sets logo + * + * @param string $logo Twint logo. Format: Base64-encoded string. + * + * @return self + */ + public function setLogo($logo) + { + if (is_null($logo)) { + throw new \InvalidArgumentException('non-nullable logo cannot be null'); + } + $this->container['logo'] = $logo; + + 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/UpdateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php index cc776cee5..89fbe4412 100644 --- a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php @@ -425,7 +425,7 @@ public function getRoles() /** * Sets roles * - * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) of the API credential. + * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. * * @return self */ diff --git a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php index 7d5e8e14d..0cf79d24f 100644 --- a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php @@ -47,8 +47,6 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => 'string[]', 'active' => 'bool', 'associatedMerchantAccounts' => 'string[]', - 'authnAppsToAdd' => 'string[]', - 'authnAppsToRemove' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name2', 'roles' => 'string[]', @@ -66,8 +64,6 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => null, 'active' => null, 'associatedMerchantAccounts' => null, - 'authnAppsToAdd' => null, - 'authnAppsToRemove' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -83,8 +79,6 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => false, 'active' => false, 'associatedMerchantAccounts' => false, - 'authnAppsToAdd' => false, - 'authnAppsToRemove' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -180,8 +174,6 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'accountGroups', 'active' => 'active', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnAppsToAdd' => 'authnAppsToAdd', - 'authnAppsToRemove' => 'authnAppsToRemove', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -197,8 +189,6 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnAppsToAdd' => 'setAuthnAppsToAdd', - 'authnAppsToRemove' => 'setAuthnAppsToRemove', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -214,8 +204,6 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnAppsToAdd' => 'getAuthnAppsToAdd', - 'authnAppsToRemove' => 'getAuthnAppsToRemove', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -282,8 +270,6 @@ public function __construct(array $data = null) $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnAppsToAdd', $data ?? [], null); - $this->setIfExists('authnAppsToRemove', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -413,60 +399,6 @@ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) return $this; } - /** - * Gets authnAppsToAdd - * - * @return string[]|null - */ - public function getAuthnAppsToAdd() - { - return $this->container['authnAppsToAdd']; - } - - /** - * Sets authnAppsToAdd - * - * @param string[]|null $authnAppsToAdd Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnAppsToAdd($authnAppsToAdd) - { - if (is_null($authnAppsToAdd)) { - throw new \InvalidArgumentException('non-nullable authnAppsToAdd cannot be null'); - } - $this->container['authnAppsToAdd'] = $authnAppsToAdd; - - return $this; - } - - /** - * Gets authnAppsToRemove - * - * @return string[]|null - */ - public function getAuthnAppsToRemove() - { - return $this->container['authnAppsToRemove']; - } - - /** - * Sets authnAppsToRemove - * - * @param string[]|null $authnAppsToRemove Set of authn apps to remove from this user - * - * @return self - */ - public function setAuthnAppsToRemove($authnAppsToRemove) - { - if (is_null($authnAppsToRemove)) { - throw new \InvalidArgumentException('non-nullable authnAppsToRemove cannot be null'); - } - $this->container['authnAppsToRemove'] = $authnAppsToRemove; - - return $this; - } - /** * Gets email * diff --git a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php index c196df617..7791e64ba 100644 --- a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php @@ -305,14 +305,9 @@ public function getModelName() public const FILTER_MERCHANT_ACCOUNT_TYPE_ALL_ACCOUNTS = 'allAccounts'; public const FILTER_MERCHANT_ACCOUNT_TYPE_EXCLUDE_ACCOUNTS = 'excludeAccounts'; public const FILTER_MERCHANT_ACCOUNT_TYPE_INCLUDE_ACCOUNTS = 'includeAccounts'; - public const NETWORK_TYPE_LOCAL = 'LOCAL'; - public const NETWORK_TYPE__PUBLIC = 'PUBLIC'; + public const NETWORK_TYPE_LOCAL = 'local'; + public const NETWORK_TYPE__PUBLIC = 'public'; public const SSL_VERSION_HTTP = 'HTTP'; - public const SSL_VERSION_SSL = 'SSL'; - public const SSL_VERSION_SSLV3 = 'SSLv3'; - public const SSL_VERSION_TLS = 'TLS'; - public const SSL_VERSION_TLSV1 = 'TLSv1'; - public const SSL_VERSION_TLSV1_1 = 'TLSv1.1'; public const SSL_VERSION_TLSV1_2 = 'TLSv1.2'; public const SSL_VERSION_TLSV1_3 = 'TLSv1.3'; @@ -363,11 +358,6 @@ public function getSslVersionAllowableValues() { return [ self::SSL_VERSION_HTTP, - self::SSL_VERSION_SSL, - self::SSL_VERSION_SSLV3, - self::SSL_VERSION_TLS, - self::SSL_VERSION_TLSV1, - self::SSL_VERSION_TLSV1_1, self::SSL_VERSION_TLSV1_2, self::SSL_VERSION_TLSV1_3, ]; diff --git a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php index 415c96399..6b2fecd93 100644 --- a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php @@ -391,7 +391,7 @@ public function getRoles() /** * Sets roles * - * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + * @param string[]|null $roles List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. * * @return self */ diff --git a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php index 85d8f7975..a4f582b77 100644 --- a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php @@ -46,8 +46,6 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPITypes = [ 'accountGroups' => 'string[]', 'active' => 'bool', - 'authnAppsToAdd' => 'string[]', - 'authnAppsToRemove' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name2', 'roles' => 'string[]', @@ -64,8 +62,6 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPIFormats = [ 'accountGroups' => null, 'active' => null, - 'authnAppsToAdd' => null, - 'authnAppsToRemove' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -80,8 +76,6 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPINullables = [ 'accountGroups' => false, 'active' => false, - 'authnAppsToAdd' => false, - 'authnAppsToRemove' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -176,8 +170,6 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountGroups' => 'accountGroups', 'active' => 'active', - 'authnAppsToAdd' => 'authnAppsToAdd', - 'authnAppsToRemove' => 'authnAppsToRemove', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -192,8 +184,6 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', - 'authnAppsToAdd' => 'setAuthnAppsToAdd', - 'authnAppsToRemove' => 'setAuthnAppsToRemove', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -208,8 +198,6 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', - 'authnAppsToAdd' => 'getAuthnAppsToAdd', - 'authnAppsToRemove' => 'getAuthnAppsToRemove', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -275,8 +263,6 @@ public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('authnAppsToAdd', $data ?? [], null); - $this->setIfExists('authnAppsToRemove', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -379,60 +365,6 @@ public function setActive($active) return $this; } - /** - * Gets authnAppsToAdd - * - * @return string[]|null - */ - public function getAuthnAppsToAdd() - { - return $this->container['authnAppsToAdd']; - } - - /** - * Sets authnAppsToAdd - * - * @param string[]|null $authnAppsToAdd Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnAppsToAdd($authnAppsToAdd) - { - if (is_null($authnAppsToAdd)) { - throw new \InvalidArgumentException('non-nullable authnAppsToAdd cannot be null'); - } - $this->container['authnAppsToAdd'] = $authnAppsToAdd; - - return $this; - } - - /** - * Gets authnAppsToRemove - * - * @return string[]|null - */ - public function getAuthnAppsToRemove() - { - return $this->container['authnAppsToRemove']; - } - - /** - * Sets authnAppsToRemove - * - * @param string[]|null $authnAppsToRemove Set of authn apps to remove from this user - * - * @return self - */ - public function setAuthnAppsToRemove($authnAppsToRemove) - { - if (is_null($authnAppsToRemove)) { - throw new \InvalidArgumentException('non-nullable authnAppsToRemove cannot be null'); - } - $this->container['authnAppsToRemove'] = $authnAppsToRemove; - - return $this; - } - /** * Gets email * diff --git a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php index fc5b14204..1a9a59a3e 100644 --- a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php @@ -290,14 +290,9 @@ public function getModelName() public const COMMUNICATION_FORMAT_HTTP = 'http'; public const COMMUNICATION_FORMAT_JSON = 'json'; public const COMMUNICATION_FORMAT_SOAP = 'soap'; - public const NETWORK_TYPE_LOCAL = 'LOCAL'; - public const NETWORK_TYPE__PUBLIC = 'PUBLIC'; + public const NETWORK_TYPE_LOCAL = 'local'; + public const NETWORK_TYPE__PUBLIC = 'public'; public const SSL_VERSION_HTTP = 'HTTP'; - public const SSL_VERSION_SSL = 'SSL'; - public const SSL_VERSION_SSLV3 = 'SSLv3'; - public const SSL_VERSION_TLS = 'TLS'; - public const SSL_VERSION_TLSV1 = 'TLSv1'; - public const SSL_VERSION_TLSV1_1 = 'TLSv1.1'; public const SSL_VERSION_TLSV1_2 = 'TLSv1.2'; public const SSL_VERSION_TLSV1_3 = 'TLSv1.3'; @@ -335,11 +330,6 @@ public function getSslVersionAllowableValues() { return [ self::SSL_VERSION_HTTP, - self::SSL_VERSION_SSL, - self::SSL_VERSION_SSLV3, - self::SSL_VERSION_TLS, - self::SSL_VERSION_TLSV1, - self::SSL_VERSION_TLSV1_1, self::SSL_VERSION_TLSV1_2, self::SSL_VERSION_TLSV1_3, ]; diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index 0d53a3277..a5d23c0e7 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -44,11 +44,11 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ + 'bcmc' => '\Adyen\Model\Management\BcmcInfo', + 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', 'countries' => 'string[]', 'currencies' => 'string[]', - 'customRoutingFlags' => 'string[]', 'enabled' => 'bool', - 'shopperStatement' => '\Adyen\Model\Management\ShopperStatement', 'storeIds' => 'string[]' ]; @@ -60,11 +60,11 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ + 'bcmc' => null, + 'cartesBancaires' => null, 'countries' => null, 'currencies' => null, - 'customRoutingFlags' => null, 'enabled' => null, - 'shopperStatement' => null, 'storeIds' => null ]; @@ -74,11 +74,11 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static $openAPINullables = [ + 'bcmc' => false, + 'cartesBancaires' => false, 'countries' => false, 'currencies' => false, - 'customRoutingFlags' => false, 'enabled' => false, - 'shopperStatement' => false, 'storeIds' => false ]; @@ -168,11 +168,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'bcmc' => 'bcmc', + 'cartesBancaires' => 'cartesBancaires', 'countries' => 'countries', 'currencies' => 'currencies', - 'customRoutingFlags' => 'customRoutingFlags', 'enabled' => 'enabled', - 'shopperStatement' => 'shopperStatement', 'storeIds' => 'storeIds' ]; @@ -182,11 +182,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'bcmc' => 'setBcmc', + 'cartesBancaires' => 'setCartesBancaires', 'countries' => 'setCountries', 'currencies' => 'setCurrencies', - 'customRoutingFlags' => 'setCustomRoutingFlags', 'enabled' => 'setEnabled', - 'shopperStatement' => 'setShopperStatement', 'storeIds' => 'setStoreIds' ]; @@ -196,11 +196,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'bcmc' => 'getBcmc', + 'cartesBancaires' => 'getCartesBancaires', 'countries' => 'getCountries', 'currencies' => 'getCurrencies', - 'customRoutingFlags' => 'getCustomRoutingFlags', 'enabled' => 'getEnabled', - 'shopperStatement' => 'getShopperStatement', 'storeIds' => 'getStoreIds' ]; @@ -261,11 +261,11 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('bcmc', $data ?? [], null); + $this->setIfExists('cartesBancaires', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); - $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); } @@ -312,136 +312,136 @@ public function valid() /** - * Gets countries + * Gets bcmc * - * @return string[]|null + * @return \Adyen\Model\Management\BcmcInfo|null */ - public function getCountries() + public function getBcmc() { - return $this->container['countries']; + return $this->container['bcmc']; } /** - * Sets countries + * Sets bcmc * - * @param string[]|null $countries The list of countries where a payment method is available. By default, all countries supported by the payment method. + * @param \Adyen\Model\Management\BcmcInfo|null $bcmc bcmc * * @return self */ - public function setCountries($countries) + public function setBcmc($bcmc) { - if (is_null($countries)) { - throw new \InvalidArgumentException('non-nullable countries cannot be null'); + if (is_null($bcmc)) { + throw new \InvalidArgumentException('non-nullable bcmc cannot be null'); } - $this->container['countries'] = $countries; + $this->container['bcmc'] = $bcmc; return $this; } /** - * Gets currencies + * Gets cartesBancaires * - * @return string[]|null + * @return \Adyen\Model\Management\CartesBancairesInfo|null */ - public function getCurrencies() + public function getCartesBancaires() { - return $this->container['currencies']; + return $this->container['cartesBancaires']; } /** - * Sets currencies + * Sets cartesBancaires * - * @param string[]|null $currencies The list of currencies that a payment method supports. By default, all currencies supported by the payment method. + * @param \Adyen\Model\Management\CartesBancairesInfo|null $cartesBancaires cartesBancaires * * @return self */ - public function setCurrencies($currencies) + public function setCartesBancaires($cartesBancaires) { - if (is_null($currencies)) { - throw new \InvalidArgumentException('non-nullable currencies cannot be null'); + if (is_null($cartesBancaires)) { + throw new \InvalidArgumentException('non-nullable cartesBancaires cannot be null'); } - $this->container['currencies'] = $currencies; + $this->container['cartesBancaires'] = $cartesBancaires; return $this; } /** - * Gets customRoutingFlags + * Gets countries * * @return string[]|null */ - public function getCustomRoutingFlags() + public function getCountries() { - return $this->container['customRoutingFlags']; + return $this->container['countries']; } /** - * Sets customRoutingFlags + * Sets countries * - * @param string[]|null $customRoutingFlags Custom routing flags for acquirer routing. + * @param string[]|null $countries The list of countries where a payment method is available. By default, all countries supported by the payment method. * * @return self */ - public function setCustomRoutingFlags($customRoutingFlags) + public function setCountries($countries) { - if (is_null($customRoutingFlags)) { - throw new \InvalidArgumentException('non-nullable customRoutingFlags cannot be null'); + if (is_null($countries)) { + throw new \InvalidArgumentException('non-nullable countries cannot be null'); } - $this->container['customRoutingFlags'] = $customRoutingFlags; + $this->container['countries'] = $countries; return $this; } /** - * Gets enabled + * Gets currencies * - * @return bool|null + * @return string[]|null */ - public function getEnabled() + public function getCurrencies() { - return $this->container['enabled']; + return $this->container['currencies']; } /** - * Sets enabled + * Sets currencies * - * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**). + * @param string[]|null $currencies The list of currencies that a payment method supports. By default, all currencies supported by the payment method. * * @return self */ - public function setEnabled($enabled) + public function setCurrencies($currencies) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($currencies)) { + throw new \InvalidArgumentException('non-nullable currencies cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['currencies'] = $currencies; return $this; } /** - * Gets shopperStatement + * Gets enabled * - * @return \Adyen\Model\Management\ShopperStatement|null + * @return bool|null */ - public function getShopperStatement() + public function getEnabled() { - return $this->container['shopperStatement']; + return $this->container['enabled']; } /** - * Sets shopperStatement + * Sets enabled * - * @param \Adyen\Model\Management\ShopperStatement|null $shopperStatement shopperStatement + * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**). * * @return self */ - public function setShopperStatement($shopperStatement) + public function setEnabled($enabled) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); } - $this->container['shopperStatement'] = $shopperStatement; + $this->container['enabled'] = $enabled; return $this; } diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php new file mode 100644 index 000000000..8e4f3b2e7 --- /dev/null +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -0,0 +1,795 @@ + + */ +class UpdateSplitConfigurationLogicRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UpdateSplitConfigurationLogicRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalCommission' => '\Adyen\Model\Management\AdditionalCommission', + 'chargeback' => 'string', + 'commission' => '\Adyen\Model\Management\Commission', + 'paymentFee' => 'string', + 'remainder' => 'string', + 'splitLogicId' => 'string', + 'surcharge' => 'string', + 'tip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalCommission' => null, + 'chargeback' => null, + 'commission' => null, + 'paymentFee' => null, + 'remainder' => null, + 'splitLogicId' => null, + 'surcharge' => null, + 'tip' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalCommission' => false, + 'chargeback' => false, + 'commission' => false, + 'paymentFee' => false, + 'remainder' => false, + 'splitLogicId' => false, + 'surcharge' => false, + 'tip' => 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 = [ + 'additionalCommission' => 'additionalCommission', + 'chargeback' => 'chargeback', + 'commission' => 'commission', + 'paymentFee' => 'paymentFee', + 'remainder' => 'remainder', + 'splitLogicId' => 'splitLogicId', + 'surcharge' => 'surcharge', + 'tip' => 'tip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalCommission' => 'setAdditionalCommission', + 'chargeback' => 'setChargeback', + 'commission' => 'setCommission', + 'paymentFee' => 'setPaymentFee', + 'remainder' => 'setRemainder', + 'splitLogicId' => 'setSplitLogicId', + 'surcharge' => 'setSurcharge', + 'tip' => 'setTip' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalCommission' => 'getAdditionalCommission', + 'chargeback' => 'getChargeback', + 'commission' => 'getCommission', + 'paymentFee' => 'getPaymentFee', + 'remainder' => 'getRemainder', + 'splitLogicId' => 'getSplitLogicId', + 'surcharge' => 'getSurcharge', + 'tip' => 'getTip' + ]; + + /** + * 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 CHARGEBACK_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const CHARGEBACK_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO = 'deductAccordingToSplitRatio'; + public const PAYMENT_FEE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const PAYMENT_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const REMAINDER_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; + public const REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + public const SURCHARGE_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; + public const SURCHARGE_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + public const TIP_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; + public const TIP_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChargebackAllowableValues() + { + return [ + self::CHARGEBACK_DEDUCT_FROM_LIABLE_ACCOUNT, + self::CHARGEBACK_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + self::CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaymentFeeAllowableValues() + { + return [ + self::PAYMENT_FEE_DEDUCT_FROM_LIABLE_ACCOUNT, + self::PAYMENT_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRemainderAllowableValues() + { + return [ + self::REMAINDER_ADD_TO_LIABLE_ACCOUNT, + self::REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSurchargeAllowableValues() + { + return [ + self::SURCHARGE_ADD_TO_LIABLE_ACCOUNT, + self::SURCHARGE_ADD_TO_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTipAllowableValues() + { + return [ + self::TIP_ADD_TO_LIABLE_ACCOUNT, + self::TIP_ADD_TO_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * 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('additionalCommission', $data ?? [], null); + $this->setIfExists('chargeback', $data ?? [], null); + $this->setIfExists('commission', $data ?? [], null); + $this->setIfExists('paymentFee', $data ?? [], null); + $this->setIfExists('remainder', $data ?? [], null); + $this->setIfExists('splitLogicId', $data ?? [], null); + $this->setIfExists('surcharge', $data ?? [], null); + $this->setIfExists('tip', $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->getChargebackAllowableValues(); + if (!is_null($this->container['chargeback']) && !in_array($this->container['chargeback'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chargeback', must be one of '%s'", + $this->container['chargeback'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['commission'] === null) { + $invalidProperties[] = "'commission' can't be null"; + } + if ($this->container['paymentFee'] === null) { + $invalidProperties[] = "'paymentFee' can't be null"; + } + $allowedValues = $this->getPaymentFeeAllowableValues(); + if (!is_null($this->container['paymentFee']) && !in_array($this->container['paymentFee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paymentFee', must be one of '%s'", + $this->container['paymentFee'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getRemainderAllowableValues(); + if (!is_null($this->container['remainder']) && !in_array($this->container['remainder'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'remainder', must be one of '%s'", + $this->container['remainder'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSurchargeAllowableValues(); + if (!is_null($this->container['surcharge']) && !in_array($this->container['surcharge'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'surcharge', must be one of '%s'", + $this->container['surcharge'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTipAllowableValues(); + if (!is_null($this->container['tip']) && !in_array($this->container['tip'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tip', must be one of '%s'", + $this->container['tip'], + 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 additionalCommission + * + * @return \Adyen\Model\Management\AdditionalCommission|null + */ + public function getAdditionalCommission() + { + return $this->container['additionalCommission']; + } + + /** + * Sets additionalCommission + * + * @param \Adyen\Model\Management\AdditionalCommission|null $additionalCommission additionalCommission + * + * @return self + */ + public function setAdditionalCommission($additionalCommission) + { + if (is_null($additionalCommission)) { + throw new \InvalidArgumentException('non-nullable additionalCommission cannot be null'); + } + $this->container['additionalCommission'] = $additionalCommission; + + return $this; + } + + /** + * Gets chargeback + * + * @return string|null + */ + public function getChargeback() + { + return $this->container['chargeback']; + } + + /** + * Sets chargeback + * + * @param string|null $chargeback Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + * + * @return self + */ + public function setChargeback($chargeback) + { + if (is_null($chargeback)) { + throw new \InvalidArgumentException('non-nullable chargeback cannot be null'); + } + $allowedValues = $this->getChargebackAllowableValues(); + if (!in_array($chargeback, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chargeback', must be one of '%s'", + $chargeback, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chargeback'] = $chargeback; + + return $this; + } + + /** + * Gets commission + * + * @return \Adyen\Model\Management\Commission + */ + public function getCommission() + { + return $this->container['commission']; + } + + /** + * Sets commission + * + * @param \Adyen\Model\Management\Commission $commission commission + * + * @return self + */ + public function setCommission($commission) + { + if (is_null($commission)) { + throw new \InvalidArgumentException('non-nullable commission cannot be null'); + } + $this->container['commission'] = $commission; + + return $this; + } + + /** + * Gets paymentFee + * + * @return string + */ + public function getPaymentFee() + { + return $this->container['paymentFee']; + } + + /** + * Sets paymentFee + * + * @param string $paymentFee Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setPaymentFee($paymentFee) + { + if (is_null($paymentFee)) { + throw new \InvalidArgumentException('non-nullable paymentFee cannot be null'); + } + $allowedValues = $this->getPaymentFeeAllowableValues(); + if (!in_array($paymentFee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paymentFee', must be one of '%s'", + $paymentFee, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paymentFee'] = $paymentFee; + + return $this; + } + + /** + * Gets remainder + * + * @return string|null + */ + public function getRemainder() + { + return $this->container['remainder']; + } + + /** + * Sets remainder + * + * @param string|null $remainder Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + * + * @return self + */ + public function setRemainder($remainder) + { + if (is_null($remainder)) { + throw new \InvalidArgumentException('non-nullable remainder cannot be null'); + } + $allowedValues = $this->getRemainderAllowableValues(); + if (!in_array($remainder, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'remainder', must be one of '%s'", + $remainder, + implode("', '", $allowedValues) + ) + ); + } + $this->container['remainder'] = $remainder; + + return $this; + } + + /** + * Gets splitLogicId + * + * @return string|null + */ + public function getSplitLogicId() + { + return $this->container['splitLogicId']; + } + + /** + * Sets splitLogicId + * + * @param string|null $splitLogicId Unique identifier of the split logic that is applied when the split configuration conditions are met. + * + * @return self + */ + public function setSplitLogicId($splitLogicId) + { + if (is_null($splitLogicId)) { + throw new \InvalidArgumentException('non-nullable splitLogicId cannot be null'); + } + $this->container['splitLogicId'] = $splitLogicId; + + return $this; + } + + /** + * Gets surcharge + * + * @return string|null + */ + public function getSurcharge() + { + return $this->container['surcharge']; + } + + /** + * Sets surcharge + * + * @param string|null $surcharge Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + * + * @return self + */ + public function setSurcharge($surcharge) + { + if (is_null($surcharge)) { + throw new \InvalidArgumentException('non-nullable surcharge cannot be null'); + } + $allowedValues = $this->getSurchargeAllowableValues(); + if (!in_array($surcharge, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'surcharge', must be one of '%s'", + $surcharge, + implode("', '", $allowedValues) + ) + ); + } + $this->container['surcharge'] = $surcharge; + + return $this; + } + + /** + * Gets tip + * + * @return string|null + */ + public function getTip() + { + return $this->container['tip']; + } + + /** + * Sets tip + * + * @param string|null $tip Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + * + * @return self + */ + public function setTip($tip) + { + if (is_null($tip)) { + throw new \InvalidArgumentException('non-nullable tip cannot be null'); + } + $allowedValues = $this->getTipAllowableValues(); + if (!in_array($tip, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tip', must be one of '%s'", + $tip, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tip'] = $tip; + + 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/UpdateSplitConfigurationRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php new file mode 100644 index 000000000..a1cded6a2 --- /dev/null +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php @@ -0,0 +1,387 @@ + + */ +class UpdateSplitConfigurationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UpdateSplitConfigurationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('description', $data ?? [], null); + } + + /** + * 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['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Your description for the split configuration. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + /** + * 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/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php new file mode 100644 index 000000000..8252c0134 --- /dev/null +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -0,0 +1,495 @@ + + */ +class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UpdateSplitConfigurationRuleRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'fundingSource' => 'string', + 'paymentMethod' => 'string', + 'shopperInteraction' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'fundingSource' => null, + 'paymentMethod' => null, + 'shopperInteraction' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'fundingSource' => false, + 'paymentMethod' => false, + 'shopperInteraction' => 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 = [ + 'currency' => 'currency', + 'fundingSource' => 'fundingSource', + 'paymentMethod' => 'paymentMethod', + 'shopperInteraction' => 'shopperInteraction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'fundingSource' => 'setFundingSource', + 'paymentMethod' => 'setPaymentMethod', + 'shopperInteraction' => 'setShopperInteraction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'fundingSource' => 'getFundingSource', + 'paymentMethod' => 'getPaymentMethod', + 'shopperInteraction' => 'getShopperInteraction' + ]; + + /** + * 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('currency', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('shopperInteraction', $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['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['paymentMethod'] === null) { + $invalidProperties[] = "'paymentMethod' can't be null"; + } + if ($this->container['shopperInteraction'] === null) { + $invalidProperties[] = "'shopperInteraction' 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 currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + * + * @return self + */ + public function setCurrency($currency) + { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets paymentMethod + * + * @return string + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param string $paymentMethod The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. + * + * @return self + */ + public function setPaymentMethod($paymentMethod) + { + if (is_null($paymentMethod)) { + throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); + } + $this->container['paymentMethod'] = $paymentMethod; + + return $this; + } + + /** + * Gets shopperInteraction + * + * @return string + */ + public function getShopperInteraction() + { + return $this->container['shopperInteraction']; + } + + /** + * Sets shopperInteraction + * + * @param string $shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. + * + * @return self + */ + public function setShopperInteraction($shopperInteraction) + { + if (is_null($shopperInteraction)) { + throw new \InvalidArgumentException('non-nullable shopperInteraction cannot be null'); + } + $this->container['shopperInteraction'] = $shopperInteraction; + + 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/User.php b/src/Adyen/Model/Management/User.php index f31b7e45b..d198a75e6 100644 --- a/src/Adyen/Model/Management/User.php +++ b/src/Adyen/Model/Management/User.php @@ -47,7 +47,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', - 'authnApps' => 'string[]', + 'apps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -67,7 +67,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => null, 'accountGroups' => null, 'active' => null, - 'authnApps' => null, + 'apps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -85,7 +85,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => false, 'accountGroups' => false, 'active' => false, - 'authnApps' => false, + 'apps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', - 'authnApps' => 'authnApps', + 'apps' => 'apps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -201,7 +201,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', - 'authnApps' => 'setAuthnApps', + 'apps' => 'setApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -219,7 +219,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', - 'authnApps' => 'getAuthnApps', + 'apps' => 'getApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -288,7 +288,7 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -436,28 +436,28 @@ public function setActive($active) } /** - * Gets authnApps + * Gets apps * * @return string[]|null */ - public function getAuthnApps() + public function getApps() { - return $this->container['authnApps']; + return $this->container['apps']; } /** - * Sets authnApps + * Sets apps * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAuthnApps($authnApps) + public function setApps($apps) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['apps'] = $apps; return $this; } diff --git a/src/Adyen/Model/Management/VippsInfo.php b/src/Adyen/Model/Management/VippsInfo.php index 824fba5f6..e7824dc92 100644 --- a/src/Adyen/Model/Management/VippsInfo.php +++ b/src/Adyen/Model/Management/VippsInfo.php @@ -326,7 +326,7 @@ public function getSubscriptionCancelUrl() /** * Sets subscriptionCancelUrl * - * @param string|null $subscriptionCancelUrl Vipps subscription cancel url + * @param string|null $subscriptionCancelUrl Vipps subscription cancel url (required in case of [recurring payments](https://docs.adyen.com/online-payments/tokenization)) * * @return self */ diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index 7039541ed..20e793fe4 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -347,14 +347,9 @@ public function getModelName() public const FILTER_MERCHANT_ACCOUNT_TYPE_ALL_ACCOUNTS = 'allAccounts'; public const FILTER_MERCHANT_ACCOUNT_TYPE_EXCLUDE_ACCOUNTS = 'excludeAccounts'; public const FILTER_MERCHANT_ACCOUNT_TYPE_INCLUDE_ACCOUNTS = 'includeAccounts'; - public const NETWORK_TYPE_LOCAL = 'LOCAL'; - public const NETWORK_TYPE__PUBLIC = 'PUBLIC'; + public const NETWORK_TYPE_LOCAL = 'local'; + public const NETWORK_TYPE__PUBLIC = 'public'; public const SSL_VERSION_HTTP = 'HTTP'; - public const SSL_VERSION_SSL = 'SSL'; - public const SSL_VERSION_SSLV3 = 'SSLv3'; - public const SSL_VERSION_TLS = 'TLS'; - public const SSL_VERSION_TLSV1 = 'TLSv1'; - public const SSL_VERSION_TLSV1_1 = 'TLSv1.1'; public const SSL_VERSION_TLSV1_2 = 'TLSv1.2'; public const SSL_VERSION_TLSV1_3 = 'TLSv1.3'; @@ -405,11 +400,6 @@ public function getSslVersionAllowableValues() { return [ self::SSL_VERSION_HTTP, - self::SSL_VERSION_SSL, - self::SSL_VERSION_SSLV3, - self::SSL_VERSION_TLS, - self::SSL_VERSION_TLSV1, - self::SSL_VERSION_TLSV1_1, self::SSL_VERSION_TLSV1_2, self::SSL_VERSION_TLSV1_3, ]; diff --git a/src/Adyen/Model/Payments/AdditionalDataAirline.php b/src/Adyen/Model/Payments/AdditionalDataAirline.php index 35f8d727b..71b161bf5 100644 --- a/src/Adyen/Model/Payments/AdditionalDataAirline.php +++ b/src/Adyen/Model/Payments/AdditionalDataAirline.php @@ -481,7 +481,7 @@ public function getAirlineAgencyInvoiceNumber() /** * Sets airlineAgencyInvoiceNumber * - * @param string|null $airlineAgencyInvoiceNumber Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 + * @param string|null $airlineAgencyInvoiceNumber The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters * * @return self */ @@ -508,7 +508,7 @@ public function getAirlineAgencyPlanName() /** * Sets airlineAgencyPlanName * - * @param string|null $airlineAgencyPlanName 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 + * @param string|null $airlineAgencyPlanName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -535,7 +535,7 @@ public function getAirlineAirlineCode() /** * Sets airlineAirlineCode * - * @param string|null $airlineAirlineCode [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 + * @param string|null $airlineAirlineCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -562,7 +562,7 @@ public function getAirlineAirlineDesignatorCode() /** * Sets airlineAirlineDesignatorCode * - * @param string|null $airlineAirlineDesignatorCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineAirlineDesignatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -589,7 +589,7 @@ public function getAirlineBoardingFee() /** * Sets airlineBoardingFee * - * @param string|null $airlineBoardingFee Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 + * @param string|null $airlineBoardingFee The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters * * @return self */ @@ -616,7 +616,7 @@ public function getAirlineComputerizedReservationSystem() /** * Sets airlineComputerizedReservationSystem * - * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 + * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters * * @return self */ @@ -643,7 +643,7 @@ public function getAirlineCustomerReferenceNumber() /** * Sets airlineCustomerReferenceNumber * - * @param string|null $airlineCustomerReferenceNumber Reference number; alphanumeric. * minLength: 0 * maxLength: 20 + * @param string|null $airlineCustomerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces * * @return self */ @@ -670,7 +670,7 @@ public function getAirlineDocumentType() /** * Sets airlineDocumentType * - * @param string|null $airlineDocumentType Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 + * @param string|null $airlineDocumentType A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -697,7 +697,7 @@ public function getAirlineFlightDate() /** * Sets airlineFlightDate * - * @param string|null $airlineFlightDate Flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 * maxLength: 16 + * @param string|null $airlineFlightDate The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters * * @return self */ @@ -724,7 +724,7 @@ public function getAirlineLegCarrierCode() /** * Sets airlineLegCarrierCode * - * @param string|null $airlineLegCarrierCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineLegCarrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -751,7 +751,7 @@ public function getAirlineLegClassOfTravel() /** * Sets airlineLegClassOfTravel * - * @param string|null $airlineLegClassOfTravel 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegClassOfTravel A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros * * @return self */ @@ -778,7 +778,7 @@ public function getAirlineLegDateOfTravel() /** * Sets airlineLegDateOfTravel * - * @param string|null $airlineLegDateOfTravel Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 + * @param string|null $airlineLegDateOfTravel Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters * * @return self */ @@ -805,7 +805,7 @@ public function getAirlineLegDepartAirport() /** * Sets airlineLegDepartAirport * - * @param string|null $airlineLegDepartAirport Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDepartAirport The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -832,7 +832,7 @@ public function getAirlineLegDepartTax() /** * Sets airlineLegDepartTax * - * @param string|null $airlineLegDepartTax [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 + * @param string|null $airlineLegDepartTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros * * @return self */ @@ -859,7 +859,7 @@ public function getAirlineLegDestinationCode() /** * Sets airlineLegDestinationCode * - * @param string|null $airlineLegDestinationCode Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDestinationCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -886,7 +886,7 @@ public function getAirlineLegFareBaseCode() /** * Sets airlineLegFareBaseCode * - * @param string|null $airlineLegFareBaseCode [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 + * @param string|null $airlineLegFareBaseCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -913,7 +913,7 @@ public function getAirlineLegFlightNumber() /** * Sets airlineLegFlightNumber * - * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 * maxLength: 5 + * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -940,7 +940,7 @@ public function getAirlineLegStopOverCode() /** * Sets airlineLegStopOverCode * - * @param string|null $airlineLegStopOverCode 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegStopOverCode A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * * @return self */ @@ -967,7 +967,7 @@ public function getAirlinePassengerDateOfBirth() /** * Sets airlinePassengerDateOfBirth * - * @param string|null $airlinePassengerDateOfBirth Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + * @param string|null $airlinePassengerDateOfBirth The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 * * @return self */ @@ -994,7 +994,7 @@ public function getAirlinePassengerFirstName() /** * Sets airlinePassengerFirstName * - * @param string|null $airlinePassengerFirstName Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerFirstName The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1021,7 +1021,7 @@ public function getAirlinePassengerLastName() /** * Sets airlinePassengerLastName * - * @param string|null $airlinePassengerLastName Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerLastName The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1048,7 +1048,7 @@ public function getAirlinePassengerTelephoneNumber() /** * Sets airlinePassengerTelephoneNumber * - * @param string|null $airlinePassengerTelephoneNumber Telephone number of the passenger, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * minLength: 3 * maxLength: 30 + * @param string|null $airlinePassengerTelephoneNumber The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * * @return self */ @@ -1075,7 +1075,7 @@ public function getAirlinePassengerTravellerType() /** * Sets airlinePassengerTravellerType * - * @param string|null $airlinePassengerTravellerType Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 + * @param string|null $airlinePassengerTravellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters * * @return self */ @@ -1102,7 +1102,7 @@ public function getAirlinePassengerName() /** * Sets airlinePassengerName * - * @param string $airlinePassengerName Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 + * @param string $airlinePassengerName The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1129,7 +1129,7 @@ public function getAirlineTicketIssueAddress() /** * Sets airlineTicketIssueAddress * - * @param string|null $airlineTicketIssueAddress Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 + * @param string|null $airlineTicketIssueAddress The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters * * @return self */ @@ -1156,7 +1156,7 @@ public function getAirlineTicketNumber() /** * Sets airlineTicketNumber * - * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 * maxLength: 150 + * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1183,7 +1183,7 @@ public function getAirlineTravelAgencyCode() /** * Sets airlineTravelAgencyCode * - * @param string|null $airlineTravelAgencyCode IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 + * @param string|null $airlineTravelAgencyCode The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1210,7 +1210,7 @@ public function getAirlineTravelAgencyName() /** * Sets airlineTravelAgencyName * - * @param string|null $airlineTravelAgencyName The name of the travel agency. * minLength: 1 * maxLength: 25 + * @param string|null $airlineTravelAgencyName The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataCarRental.php b/src/Adyen/Model/Payments/AdditionalDataCarRental.php index 5e1708390..66376f9ff 100644 --- a/src/Adyen/Model/Payments/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Payments/AdditionalDataCarRental.php @@ -443,7 +443,7 @@ public function getCarRentalCheckOutDate() /** * Sets carRentalCheckOutDate * - * @param string|null $carRentalCheckOutDate Pick-up date. * Date format: `yyyyMMdd` + * @param string|null $carRentalCheckOutDate The pick-up date. * Date format: `yyyyMMdd` * * @return self */ @@ -470,7 +470,7 @@ public function getCarRentalCustomerServiceTollFreeNumber() /** * Sets carRentalCustomerServiceTollFreeNumber * - * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 + * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -497,7 +497,7 @@ public function getCarRentalDaysRented() /** * Sets carRentalDaysRented * - * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 + * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 2 * Must not be all spaces * * @return self */ @@ -524,7 +524,7 @@ public function getCarRentalFuelCharges() /** * Sets carRentalFuelCharges * - * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * * @return self */ @@ -551,7 +551,7 @@ public function getCarRentalInsuranceCharges() /** * Sets carRentalInsuranceCharges * - * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros * * @return self */ @@ -578,7 +578,7 @@ public function getCarRentalLocationCity() /** * Sets carRentalLocationCity * - * @param string|null $carRentalLocationCity The city from which the car is rented. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalLocationCity The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -605,7 +605,7 @@ public function getCarRentalLocationCountry() /** * Sets carRentalLocationCountry * - * @param string|null $carRentalLocationCountry The country from which the car is rented. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalLocationCountry The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -632,7 +632,7 @@ public function getCarRentalLocationStateProvince() /** * Sets carRentalLocationStateProvince * - * @param string|null $carRentalLocationStateProvince The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalLocationStateProvince The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -659,7 +659,7 @@ public function getCarRentalNoShowIndicator() /** * Sets carRentalNoShowIndicator * - * @param string|null $carRentalNoShowIndicator Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. + * @param string|null $carRentalNoShowIndicator Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable * * @return self */ @@ -686,7 +686,7 @@ public function getCarRentalOneWayDropOffCharges() /** * Sets carRentalOneWayDropOffCharges * - * @param string|null $carRentalOneWayDropOffCharges Charge associated with not returning a vehicle to the original rental location. + * @param string|null $carRentalOneWayDropOffCharges The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 * * @return self */ @@ -713,7 +713,7 @@ public function getCarRentalRate() /** * Sets carRentalRate * - * @param string|null $carRentalRate Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRate The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 * * @return self */ @@ -740,7 +740,7 @@ public function getCarRentalRateIndicator() /** * Sets carRentalRateIndicator * - * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. + * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate * * @return self */ @@ -767,7 +767,7 @@ public function getCarRentalRentalAgreementNumber() /** * Sets carRentalRentalAgreementNumber * - * @param string|null $carRentalRentalAgreementNumber The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9 + * @param string|null $carRentalRentalAgreementNumber The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -794,7 +794,7 @@ public function getCarRentalRentalClassId() /** * Sets carRentalRentalClassId * - * @param string|null $carRentalRentalClassId Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -821,7 +821,7 @@ public function getCarRentalRenterName() /** * Sets carRentalRenterName * - * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 + * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -848,7 +848,7 @@ public function getCarRentalReturnCity() /** * Sets carRentalReturnCity * - * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -875,7 +875,7 @@ public function getCarRentalReturnCountry() /** * Sets carRentalReturnCountry * - * @param string|null $carRentalReturnCountry The country where the car must be returned. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalReturnCountry The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -902,7 +902,7 @@ public function getCarRentalReturnDate() /** * Sets carRentalReturnDate * - * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` + * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 * * @return self */ @@ -929,7 +929,7 @@ public function getCarRentalReturnLocationId() /** * Sets carRentalReturnLocationId * - * @param string|null $carRentalReturnLocationId Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 + * @param string|null $carRentalReturnLocationId The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -956,7 +956,7 @@ public function getCarRentalReturnStateProvince() /** * Sets carRentalReturnStateProvince * - * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -983,7 +983,7 @@ public function getCarRentalTaxExemptIndicator() /** * Sets carRentalTaxExemptIndicator * - * @param string|null $carRentalTaxExemptIndicator Indicates whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected + * @param string|null $carRentalTaxExemptIndicator Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected * * @return self */ @@ -1010,7 +1010,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 + * @param string|null $travelEntertainmentAuthDataDuration Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 2 * * @return self */ @@ -1037,7 +1037,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"A\" for Car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataLevel23.php b/src/Adyen/Model/Payments/AdditionalDataLevel23.php index 3cda5a5b5..545a4f30f 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Payments/AdditionalDataLevel23.php @@ -401,7 +401,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -428,7 +428,7 @@ public function getEnhancedSchemeDataDestinationCountryCode() /** * Sets enhancedSchemeDataDestinationCountryCode * - * @param string|null $enhancedSchemeDataDestinationCountryCode Destination country code. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationCountryCode The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters * * @return self */ @@ -455,7 +455,7 @@ public function getEnhancedSchemeDataDestinationPostalCode() /** * Sets enhancedSchemeDataDestinationPostalCode * - * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. + * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space * * @return self */ @@ -482,7 +482,7 @@ public function getEnhancedSchemeDataDestinationStateProvinceCode() /** * Sets enhancedSchemeDataDestinationStateProvinceCode * - * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII.Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space * * @return self */ @@ -509,7 +509,7 @@ public function getEnhancedSchemeDataDutyAmount() /** * Sets enhancedSchemeDataDutyAmount * - * @param string|null $enhancedSchemeDataDutyAmount Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataDutyAmount The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -536,7 +536,7 @@ public function getEnhancedSchemeDataFreightAmount() /** * Sets enhancedSchemeDataFreightAmount * - * @param string|null $enhancedSchemeDataFreightAmount Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataFreightAmount The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -563,7 +563,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode Item commodity code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -590,7 +590,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDescription() /** * Sets enhancedSchemeDataItemDetailLineItemNrDescription * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription Item description. Encoding: ASCII. Max length: 26 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item. Encoding: ASCII Max length: 26 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -617,7 +617,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrDiscountAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -644,7 +644,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrProductCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrProductCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode Product code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -671,7 +671,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrQuantity() /** * Sets enhancedSchemeDataItemDetailLineItemNrQuantity * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces * * @return self */ @@ -698,7 +698,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrTotalAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrTotalAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -725,7 +725,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure Item unit of measurement. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -752,7 +752,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitPrice() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitPrice * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -779,7 +779,7 @@ public function getEnhancedSchemeDataOrderDate() /** * Sets enhancedSchemeDataOrderDate * - * @param string|null $enhancedSchemeDataOrderDate Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters. + * @param string|null $enhancedSchemeDataOrderDate The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters * * @return self */ @@ -806,7 +806,7 @@ public function getEnhancedSchemeDataShipFromPostalCode() /** * Sets enhancedSchemeDataShipFromPostalCode * - * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. + * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of the address the item is shipped from. Encoding: ASCII Max length: 10 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -833,7 +833,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataLodging.php b/src/Adyen/Model/Payments/AdditionalDataLodging.php index 12402c411..606f5c1af 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLodging.php +++ b/src/Adyen/Model/Payments/AdditionalDataLodging.php @@ -56,7 +56,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => 'string', 'lodgingRoom1NumberOfNights' => 'string', 'lodgingRoom1Rate' => 'string', - 'lodgingRoom1Tax' => 'string', 'lodgingTotalRoomTax' => 'string', 'lodgingTotalTax' => 'string', 'travelEntertainmentAuthDataDuration' => 'string', @@ -83,7 +82,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => null, 'lodgingRoom1NumberOfNights' => null, 'lodgingRoom1Rate' => null, - 'lodgingRoom1Tax' => null, 'lodgingTotalRoomTax' => null, 'lodgingTotalTax' => null, 'travelEntertainmentAuthDataDuration' => null, @@ -108,7 +106,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => false, 'lodgingRoom1NumberOfNights' => false, 'lodgingRoom1Rate' => false, - 'lodgingRoom1Tax' => false, 'lodgingTotalRoomTax' => false, 'lodgingTotalTax' => false, 'travelEntertainmentAuthDataDuration' => false, @@ -213,7 +210,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'lodging.propertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'lodging.room1.numberOfNights', 'lodgingRoom1Rate' => 'lodging.room1.rate', - 'lodgingRoom1Tax' => 'lodging.room1.tax', 'lodgingTotalRoomTax' => 'lodging.totalRoomTax', 'lodgingTotalTax' => 'lodging.totalTax', 'travelEntertainmentAuthDataDuration' => 'travelEntertainmentAuthData.duration', @@ -238,7 +234,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'setLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'setLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'setLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'setLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'setLodgingTotalRoomTax', 'lodgingTotalTax' => 'setLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'setTravelEntertainmentAuthDataDuration', @@ -263,7 +258,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'getLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'getLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'getLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'getLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'getLodgingTotalRoomTax', 'lodgingTotalTax' => 'getLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'getTravelEntertainmentAuthDataDuration', @@ -339,7 +333,6 @@ public function __construct(array $data = null) $this->setIfExists('lodgingPropertyPhoneNumber', $data ?? [], null); $this->setIfExists('lodgingRoom1NumberOfNights', $data ?? [], null); $this->setIfExists('lodgingRoom1Rate', $data ?? [], null); - $this->setIfExists('lodgingRoom1Tax', $data ?? [], null); $this->setIfExists('lodgingTotalRoomTax', $data ?? [], null); $this->setIfExists('lodgingTotalTax', $data ?? [], null); $this->setIfExists('travelEntertainmentAuthDataDuration', $data ?? [], null); @@ -455,7 +448,7 @@ public function getLodgingCustomerServiceTollFreeNumber() /** * Sets lodgingCustomerServiceTollFreeNumber * - * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -482,7 +475,7 @@ public function getLodgingFireSafetyActIndicator() /** * Sets lodgingFireSafetyActIndicator * - * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: 'Y' or 'N'. * Format: alphabetic. * Max length: 1 character. + * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character * * @return self */ @@ -509,7 +502,7 @@ public function getLodgingFolioCashAdvances() /** * Sets lodgingFolioCashAdvances * - * @param string|null $lodgingFolioCashAdvances The folio cash advances. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFolioCashAdvances The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -536,7 +529,7 @@ public function getLodgingFolioNumber() /** * Sets lodgingFolioNumber * - * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Format: alphanumeric. * Max length: 25 characters. + * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros * * @return self */ @@ -563,7 +556,7 @@ public function getLodgingFoodBeverageCharges() /** * Sets lodgingFoodBeverageCharges * - * @param string|null $lodgingFoodBeverageCharges The additional charges for food and beverages associated with the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFoodBeverageCharges Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -590,7 +583,7 @@ public function getLodgingNoShowIndicator() /** * Sets lodgingNoShowIndicator * - * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in. **N**: the customer checked in. + * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in * * @return self */ @@ -617,7 +610,7 @@ public function getLodgingPrepaidExpenses() /** * Sets lodgingPrepaidExpenses * - * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters * * @return self */ @@ -644,7 +637,7 @@ public function getLodgingPropertyPhoneNumber() /** * Sets lodgingPropertyPhoneNumber * - * @param string|null $lodgingPropertyPhoneNumber Identifies the location of the lodging by its local phone number. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -671,7 +664,7 @@ public function getLodgingRoom1NumberOfNights() /** * Sets lodgingRoom1NumberOfNights * - * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric. * Max length: 4 characters. + * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 2 characters * * @return self */ @@ -698,7 +691,7 @@ public function getLodgingRoom1Rate() /** * Sets lodgingRoom1Rate * - * @param string|null $lodgingRoom1Rate The rate of the room. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingRoom1Rate The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -712,33 +705,6 @@ public function setLodgingRoom1Rate($lodgingRoom1Rate) return $this; } - /** - * Gets lodgingRoom1Tax - * - * @return string|null - */ - public function getLodgingRoom1Tax() - { - return $this->container['lodgingRoom1Tax']; - } - - /** - * Sets lodgingRoom1Tax - * - * @param string|null $lodgingRoom1Tax The total amount of tax to be paid. * Format: numeric. * Max length: 12 chracters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * - * @return self - */ - public function setLodgingRoom1Tax($lodgingRoom1Tax) - { - if (is_null($lodgingRoom1Tax)) { - throw new \InvalidArgumentException('non-nullable lodgingRoom1Tax cannot be null'); - } - $this->container['lodgingRoom1Tax'] = $lodgingRoom1Tax; - - return $this; - } - /** * Gets lodgingTotalRoomTax * @@ -752,7 +718,7 @@ public function getLodgingTotalRoomTax() /** * Sets lodgingTotalRoomTax * - * @param string|null $lodgingTotalRoomTax The total room tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalRoomTax The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -779,7 +745,7 @@ public function getLodgingTotalTax() /** * Sets lodgingTotalTax * - * @param string|null $lodgingTotalTax The total tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalTax The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -806,7 +772,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric. * Max length: 2 characters. + * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric * Max length: 2 characters * * @return self */ @@ -833,7 +799,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: alphanumeric. * Max length: 1 character. + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php index a14d12348..27af74221 100644 --- a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php @@ -345,7 +345,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 * * @return self */ @@ -372,7 +372,7 @@ public function getEnhancedSchemeDataEmployeeName() /** * Sets enhancedSchemeDataEmployeeName * - * @param string|null $enhancedSchemeDataEmployeeName Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataEmployeeName The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -399,7 +399,7 @@ public function getEnhancedSchemeDataJobDescription() /** * Sets enhancedSchemeDataJobDescription * - * @param string|null $enhancedSchemeDataJobDescription Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataJobDescription The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -426,7 +426,7 @@ public function getEnhancedSchemeDataRegularHoursRate() /** * Sets enhancedSchemeDataRegularHoursRate * - * @param string|null $enhancedSchemeDataRegularHoursRate Amount paid per regular hours worked, minor units. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursRate The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -453,7 +453,7 @@ public function getEnhancedSchemeDataRegularHoursWorked() /** * Sets enhancedSchemeDataRegularHoursWorked * - * @param string|null $enhancedSchemeDataRegularHoursWorked Amount of time worked during a normal operation for the task or job. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursWorked The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -480,7 +480,7 @@ public function getEnhancedSchemeDataRequestName() /** * Sets enhancedSchemeDataRequestName * - * @param string|null $enhancedSchemeDataRequestName Name of the individual requesting temporary services. * maxLength: 40 + * @param string|null $enhancedSchemeDataRequestName The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -507,7 +507,7 @@ public function getEnhancedSchemeDataTempStartDate() /** * Sets enhancedSchemeDataTempStartDate * - * @param string|null $enhancedSchemeDataTempStartDate Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempStartDate The billing period start date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -534,7 +534,7 @@ public function getEnhancedSchemeDataTempWeekEnding() /** * Sets enhancedSchemeDataTempWeekEnding * - * @param string|null $enhancedSchemeDataTempWeekEnding Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempWeekEnding The billing period end date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -561,7 +561,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index 8c17826fe..056773951 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -2063,7 +2063,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index c4e3bec6c..b5a339252 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -1727,7 +1727,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index a1f4375be..36d20a664 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -1673,7 +1673,7 @@ public function getStore() /** * Sets store * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). * * @return self */ diff --git a/src/Adyen/Model/Payments/PlatformChargebackLogic.php b/src/Adyen/Model/Payments/PlatformChargebackLogic.php index 38552747c..358054f1c 100644 --- a/src/Adyen/Model/Payments/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Payments/PlatformChargebackLogic.php @@ -328,7 +328,7 @@ public function getBehavior() /** * Sets behavior * - * @param string|null $behavior behavior + * @param string|null $behavior The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. * * @return self */ @@ -365,7 +365,7 @@ public function getCostAllocationAccount() /** * Sets costAllocationAccount * - * @param string|null $costAllocationAccount costAllocationAccount + * @param string|null $costAllocationAccount The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account. * * @return self */ @@ -392,7 +392,7 @@ public function getTargetAccount() /** * Sets targetAccount * - * @param string|null $targetAccount targetAccount + * @param string|null $targetAccount The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**. * * @return self */ diff --git a/src/Adyen/Model/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index 7fae9406c..eca4e6073 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -244,6 +244,12 @@ public function getModelName() public const TYPE__DEFAULT = 'Default'; public const TYPE_MARKET_PLACE = 'MarketPlace'; public const TYPE_PAYMENT_FEE = 'PaymentFee'; + public const TYPE_PAYMENT_FEE_ACQUIRING = 'PaymentFeeAcquiring'; + public const TYPE_PAYMENT_FEE_ADYEN = 'PaymentFeeAdyen'; + public const TYPE_PAYMENT_FEE_ADYEN_COMMISSION = 'PaymentFeeAdyenCommission'; + public const TYPE_PAYMENT_FEE_ADYEN_MARKUP = 'PaymentFeeAdyenMarkup'; + public const TYPE_PAYMENT_FEE_INTERCHANGE = 'PaymentFeeInterchange'; + public const TYPE_PAYMENT_FEE_SCHEME_FEE = 'PaymentFeeSchemeFee'; public const TYPE_REMAINDER = 'Remainder'; public const TYPE_SURCHARGE = 'Surcharge'; public const TYPE_TIP = 'Tip'; @@ -263,6 +269,12 @@ public function getTypeAllowableValues() self::TYPE__DEFAULT, self::TYPE_MARKET_PLACE, self::TYPE_PAYMENT_FEE, + self::TYPE_PAYMENT_FEE_ACQUIRING, + self::TYPE_PAYMENT_FEE_ADYEN, + self::TYPE_PAYMENT_FEE_ADYEN_COMMISSION, + self::TYPE_PAYMENT_FEE_ADYEN_MARKUP, + self::TYPE_PAYMENT_FEE_INTERCHANGE, + self::TYPE_PAYMENT_FEE_SCHEME_FEE, self::TYPE_REMAINDER, self::TYPE_SURCHARGE, self::TYPE_TIP, diff --git a/src/Adyen/Model/Payments/ThreeDS2RequestData.php b/src/Adyen/Model/Payments/ThreeDS2RequestData.php index a133cdc85..730d27d11 100644 --- a/src/Adyen/Model/Payments/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Payments/ThreeDS2RequestData.php @@ -581,7 +581,7 @@ public function __construct(array $data = null) $this->setIfExists('homePhone', $data ?? [], null); $this->setIfExists('mcc', $data ?? [], null); $this->setIfExists('merchantName', $data ?? [], null); - $this->setIfExists('messageVersion', $data ?? [], '2.1.0'); + $this->setIfExists('messageVersion', $data ?? [], null); $this->setIfExists('mobilePhone', $data ?? [], null); $this->setIfExists('notificationURL', $data ?? [], null); $this->setIfExists('payTokenInd', $data ?? [], null); diff --git a/src/Adyen/Model/Payout/PayoutResponse.php b/src/Adyen/Model/Payout/PayoutResponse.php index 254d327f9..96119d065 100644 --- a/src/Adyen/Model/Payout/PayoutResponse.php +++ b/src/Adyen/Model/Payout/PayoutResponse.php @@ -282,6 +282,7 @@ public function getModelName() public const RESULT_CODE_CHALLENGE_SHOPPER = 'ChallengeShopper'; public const RESULT_CODE_ERROR = 'Error'; public const RESULT_CODE_IDENTIFY_SHOPPER = 'IdentifyShopper'; + public const RESULT_CODE_PARTIALLY_AUTHORISED = 'PartiallyAuthorised'; public const RESULT_CODE_PENDING = 'Pending'; public const RESULT_CODE_PRESENT_TO_SHOPPER = 'PresentToShopper'; public const RESULT_CODE_RECEIVED = 'Received'; @@ -304,6 +305,7 @@ public function getResultCodeAllowableValues() self::RESULT_CODE_CHALLENGE_SHOPPER, self::RESULT_CODE_ERROR, self::RESULT_CODE_IDENTIFY_SHOPPER, + self::RESULT_CODE_PARTIALLY_AUTHORISED, self::RESULT_CODE_PENDING, self::RESULT_CODE_PRESENT_TO_SHOPPER, self::RESULT_CODE_RECEIVED, @@ -674,7 +676,7 @@ public function getResultCode() /** * Sets resultCode * - * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + * @param string|null $resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. * * @return self */ diff --git a/src/Adyen/Model/Transfers/Address2.php b/src/Adyen/Model/Transfers/Address2.php index d329b6ed9..030ee8507 100644 --- a/src/Adyen/Model/Transfers/Address2.php +++ b/src/Adyen/Model/Transfers/Address2.php @@ -354,7 +354,7 @@ public function getCountry() /** * Sets country * - * @param string $country The two-character ISO 3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * @param string $country The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. * * @return self */ diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index 6bc7a5282..97c7f80e7 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -54,6 +54,7 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'institutionNumber' => 'string', 'transitNumber' => 'string', 'iban' => 'string', + 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\Transfers\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -78,6 +79,7 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'institutionNumber' => null, 'transitNumber' => null, 'iban' => null, + 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -100,6 +102,7 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'institutionNumber' => false, 'transitNumber' => false, 'iban' => false, + 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -202,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'institutionNumber' => 'institutionNumber', 'transitNumber' => 'transitNumber', 'iban' => 'iban', + 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -224,6 +228,7 @@ public function isNullableSetToNull(string $property): bool 'institutionNumber' => 'setInstitutionNumber', 'transitNumber' => 'setTransitNumber', 'iban' => 'setIban', + 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -246,6 +251,7 @@ public function isNullableSetToNull(string $property): bool 'institutionNumber' => 'getInstitutionNumber', 'transitNumber' => 'getTransitNumber', 'iban' => 'getIban', + 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -318,6 +324,7 @@ public function __construct(array $data = null) $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -378,6 +385,9 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } + if ($this->container['accountSuffix'] === null) { + $invalidProperties[] = "'accountSuffix' can't be null"; + } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -499,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. * * @return self */ @@ -648,6 +658,33 @@ public function setIban($iban) return $this; } + /** + * Gets accountSuffix + * + * @return string + */ + public function getAccountSuffix() + { + return $this->container['accountSuffix']; + } + + /** + * Sets accountSuffix + * + * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. + * + * @return self + */ + public function setAccountSuffix($accountSuffix) + { + if (is_null($accountSuffix)) { + throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); + } + $this->container['accountSuffix'] = $accountSuffix; + + return $this; + } + /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/Transfers/CapitalBalance.php b/src/Adyen/Model/Transfers/CapitalBalance.php new file mode 100644 index 000000000..a1c29888a --- /dev/null +++ b/src/Adyen/Model/Transfers/CapitalBalance.php @@ -0,0 +1,498 @@ + + */ +class CapitalBalance implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapitalBalance'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'fee' => 'int', + 'principal' => 'int', + 'total' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'fee' => 'int64', + 'principal' => 'int64', + 'total' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'fee' => false, + 'principal' => false, + 'total' => 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 = [ + 'currency' => 'currency', + 'fee' => 'fee', + 'principal' => 'principal', + 'total' => 'total' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'fee' => 'setFee', + 'principal' => 'setPrincipal', + 'total' => 'setTotal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'fee' => 'getFee', + 'principal' => 'getPrincipal', + 'total' => 'getTotal' + ]; + + /** + * 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('currency', $data ?? [], null); + $this->setIfExists('fee', $data ?? [], null); + $this->setIfExists('principal', $data ?? [], null); + $this->setIfExists('total', $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['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['fee'] === null) { + $invalidProperties[] = "'fee' can't be null"; + } + if ($this->container['principal'] === null) { + $invalidProperties[] = "'principal' can't be null"; + } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' 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 currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setCurrency($currency) + { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets fee + * + * @return int + */ + public function getFee() + { + return $this->container['fee']; + } + + /** + * Sets fee + * + * @param int $fee Fee amount. + * + * @return self + */ + public function setFee($fee) + { + if (is_null($fee)) { + throw new \InvalidArgumentException('non-nullable fee cannot be null'); + } + $this->container['fee'] = $fee; + + return $this; + } + + /** + * Gets principal + * + * @return int + */ + public function getPrincipal() + { + return $this->container['principal']; + } + + /** + * Sets principal + * + * @param int $principal Principal amount. + * + * @return self + */ + public function setPrincipal($principal) + { + if (is_null($principal)) { + throw new \InvalidArgumentException('non-nullable principal cannot be null'); + } + $this->container['principal'] = $principal; + + return $this; + } + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Total amount. A sum of principal amount and fee amount. + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + 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/Transfers/CapitalGrant.php b/src/Adyen/Model/Transfers/CapitalGrant.php new file mode 100644 index 000000000..7aaca02bb --- /dev/null +++ b/src/Adyen/Model/Transfers/CapitalGrant.php @@ -0,0 +1,706 @@ + + */ +class CapitalGrant implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapitalGrant'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => '\Adyen\Model\Transfers\Amount', + 'balances' => '\Adyen\Model\Transfers\CapitalBalance', + 'counterparty' => '\Adyen\Model\Transfers\Counterparty2', + 'fee' => '\Adyen\Model\Transfers\Fee', + 'grantAccountId' => 'string', + 'grantOfferId' => 'string', + 'id' => 'string', + 'repayment' => '\Adyen\Model\Transfers\Repayment', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'balances' => null, + 'counterparty' => null, + 'fee' => null, + 'grantAccountId' => null, + 'grantOfferId' => null, + 'id' => null, + 'repayment' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => false, + 'balances' => false, + 'counterparty' => false, + 'fee' => false, + 'grantAccountId' => false, + 'grantOfferId' => false, + 'id' => false, + 'repayment' => 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 = [ + 'amount' => 'amount', + 'balances' => 'balances', + 'counterparty' => 'counterparty', + 'fee' => 'fee', + 'grantAccountId' => 'grantAccountId', + 'grantOfferId' => 'grantOfferId', + 'id' => 'id', + 'repayment' => 'repayment', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'balances' => 'setBalances', + 'counterparty' => 'setCounterparty', + 'fee' => 'setFee', + 'grantAccountId' => 'setGrantAccountId', + 'grantOfferId' => 'setGrantOfferId', + 'id' => 'setId', + 'repayment' => 'setRepayment', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'balances' => 'getBalances', + 'counterparty' => 'getCounterparty', + 'fee' => 'getFee', + 'grantAccountId' => 'getGrantAccountId', + 'grantOfferId' => 'getGrantOfferId', + 'id' => 'getId', + 'repayment' => 'getRepayment', + '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_PENDING = 'Pending'; + public const STATUS_ACTIVE = 'Active'; + public const STATUS_REPAID = 'Repaid'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_PENDING, + self::STATUS_ACTIVE, + self::STATUS_REPAID, + ]; + } + /** + * 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('amount', $data ?? [], null); + $this->setIfExists('balances', $data ?? [], null); + $this->setIfExists('counterparty', $data ?? [], null); + $this->setIfExists('fee', $data ?? [], null); + $this->setIfExists('grantAccountId', $data ?? [], null); + $this->setIfExists('grantOfferId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('repayment', $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['balances'] === null) { + $invalidProperties[] = "'balances' can't be null"; + } + if ($this->container['grantAccountId'] === null) { + $invalidProperties[] = "'grantAccountId' can't be null"; + } + if ($this->container['grantOfferId'] === null) { + $invalidProperties[] = "'grantOfferId' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + 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 amount + * + * @return \Adyen\Model\Transfers\Amount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Transfers\Amount|null $amount amount + * + * @return self + */ + public function setAmount($amount) + { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets balances + * + * @return \Adyen\Model\Transfers\CapitalBalance + */ + public function getBalances() + { + return $this->container['balances']; + } + + /** + * Sets balances + * + * @param \Adyen\Model\Transfers\CapitalBalance $balances balances + * + * @return self + */ + public function setBalances($balances) + { + if (is_null($balances)) { + throw new \InvalidArgumentException('non-nullable balances cannot be null'); + } + $this->container['balances'] = $balances; + + return $this; + } + + /** + * Gets counterparty + * + * @return \Adyen\Model\Transfers\Counterparty2|null + */ + public function getCounterparty() + { + return $this->container['counterparty']; + } + + /** + * Sets counterparty + * + * @param \Adyen\Model\Transfers\Counterparty2|null $counterparty counterparty + * + * @return self + */ + public function setCounterparty($counterparty) + { + if (is_null($counterparty)) { + throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); + } + $this->container['counterparty'] = $counterparty; + + return $this; + } + + /** + * Gets fee + * + * @return \Adyen\Model\Transfers\Fee|null + */ + public function getFee() + { + return $this->container['fee']; + } + + /** + * Sets fee + * + * @param \Adyen\Model\Transfers\Fee|null $fee fee + * + * @return self + */ + public function setFee($fee) + { + if (is_null($fee)) { + throw new \InvalidArgumentException('non-nullable fee cannot be null'); + } + $this->container['fee'] = $fee; + + return $this; + } + + /** + * Gets grantAccountId + * + * @return string + */ + public function getGrantAccountId() + { + return $this->container['grantAccountId']; + } + + /** + * Sets grantAccountId + * + * @param string $grantAccountId The identifier of the grant account used for the grant. + * + * @return self + */ + public function setGrantAccountId($grantAccountId) + { + if (is_null($grantAccountId)) { + throw new \InvalidArgumentException('non-nullable grantAccountId cannot be null'); + } + $this->container['grantAccountId'] = $grantAccountId; + + return $this; + } + + /** + * Gets grantOfferId + * + * @return string + */ + public function getGrantOfferId() + { + return $this->container['grantOfferId']; + } + + /** + * Sets grantOfferId + * + * @param string $grantOfferId The identifier of the grant offer that has been selected and from which the grant details will be used. + * + * @return self + */ + public function setGrantOfferId($grantOfferId) + { + if (is_null($grantOfferId)) { + throw new \InvalidArgumentException('non-nullable grantOfferId cannot be null'); + } + $this->container['grantOfferId'] = $grantOfferId; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The identifier of the grant reference. + * + * @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 repayment + * + * @return \Adyen\Model\Transfers\Repayment|null + */ + public function getRepayment() + { + return $this->container['repayment']; + } + + /** + * Sets repayment + * + * @param \Adyen\Model\Transfers\Repayment|null $repayment repayment + * + * @return self + */ + public function setRepayment($repayment) + { + if (is_null($repayment)) { + throw new \InvalidArgumentException('non-nullable repayment cannot be null'); + } + $this->container['repayment'] = $repayment; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**. + * + * @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/Transfers/CapitalGrantInfo.php b/src/Adyen/Model/Transfers/CapitalGrantInfo.php new file mode 100644 index 000000000..574770092 --- /dev/null +++ b/src/Adyen/Model/Transfers/CapitalGrantInfo.php @@ -0,0 +1,458 @@ + + */ +class CapitalGrantInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapitalGrantInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'counterparty' => '\Adyen\Model\Transfers\Counterparty2', + 'grantAccountId' => 'string', + 'grantOfferId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'counterparty' => null, + 'grantAccountId' => null, + 'grantOfferId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'counterparty' => false, + 'grantAccountId' => false, + 'grantOfferId' => 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 = [ + 'counterparty' => 'counterparty', + 'grantAccountId' => 'grantAccountId', + 'grantOfferId' => 'grantOfferId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'counterparty' => 'setCounterparty', + 'grantAccountId' => 'setGrantAccountId', + 'grantOfferId' => 'setGrantOfferId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'counterparty' => 'getCounterparty', + 'grantAccountId' => 'getGrantAccountId', + 'grantOfferId' => 'getGrantOfferId' + ]; + + /** + * 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('counterparty', $data ?? [], null); + $this->setIfExists('grantAccountId', $data ?? [], null); + $this->setIfExists('grantOfferId', $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['grantAccountId'] === null) { + $invalidProperties[] = "'grantAccountId' can't be null"; + } + if ($this->container['grantOfferId'] === null) { + $invalidProperties[] = "'grantOfferId' 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 counterparty + * + * @return \Adyen\Model\Transfers\Counterparty2|null + */ + public function getCounterparty() + { + return $this->container['counterparty']; + } + + /** + * Sets counterparty + * + * @param \Adyen\Model\Transfers\Counterparty2|null $counterparty counterparty + * + * @return self + */ + public function setCounterparty($counterparty) + { + if (is_null($counterparty)) { + throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); + } + $this->container['counterparty'] = $counterparty; + + return $this; + } + + /** + * Gets grantAccountId + * + * @return string + */ + public function getGrantAccountId() + { + return $this->container['grantAccountId']; + } + + /** + * Sets grantAccountId + * + * @param string $grantAccountId The identifier of the grant account used for the grant. + * + * @return self + */ + public function setGrantAccountId($grantAccountId) + { + if (is_null($grantAccountId)) { + throw new \InvalidArgumentException('non-nullable grantAccountId cannot be null'); + } + $this->container['grantAccountId'] = $grantAccountId; + + return $this; + } + + /** + * Gets grantOfferId + * + * @return string + */ + public function getGrantOfferId() + { + return $this->container['grantOfferId']; + } + + /** + * Sets grantOfferId + * + * @param string $grantOfferId The identifier of the grant offer that has been selected and from which the grant details will be used. + * + * @return self + */ + public function setGrantOfferId($grantOfferId) + { + if (is_null($grantOfferId)) { + throw new \InvalidArgumentException('non-nullable grantOfferId cannot be null'); + } + $this->container['grantOfferId'] = $grantOfferId; + + 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/Transfers/CapitalGrants.php b/src/Adyen/Model/Transfers/CapitalGrants.php new file mode 100644 index 000000000..1b5fbad7c --- /dev/null +++ b/src/Adyen/Model/Transfers/CapitalGrants.php @@ -0,0 +1,387 @@ + + */ +class CapitalGrants implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapitalGrants'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'grants' => '\Adyen\Model\Transfers\CapitalGrant[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'grants' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'grants' => 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 = [ + 'grants' => 'grants' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'grants' => 'setGrants' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'grants' => 'getGrants' + ]; + + /** + * 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('grants', $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['grants'] === null) { + $invalidProperties[] = "'grants' 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 grants + * + * @return \Adyen\Model\Transfers\CapitalGrant[] + */ + public function getGrants() + { + return $this->container['grants']; + } + + /** + * Sets grants + * + * @param \Adyen\Model\Transfers\CapitalGrant[] $grants The unique identifier of the grant. + * + * @return self + */ + public function setGrants($grants) + { + if (is_null($grants)) { + throw new \InvalidArgumentException('non-nullable grants cannot be null'); + } + $this->container['grants'] = $grants; + + 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/Transfers/Counterparty2.php b/src/Adyen/Model/Transfers/Counterparty2.php new file mode 100644 index 000000000..7c4cd8e05 --- /dev/null +++ b/src/Adyen/Model/Transfers/Counterparty2.php @@ -0,0 +1,452 @@ + + */ +class Counterparty2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Counterparty-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolderId' => 'string', + 'balanceAccountId' => 'string', + 'transferInstrumentId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolderId' => null, + 'balanceAccountId' => null, + 'transferInstrumentId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolderId' => false, + 'balanceAccountId' => false, + 'transferInstrumentId' => 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 = [ + 'accountHolderId' => 'accountHolderId', + 'balanceAccountId' => 'balanceAccountId', + 'transferInstrumentId' => 'transferInstrumentId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolderId' => 'setAccountHolderId', + 'balanceAccountId' => 'setBalanceAccountId', + 'transferInstrumentId' => 'setTransferInstrumentId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolderId' => 'getAccountHolderId', + 'balanceAccountId' => 'getBalanceAccountId', + 'transferInstrumentId' => 'getTransferInstrumentId' + ]; + + /** + * 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('accountHolderId', $data ?? [], null); + $this->setIfExists('balanceAccountId', $data ?? [], null); + $this->setIfExists('transferInstrumentId', $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 accountHolderId + * + * @return string|null + */ + public function getAccountHolderId() + { + return $this->container['accountHolderId']; + } + + /** + * Sets accountHolderId + * + * @param string|null $accountHolderId The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided. + * + * @return self + */ + public function setAccountHolderId($accountHolderId) + { + if (is_null($accountHolderId)) { + throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); + } + $this->container['accountHolderId'] = $accountHolderId; + + return $this; + } + + /** + * Gets balanceAccountId + * + * @return string|null + */ + public function getBalanceAccountId() + { + return $this->container['balanceAccountId']; + } + + /** + * Sets balanceAccountId + * + * @param string|null $balanceAccountId The identifier of the balance account that belongs to the receiving account holder. + * + * @return self + */ + public function setBalanceAccountId($balanceAccountId) + { + if (is_null($balanceAccountId)) { + throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); + } + $this->container['balanceAccountId'] = $balanceAccountId; + + return $this; + } + + /** + * Gets transferInstrumentId + * + * @return string|null + */ + public function getTransferInstrumentId() + { + return $this->container['transferInstrumentId']; + } + + /** + * Sets transferInstrumentId + * + * @param string|null $transferInstrumentId The identifier of the transfer instrument that belongs to the legal entity of the account holder. + * + * @return self + */ + public function setTransferInstrumentId($transferInstrumentId) + { + if (is_null($transferInstrumentId)) { + throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); + } + $this->container['transferInstrumentId'] = $transferInstrumentId; + + 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/Transfers/Fee.php b/src/Adyen/Model/Transfers/Fee.php new file mode 100644 index 000000000..c40e216d9 --- /dev/null +++ b/src/Adyen/Model/Transfers/Fee.php @@ -0,0 +1,387 @@ + + */ +class Fee implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Fee'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => '\Adyen\Model\Transfers\Amount' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => 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 = [ + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount' + ]; + + /** + * 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('amount', $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['amount'] === null) { + $invalidProperties[] = "'amount' 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 amount + * + * @return \Adyen\Model\Transfers\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Transfers\Amount $amount amount + * + * @return self + */ + public function setAmount($amount) + { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + 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/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php new file mode 100644 index 000000000..02bf8a23c --- /dev/null +++ b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php @@ -0,0 +1,529 @@ + + */ +class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NZLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'accountSuffix' => 'string', + 'bankCode' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountNumber' => null, + 'accountSuffix' => null, + 'bankCode' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'accountSuffix' => false, + 'bankCode' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'accountNumber' => 'accountNumber', + 'accountSuffix' => 'accountSuffix', + 'bankCode' => 'bankCode', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'accountSuffix' => 'setAccountSuffix', + 'bankCode' => 'setBankCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'accountSuffix' => 'getAccountSuffix', + 'bankCode' => 'getBankCode', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_NZ_LOCAL = 'nzLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_NZ_LOCAL, + ]; + } + /** + * 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('accountNumber', $data ?? [], null); + $this->setIfExists('accountSuffix', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'nzLocal'); + } + + /** + * 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['accountNumber'] === null) { + $invalidProperties[] = "'accountNumber' can't be null"; + } + if ($this->container['accountSuffix'] === null) { + $invalidProperties[] = "'accountSuffix' can't be null"; + } + if ($this->container['bankCode'] === null) { + $invalidProperties[] = "'bankCode' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets accountNumber + * + * @return string + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string $accountNumber The 7-digit bank account number, without separators or whitespace. + * + * @return self + */ + public function setAccountNumber($accountNumber) + { + if (is_null($accountNumber)) { + throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); + } + $this->container['accountNumber'] = $accountNumber; + + return $this; + } + + /** + * Gets accountSuffix + * + * @return string + */ + public function getAccountSuffix() + { + return $this->container['accountSuffix']; + } + + /** + * Sets accountSuffix + * + * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. + * + * @return self + */ + public function setAccountSuffix($accountSuffix) + { + if (is_null($accountSuffix)) { + throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); + } + $this->container['accountSuffix'] = $accountSuffix; + + return $this; + } + + /** + * Gets bankCode + * + * @return string + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * + * @return self + */ + public function setBankCode($bankCode) + { + if (is_null($bankCode)) { + throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); + } + $this->container['bankCode'] = $bankCode; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **nzLocal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * 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/Transfers/PartyIdentification2.php b/src/Adyen/Model/Transfers/PartyIdentification2.php index 185a590d1..49563b48e 100644 --- a/src/Adyen/Model/Transfers/PartyIdentification2.php +++ b/src/Adyen/Model/Transfers/PartyIdentification2.php @@ -386,7 +386,7 @@ public function getDateOfBirth() /** * Sets dateOfBirth * - * @param \DateTime|null $dateOfBirth The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + * @param \DateTime|null $dateOfBirth The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. * * @return self */ @@ -494,7 +494,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your unique reference of the party. This should be consistent for all transfers initiated to/from the same party/counterparty. e.g Your client's unique wallet or payee ID + * @param string|null $reference A unique reference to identify the party or counterparty involved in transfers. This identifier ensures consistency and uniqueness throughout all transactions initiated to and from the same party. For example, your client's unique wallet or payee ID. * * @return self */ diff --git a/src/Adyen/Model/Transfers/Repayment.php b/src/Adyen/Model/Transfers/Repayment.php new file mode 100644 index 000000000..ddba3f4e2 --- /dev/null +++ b/src/Adyen/Model/Transfers/Repayment.php @@ -0,0 +1,453 @@ + + */ +class Repayment implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Repayment'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'basisPoints' => 'int', + 'term' => '\Adyen\Model\Transfers\RepaymentTerm', + 'threshold' => '\Adyen\Model\Transfers\ThresholdRepayment' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'basisPoints' => 'int32', + 'term' => null, + 'threshold' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'basisPoints' => true, + 'term' => false, + 'threshold' => 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 = [ + 'basisPoints' => 'basisPoints', + 'term' => 'term', + 'threshold' => 'threshold' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'basisPoints' => 'setBasisPoints', + 'term' => 'setTerm', + 'threshold' => 'setThreshold' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'basisPoints' => 'getBasisPoints', + 'term' => 'getTerm', + 'threshold' => 'getThreshold' + ]; + + /** + * 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('basisPoints', $data ?? [], null); + $this->setIfExists('term', $data ?? [], null); + $this->setIfExists('threshold', $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['basisPoints'] === null) { + $invalidProperties[] = "'basisPoints' 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 basisPoints + * + * @return int + */ + public function getBasisPoints() + { + return $this->container['basisPoints']; + } + + /** + * Sets basisPoints + * + * @param int $basisPoints The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). + * + * @return self + */ + public function setBasisPoints($basisPoints) + { + // Do nothing for nullable integers + $this->container['basisPoints'] = $basisPoints; + + return $this; + } + + /** + * Gets term + * + * @return \Adyen\Model\Transfers\RepaymentTerm|null + */ + public function getTerm() + { + return $this->container['term']; + } + + /** + * Sets term + * + * @param \Adyen\Model\Transfers\RepaymentTerm|null $term term + * + * @return self + */ + public function setTerm($term) + { + if (is_null($term)) { + throw new \InvalidArgumentException('non-nullable term cannot be null'); + } + $this->container['term'] = $term; + + return $this; + } + + /** + * Gets threshold + * + * @return \Adyen\Model\Transfers\ThresholdRepayment|null + */ + public function getThreshold() + { + return $this->container['threshold']; + } + + /** + * Sets threshold + * + * @param \Adyen\Model\Transfers\ThresholdRepayment|null $threshold threshold + * + * @return self + */ + public function setThreshold($threshold) + { + if (is_null($threshold)) { + throw new \InvalidArgumentException('non-nullable threshold cannot be null'); + } + $this->container['threshold'] = $threshold; + + 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/Transfers/RepaymentTerm.php b/src/Adyen/Model/Transfers/RepaymentTerm.php new file mode 100644 index 000000000..e5806534b --- /dev/null +++ b/src/Adyen/Model/Transfers/RepaymentTerm.php @@ -0,0 +1,417 @@ + + */ +class RepaymentTerm implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RepaymentTerm'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'estimatedDays' => 'int', + 'maximumDays' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'estimatedDays' => 'int32', + 'maximumDays' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'estimatedDays' => true, + 'maximumDays' => true + ]; + + /** + * 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 = [ + 'estimatedDays' => 'estimatedDays', + 'maximumDays' => 'maximumDays' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'estimatedDays' => 'setEstimatedDays', + 'maximumDays' => 'setMaximumDays' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'estimatedDays' => 'getEstimatedDays', + 'maximumDays' => 'getMaximumDays' + ]; + + /** + * 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('estimatedDays', $data ?? [], null); + $this->setIfExists('maximumDays', $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['estimatedDays'] === null) { + $invalidProperties[] = "'estimatedDays' 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 estimatedDays + * + * @return int + */ + public function getEstimatedDays() + { + return $this->container['estimatedDays']; + } + + /** + * Sets estimatedDays + * + * @param int $estimatedDays The estimated term for repaying the grant, in days. + * + * @return self + */ + public function setEstimatedDays($estimatedDays) + { + // Do nothing for nullable integers + $this->container['estimatedDays'] = $estimatedDays; + + return $this; + } + + /** + * Gets maximumDays + * + * @return int|null + */ + public function getMaximumDays() + { + return $this->container['maximumDays']; + } + + /** + * Sets maximumDays + * + * @param int|null $maximumDays The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**. + * + * @return self + */ + public function setMaximumDays($maximumDays) + { + // Do nothing for nullable integers + $this->container['maximumDays'] = $maximumDays; + + 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/Transfers/ThresholdRepayment.php b/src/Adyen/Model/Transfers/ThresholdRepayment.php new file mode 100644 index 000000000..870cb4abf --- /dev/null +++ b/src/Adyen/Model/Transfers/ThresholdRepayment.php @@ -0,0 +1,387 @@ + + */ +class ThresholdRepayment implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThresholdRepayment'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => '\Adyen\Model\Transfers\Amount' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => 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 = [ + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount' + ]; + + /** + * 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('amount', $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['amount'] === null) { + $invalidProperties[] = "'amount' 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 amount + * + * @return \Adyen\Model\Transfers\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Transfers\Amount $amount amount + * + * @return self + */ + public function setAmount($amount) + { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + 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/Transfers/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index 4b3e193cc..a4a722c6b 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -318,9 +318,11 @@ public function getModelName() } public const CATEGORY_BANK = 'bank'; + public const CATEGORY_CARD = 'card'; public const CATEGORY_GRANTS = 'grants'; public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_ISSUED_CARD = 'issuedCard'; + public const CATEGORY_MIGRATION = 'migration'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const STATUS_BOOKED = 'booked'; public const STATUS_PENDING = 'pending'; @@ -331,6 +333,7 @@ public function getModelName() public const TYPE_BANK_TRANSFER = 'bankTransfer'; public const TYPE_CAPTURE = 'capture'; public const TYPE_CAPTURE_REVERSAL = 'captureReversal'; + public const TYPE_CARD_TRANSFER = 'cardTransfer'; public const TYPE_CHARGEBACK = 'chargeback'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; public const TYPE_DEPOSIT_CORRECTION = 'depositCorrection'; @@ -360,9 +363,11 @@ public function getCategoryAllowableValues() { return [ self::CATEGORY_BANK, + self::CATEGORY_CARD, self::CATEGORY_GRANTS, self::CATEGORY_INTERNAL, self::CATEGORY_ISSUED_CARD, + self::CATEGORY_MIGRATION, self::CATEGORY_PLATFORM_PAYMENT, ]; } @@ -393,6 +398,7 @@ public function getTypeAllowableValues() self::TYPE_BANK_TRANSFER, self::TYPE_CAPTURE, self::TYPE_CAPTURE_REVERSAL, + self::TYPE_CARD_TRANSFER, self::TYPE_CHARGEBACK, self::TYPE_CHARGEBACK_REVERSAL, self::TYPE_DEPOSIT_CORRECTION, diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index 0a1d23c6f..185679d3d 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -50,6 +50,7 @@ class Transfer implements ModelInterface, ArrayAccess, \JsonSerializable 'balanceAccountId' => 'string', 'category' => 'string', 'counterparty' => '\Adyen\Model\Transfers\CounterpartyV3', + 'creationDate' => '\DateTime', 'description' => 'string', 'direction' => 'string', 'id' => 'string', @@ -76,6 +77,7 @@ class Transfer implements ModelInterface, ArrayAccess, \JsonSerializable 'balanceAccountId' => null, 'category' => null, 'counterparty' => null, + 'creationDate' => 'date-time', 'description' => null, 'direction' => null, 'id' => null, @@ -100,6 +102,7 @@ class Transfer implements ModelInterface, ArrayAccess, \JsonSerializable 'balanceAccountId' => false, 'category' => false, 'counterparty' => false, + 'creationDate' => false, 'description' => false, 'direction' => false, 'id' => false, @@ -204,6 +207,7 @@ public function isNullableSetToNull(string $property): bool 'balanceAccountId' => 'balanceAccountId', 'category' => 'category', 'counterparty' => 'counterparty', + 'creationDate' => 'creationDate', 'description' => 'description', 'direction' => 'direction', 'id' => 'id', @@ -228,6 +232,7 @@ public function isNullableSetToNull(string $property): bool 'balanceAccountId' => 'setBalanceAccountId', 'category' => 'setCategory', 'counterparty' => 'setCounterparty', + 'creationDate' => 'setCreationDate', 'description' => 'setDescription', 'direction' => 'setDirection', 'id' => 'setId', @@ -252,6 +257,7 @@ public function isNullableSetToNull(string $property): bool 'balanceAccountId' => 'getBalanceAccountId', 'category' => 'getCategory', 'counterparty' => 'getCounterparty', + 'creationDate' => 'getCreationDate', 'description' => 'getDescription', 'direction' => 'getDirection', 'id' => 'getId', @@ -348,7 +354,9 @@ public function getModelName() public const STATUS_CAPTURE_REVERSAL_PENDING = 'captureReversalPending'; public const STATUS_CAPTURE_REVERSED = 'captureReversed'; public const STATUS_CAPTURED = 'captured'; + public const STATUS_CAPTURED_EXTERNALLY = 'capturedExternally'; public const STATUS_CHARGEBACK = 'chargeback'; + public const STATUS_CHARGEBACK_EXTERNALLY = 'chargebackExternally'; public const STATUS_CHARGEBACK_PENDING = 'chargebackPending'; public const STATUS_CHARGEBACK_REVERSAL_PENDING = 'chargebackReversalPending'; public const STATUS_CHARGEBACK_REVERSED = 'chargebackReversed'; @@ -385,6 +393,7 @@ public function getModelName() public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; public const STATUS_REFUND_REVERSED = 'refundReversed'; public const STATUS_REFUNDED = 'refunded'; + public const STATUS_REFUNDED_EXTERNALLY = 'refundedExternally'; public const STATUS_REFUSED = 'refused'; public const STATUS_RESERVE_ADJUSTMENT = 'reserveAdjustment'; public const STATUS_RESERVE_ADJUSTMENT_PENDING = 'reserveAdjustmentPending'; @@ -484,7 +493,9 @@ public function getStatusAllowableValues() self::STATUS_CAPTURE_REVERSAL_PENDING, self::STATUS_CAPTURE_REVERSED, self::STATUS_CAPTURED, + self::STATUS_CAPTURED_EXTERNALLY, self::STATUS_CHARGEBACK, + self::STATUS_CHARGEBACK_EXTERNALLY, self::STATUS_CHARGEBACK_PENDING, self::STATUS_CHARGEBACK_REVERSAL_PENDING, self::STATUS_CHARGEBACK_REVERSED, @@ -521,6 +532,7 @@ public function getStatusAllowableValues() self::STATUS_REFUND_REVERSAL_PENDING, self::STATUS_REFUND_REVERSED, self::STATUS_REFUNDED, + self::STATUS_REFUNDED_EXTERNALLY, self::STATUS_REFUSED, self::STATUS_RESERVE_ADJUSTMENT, self::STATUS_RESERVE_ADJUSTMENT_PENDING, @@ -551,6 +563,7 @@ public function __construct(array $data = null) $this->setIfExists('balanceAccountId', $data ?? [], null); $this->setIfExists('category', $data ?? [], null); $this->setIfExists('counterparty', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('direction', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); @@ -836,6 +849,33 @@ public function setCounterparty($counterparty) 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 description * @@ -1097,7 +1137,7 @@ public function getReferenceForBeneficiary() /** * Sets referenceForBeneficiary * - * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all notification webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. + * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. * * @return self */ diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index 619937caf..13dedfea8 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -279,6 +279,7 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_ISSUED_CARD = 'issuedCard'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; + public const CATEGORY_CARD = 'card'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_DIRECT_DEBIT = 'directDebit'; public const PRIORITY_FAST = 'fast'; @@ -299,6 +300,7 @@ public function getCategoryAllowableValues() self::CATEGORY_INTERNAL, self::CATEGORY_ISSUED_CARD, self::CATEGORY_PLATFORM_PAYMENT, + self::CATEGORY_CARD, ]; } /** @@ -691,7 +693,7 @@ public function getReferenceForBeneficiary() /** * Sets referenceForBeneficiary * - * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all notification webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. + * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. * * @return self */ diff --git a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php index 4b497f967..db3d95e50 100644 --- a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php +++ b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php @@ -386,7 +386,7 @@ public function getDateOfBirth() /** * Sets dateOfBirth * - * @param \DateTime|null $dateOfBirth The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + * @param \DateTime|null $dateOfBirth The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. * * @return self */ @@ -494,7 +494,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your unique reference of the party. This should be consistent for all transfers initiated to/from the same party/counterparty. e.g Your client's unique wallet or payee ID + * @param string|null $reference A unique reference to identify the party or counterparty involved in transfers. This identifier ensures consistency and uniqueness throughout all transactions initiated to and from the same party. For example, your client's unique wallet or payee ID. * * @return self */ diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c5fc1c3d8..c4806b7c1 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -47,9 +47,10 @@ public function __construct(Client $client) * @return object * @throws AdyenException */ - public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null): void + public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null): object { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; - $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, object::class); } } diff --git a/src/Adyen/Service/Checkout/PaymentsApi.php b/src/Adyen/Service/Checkout/PaymentsApi.php index 5d2df6d39..fd61caa6b 100644 --- a/src/Adyen/Service/Checkout/PaymentsApi.php +++ b/src/Adyen/Service/Checkout/PaymentsApi.php @@ -39,6 +39,21 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); } + /** + * Get the result of a payment session + * + * @param string $sessionId + * @param array|null $requestOptions ['queryParams' => ['sessionResult'=> string]] + * @return \Adyen\Model\Checkout\SessionResultResponse + * @throws AdyenException + */ + public function getResultOfPaymentSession(string $sessionId, array $requestOptions = null): \Adyen\Model\Checkout\SessionResultResponse + { + $endpoint = $this->baseURL . str_replace(['{sessionId}'], [$sessionId], "/sessions/{sessionId}"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\SessionResultResponse::class); + } + /** * Get the list of brands on the card * @@ -57,15 +72,15 @@ public function cardDetails(\Adyen\Model\Checkout\CardDetailsRequest $cardDetail /** * Start a transaction for donations * - * @param \Adyen\Model\Checkout\PaymentDonationRequest $paymentDonationRequest + * @param \Adyen\Model\Checkout\CheckoutDonationPaymentRequest $checkoutDonationPaymentRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\DonationResponse * @throws AdyenException */ - public function donations(\Adyen\Model\Checkout\PaymentDonationRequest $paymentDonationRequest, array $requestOptions = null): \Adyen\Model\Checkout\DonationResponse + public function donations(\Adyen\Model\Checkout\CheckoutDonationPaymentRequest $checkoutDonationPaymentRequest, array $requestOptions = null): \Adyen\Model\Checkout\DonationResponse { $endpoint = $this->baseURL . "/donations"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentDonationRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $checkoutDonationPaymentRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\DonationResponse::class); } @@ -87,15 +102,15 @@ public function paymentMethods(\Adyen\Model\Checkout\PaymentMethodsRequest $paym /** * Start a transaction * - * @param \Adyen\Model\Checkout\PaymentRequest $paymentRequest + * @param \Adyen\Model\Checkout\CheckoutPaymentRequest $checkoutPaymentRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\PaymentResponse * @throws AdyenException */ - public function payments(\Adyen\Model\Checkout\PaymentRequest $paymentRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentResponse + public function payments(\Adyen\Model\Checkout\CheckoutPaymentRequest $checkoutPaymentRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentResponse { $endpoint = $this->baseURL . "/payments"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $checkoutPaymentRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentResponse::class); } diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index c420e5055..30c191e2f 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,10 +44,10 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - * @return object + * @throws AdyenException */ - public function deleteDocument(string $id, array $requestOptions = null): void + 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/TermsOfServiceApi.php b/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php index 4e20ecd40..3728a1886 100644 --- a/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php @@ -54,6 +54,21 @@ public function getTermsOfServiceInformationForLegalEntity(string $id, array $re return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse::class); } + /** + * Get Terms of Service status + * + * @param string $id + * @param array|null $requestOptions + * @return \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse + * @throws AdyenException + */ + public function getTermsOfServiceStatus(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/termsOfServiceStatus"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse::class); + } + /** * Accept Terms of Service * diff --git a/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php b/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php new file mode 100644 index 000000000..4b0992891 --- /dev/null +++ b/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php @@ -0,0 +1,192 @@ +baseURL = $this->createBaseUrl("https://management-test.adyen.com/v1"); + } + + /** + * Delete a split configuration + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function deleteSplitConfiguration(string $merchantId, string $splitConfigurationId, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}'], [$merchantId, $splitConfigurationId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"); + $response = $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Delete a split configuration rule + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param string $ruleId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function deleteSplitConfigurationRule(string $merchantId, string $splitConfigurationId, string $ruleId, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}', '{ruleId}'], [$merchantId, $splitConfigurationId, $ruleId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}"); + $response = $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Get a list of split configurations + * + * @param string $merchantId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfigurationList + * @throws AdyenException + */ + public function listSplitConfigurations(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\SplitConfigurationList + { + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/splitConfigurations"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfigurationList::class); + } + + /** + * Get a split configuration + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function getSplitConfiguration(string $merchantId, string $splitConfigurationId, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}'], [$merchantId, $splitConfigurationId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Update split configuration description + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param \Adyen\Model\Management\UpdateSplitConfigurationRequest $updateSplitConfigurationRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function updateSplitConfigurationDescription(string $merchantId, string $splitConfigurationId, \Adyen\Model\Management\UpdateSplitConfigurationRequest $updateSplitConfigurationRequest, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}'], [$merchantId, $splitConfigurationId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateSplitConfigurationRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Update split conditions + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param string $ruleId + * @param \Adyen\Model\Management\UpdateSplitConfigurationRuleRequest $updateSplitConfigurationRuleRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function updateSplitConditions(string $merchantId, string $splitConfigurationId, string $ruleId, \Adyen\Model\Management\UpdateSplitConfigurationRuleRequest $updateSplitConfigurationRuleRequest, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}', '{ruleId}'], [$merchantId, $splitConfigurationId, $ruleId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateSplitConfigurationRuleRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Update the split logic + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param string $ruleId + * @param string $splitLogicId + * @param \Adyen\Model\Management\UpdateSplitConfigurationLogicRequest $updateSplitConfigurationLogicRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function updateSplitLogic(string $merchantId, string $splitConfigurationId, string $ruleId, string $splitLogicId, \Adyen\Model\Management\UpdateSplitConfigurationLogicRequest $updateSplitConfigurationLogicRequest, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}', '{ruleId}', '{splitLogicId}'], [$merchantId, $splitConfigurationId, $ruleId, $splitLogicId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateSplitConfigurationLogicRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Create a split configuration + * + * @param string $merchantId + * @param \Adyen\Model\Management\SplitConfiguration $splitConfiguration + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function createSplitConfiguration(string $merchantId, \Adyen\Model\Management\SplitConfiguration $splitConfiguration, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/splitConfigurations"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $splitConfiguration->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } + + /** + * Create a rule + * + * @param string $merchantId + * @param string $splitConfigurationId + * @param \Adyen\Model\Management\SplitConfigurationRule $splitConfigurationRule + * @param array|null $requestOptions + * @return \Adyen\Model\Management\SplitConfiguration + * @throws AdyenException + */ + public function createRule(string $merchantId, string $splitConfigurationId, \Adyen\Model\Management\SplitConfigurationRule $splitConfigurationRule, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + { + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{splitConfigurationId}'], [$merchantId, $splitConfigurationId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $splitConfigurationRule->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); + } +} diff --git a/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php b/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php index 1c1fe32e1..b3a6104f5 100644 --- a/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php @@ -43,7 +43,7 @@ public function __construct(Client $client) * Get a list of Android apps * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'packageName'=> string, 'versionCode'=> int]] * @return \Adyen\Model\Management\AndroidAppsResponse * @throws AdyenException */ @@ -58,7 +58,7 @@ public function listAndroidApps(string $companyId, array $requestOptions = null) * Get a list of Android certificates * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'certificateName'=> string]] * @return \Adyen\Model\Management\AndroidCertificatesResponse * @throws AdyenException */ diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index d611435db..873dcf107 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -42,7 +42,7 @@ public function __construct(Client $client) /** * Get a list of terminals * - * @param array|null $requestOptions ['queryParams' => ['searchQuery'=> string, 'countries'=> string, 'merchantIds'=> string, 'storeIds'=> string, 'brandModels'=> string, 'pageNumber'=> int, 'pageSize'=> int]] + * @param array|null $requestOptions ['queryParams' => ['searchQuery'=> string, 'otpQuery'=> string, 'countries'=> string, 'merchantIds'=> string, 'storeIds'=> string, 'brandModels'=> string, 'pageNumber'=> int, 'pageSize'=> int]] * @return \Adyen\Model\Management\ListTerminalsResponse * @throws AdyenException */ diff --git a/src/Adyen/Service/Transfers/CapitalApi.php b/src/Adyen/Service/Transfers/CapitalApi.php new file mode 100644 index 000000000..f030dfce1 --- /dev/null +++ b/src/Adyen/Service/Transfers/CapitalApi.php @@ -0,0 +1,85 @@ +baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/btl/v3"); + } + + /** + * Get a capital account + * + * @param array|null $requestOptions ['queryParams' => ['counterpartyAccountHolderId'=> string]] + * @return \Adyen\Model\Transfers\CapitalGrants + * @throws AdyenException + */ + public function getCapitalAccount(array $requestOptions = null): \Adyen\Model\Transfers\CapitalGrants + { + $endpoint = $this->baseURL . "/grants"; + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Transfers\CapitalGrants::class); + } + + /** + * Get grant reference details + * + * @param string $id + * @param array|null $requestOptions + * @return \Adyen\Model\Transfers\CapitalGrant + * @throws AdyenException + */ + public function getGrantReferenceDetails(string $id, array $requestOptions = null): \Adyen\Model\Transfers\CapitalGrant + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/grants/{id}"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Transfers\CapitalGrant::class); + } + + /** + * Request a grant payout + * + * @param \Adyen\Model\Transfers\CapitalGrantInfo $capitalGrantInfo + * @param array|null $requestOptions + * @return \Adyen\Model\Transfers\CapitalGrant + * @throws AdyenException + */ + public function requestGrantPayout(\Adyen\Model\Transfers\CapitalGrantInfo $capitalGrantInfo, array $requestOptions = null): \Adyen\Model\Transfers\CapitalGrant + { + $endpoint = $this->baseURL . "/grants"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $capitalGrantInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Transfers\CapitalGrant::class); + } +}