From 7659a07bb8184dfd3c95eedea7dc48acafb4691b Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Thu, 14 Dec 2023 13:32:34 +0000 Subject: [PATCH] [create-pull-request] automated change --- src/Adyen/Model/ACSWebhook/Amount.php | 424 +++ .../Model/ACSWebhook/AuthenticationInfo.php | 1222 +++++++++ .../AuthenticationNotificationData.php | 604 ++++ .../AuthenticationNotificationRequest.php | 492 ++++ .../BalancePlatformNotificationResponse.php | 384 +++ src/Adyen/Model/ACSWebhook/ChallengeInfo.php | 632 +++++ src/Adyen/Model/ACSWebhook/ModelInterface.php | 92 + .../Model/ACSWebhook/ObjectSerializer.php | 316 +++ src/Adyen/Model/ACSWebhook/PurchaseInfo.php | 461 ++++ src/Adyen/Model/ACSWebhook/Resource.php | 452 +++ src/Adyen/Model/BalanceControl/Amount.php | 2 +- .../BalanceControl/BalanceTransferRequest.php | 2 +- .../BalanceTransferResponse.php | 2 +- .../Model/BalanceControl/ModelInterface.php | 2 +- .../Model/BalanceControl/ObjectSerializer.php | 15 +- .../AULocalAccountIdentification.php | 2 +- .../Model/BalancePlatform/AccountHolder.php | 2 +- .../AccountHolderCapability.php | 2 +- .../BalancePlatform/AccountHolderInfo.php | 2 +- .../AccountHolderUpdateRequest.php | 2 +- .../AccountSupportingEntityCapability.php | 2 +- .../ActiveNetworkTokensRestriction.php | 2 +- .../AdditionalBankIdentification.php | 2 +- src/Adyen/Model/BalancePlatform/Address.php | 2 +- .../BalancePlatform/AddressRequirement.php | 2 +- src/Adyen/Model/BalancePlatform/Amount.php | 2 +- .../AmountMinMaxRequirement.php | 2 +- .../Model/BalancePlatform/Authentication.php | 2 +- .../BRLocalAccountIdentification.php | 2 +- src/Adyen/Model/BalancePlatform/Balance.php | 2 +- .../Model/BalancePlatform/BalanceAccount.php | 2 +- .../BalancePlatform/BalanceAccountBase.php | 2 +- .../BalancePlatform/BalanceAccountInfo.php | 2 +- .../BalanceAccountUpdateRequest.php | 2 +- .../Model/BalancePlatform/BalancePlatform.php | 2 +- .../BalanceSweepConfigurationsResponse.php | 2 +- .../Model/BalancePlatform/BankAccount.php | 2 +- .../BankAccountAccountIdentification.php | 2 +- ...nkAccountIdentificationTypeRequirement.php | 2 +- ...AccountIdentificationValidationRequest.php | 2 +- ...ValidationRequestAccountIdentification.php | 2 +- .../BalancePlatform/BankIdentification.php | 2 +- .../BrandVariantsRestriction.php | 2 +- .../Model/BalancePlatform/BulkAddress.php | 2 +- .../CALocalAccountIdentification.php | 2 +- .../CZLocalAccountIdentification.php | 2 +- .../BalancePlatform/CapabilityProblem.php | 2 +- .../CapabilityProblemEntity.php | 2 +- .../CapabilityProblemEntityRecursive.php | 2 +- .../BalancePlatform/CapabilitySettings.php | 10 +- .../Model/BalancePlatform/CapitalBalance.php | 2 +- .../BalancePlatform/CapitalGrantAccount.php | 2 +- src/Adyen/Model/BalancePlatform/Card.php | 2 +- .../BalancePlatform/CardConfiguration.php | 2 +- src/Adyen/Model/BalancePlatform/CardInfo.php | 2 +- .../Model/BalancePlatform/ContactDetails.php | 2 +- .../Model/BalancePlatform/Counterparty.php | 2 +- .../CounterpartyBankRestriction.php | 2 +- .../BalancePlatform/CountriesRestriction.php | 2 +- .../CreateSweepConfigurationV2.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- .../BalancePlatform/DayOfWeekRestriction.php | 2 +- .../Model/BalancePlatform/DeliveryAddress.php | 2 +- .../Model/BalancePlatform/DeliveryContact.php | 2 +- .../Model/BalancePlatform/DeviceInfo.php | 2 +- .../DifferentCurrenciesRestriction.php | 2 +- src/Adyen/Model/BalancePlatform/Duration.php | 2 +- .../BalancePlatform/EntryModesRestriction.php | 2 +- src/Adyen/Model/BalancePlatform/Expiry.php | 2 +- src/Adyen/Model/BalancePlatform/Fee.php | 2 +- .../GetNetworkTokenResponse.php | 2 +- .../BalancePlatform/GetTaxFormResponse.php | 2 +- .../Model/BalancePlatform/GrantLimit.php | 2 +- .../Model/BalancePlatform/GrantOffer.php | 2 +- .../Model/BalancePlatform/GrantOffers.php | 2 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../IbanAccountIdentification.php | 2 +- .../InternationalTransactionRestriction.php | 2 +- .../Model/BalancePlatform/InvalidField.php | 2 +- .../ListNetworkTokensResponse.php | 2 +- .../MatchingTransactionsRestriction.php | 2 +- .../Model/BalancePlatform/MccsRestriction.php | 2 +- .../BalancePlatform/MerchantAcquirerPair.php | 2 +- .../MerchantNamesRestriction.php | 2 +- .../BalancePlatform/MerchantsRestriction.php | 2 +- .../Model/BalancePlatform/ModelInterface.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- src/Adyen/Model/BalancePlatform/Name.php | 2 +- .../Model/BalancePlatform/NetworkToken.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../BalancePlatform/ObjectSerializer.php | 15 +- .../PLLocalAccountIdentification.php | 2 +- .../PaginatedAccountHoldersResponse.php | 2 +- .../PaginatedBalanceAccountsResponse.php | 2 +- .../PaginatedPaymentInstrumentsResponse.php | 2 +- .../BalancePlatform/PaymentInstrument.php | 2 +- .../PaymentInstrumentBankAccount.php | 2 +- .../PaymentInstrumentGroup.php | 2 +- .../PaymentInstrumentGroupInfo.php | 2 +- .../BalancePlatform/PaymentInstrumentInfo.php | 2 +- .../PaymentInstrumentRequirement.php | 2 +- .../PaymentInstrumentRevealInfo.php | 2 +- .../PaymentInstrumentUpdateRequest.php | 2 +- src/Adyen/Model/BalancePlatform/Phone.php | 2 +- .../Model/BalancePlatform/PhoneNumber.php | 2 +- .../PlatformPaymentConfiguration.php | 2 +- .../ProcessingTypesRestriction.php | 2 +- .../BalancePlatform/RemediatingAction.php | 2 +- src/Adyen/Model/BalancePlatform/Repayment.php | 2 +- .../Model/BalancePlatform/RepaymentTerm.php | 2 +- .../BalancePlatform/RestServiceError.php | 2 +- .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- .../BalancePlatform/SameAmountRestriction.php | 2 +- .../SameCounterpartyRestriction.php | 2 +- .../Model/BalancePlatform/StringMatch.php | 2 +- .../BalancePlatform/SweepConfigurationV2.php | 2 +- .../BalancePlatform/SweepCounterparty.php | 2 +- .../Model/BalancePlatform/SweepSchedule.php | 2 +- .../BalancePlatform/ThresholdRepayment.php | 2 +- src/Adyen/Model/BalancePlatform/TimeOfDay.php | 2 +- .../BalancePlatform/TimeOfDayRestriction.php | 2 +- .../TotalAmountRestriction.php | 2 +- .../Model/BalancePlatform/TransactionRule.php | 2 +- .../TransactionRuleEntityKey.php | 2 +- .../BalancePlatform/TransactionRuleInfo.php | 2 +- .../TransactionRuleInterval.php | 2 +- .../TransactionRuleResponse.php | 2 +- .../TransactionRuleRestrictions.php | 2 +- .../TransactionRulesResponse.php | 2 +- .../Model/BalancePlatform/TransferRoute.php | 2 +- .../BalancePlatform/TransferRouteRequest.php | 2 +- .../TransferRouteRequirements.php | 2 +- .../BalancePlatform/TransferRouteResponse.php | 2 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 2 +- .../UpdateNetworkTokenRequest.php | 2 +- .../UpdatePaymentInstrument.php | 2 +- .../UpdateSweepConfigurationV2.php | 2 +- .../BalancePlatform/VerificationDeadline.php | 2 +- .../BalancePlatform/VerificationError.php | 2 +- .../VerificationErrorRecursive.php | 2 +- src/Adyen/Model/BinLookup/Amount.php | 2 +- src/Adyen/Model/BinLookup/BinDetail.php | 2 +- src/Adyen/Model/BinLookup/CardBin.php | 2 +- .../BinLookup/CostEstimateAssumptions.php | 2 +- .../Model/BinLookup/CostEstimateRequest.php | 2 +- .../Model/BinLookup/CostEstimateResponse.php | 2 +- .../Model/BinLookup/DSPublicKeyDetail.php | 2 +- src/Adyen/Model/BinLookup/MerchantDetails.php | 2 +- src/Adyen/Model/BinLookup/ModelInterface.php | 2 +- .../Model/BinLookup/ObjectSerializer.php | 15 +- src/Adyen/Model/BinLookup/Recurring.php | 2 +- src/Adyen/Model/BinLookup/ServiceError.php | 2 +- .../BinLookup/ThreeDS2CardRangeDetail.php | 2 +- .../BinLookup/ThreeDSAvailabilityRequest.php | 2 +- .../BinLookup/ThreeDSAvailabilityResponse.php | 2 +- src/Adyen/Model/Checkout/AccountInfo.php | 2 +- src/Adyen/Model/Checkout/AcctInfo.php | 2 +- src/Adyen/Model/Checkout/AchDetails.php | 2 +- .../Model/Checkout/AdditionalData3DSecure.php | 2 +- .../Model/Checkout/AdditionalDataAirline.php | 2 +- .../Checkout/AdditionalDataCarRental.php | 2 +- .../Model/Checkout/AdditionalDataCommon.php | 2 +- .../Model/Checkout/AdditionalDataLevel23.php | 2 +- .../Model/Checkout/AdditionalDataLodging.php | 2 +- .../Checkout/AdditionalDataOpenInvoice.php | 2 +- .../Model/Checkout/AdditionalDataOpi.php | 2 +- .../Model/Checkout/AdditionalDataRatepay.php | 2 +- .../Model/Checkout/AdditionalDataRetry.php | 2 +- .../Model/Checkout/AdditionalDataRisk.php | 2 +- .../Checkout/AdditionalDataRiskStandalone.php | 2 +- .../Checkout/AdditionalDataSubMerchant.php | 2 +- .../AdditionalDataTemporaryServices.php | 2 +- .../Model/Checkout/AdditionalDataWallets.php | 2 +- src/Adyen/Model/Checkout/Address.php | 2 +- src/Adyen/Model/Checkout/AfterpayDetails.php | 2 +- src/Adyen/Model/Checkout/AmazonPayDetails.php | 2 +- src/Adyen/Model/Checkout/Amount.php | 2 +- .../Model/Checkout/AndroidPayDetails.php | 2 +- src/Adyen/Model/Checkout/ApplePayDetails.php | 2 +- .../Model/Checkout/ApplePaySessionRequest.php | 2 +- .../Checkout/ApplePaySessionResponse.php | 2 +- src/Adyen/Model/Checkout/ApplicationInfo.php | 2 +- .../Model/Checkout/AuthenticationData.php | 2 +- src/Adyen/Model/Checkout/Avs.php | 2 +- .../Model/Checkout/BacsDirectDebitDetails.php | 2 +- .../Model/Checkout/BalanceCheckRequest.php | 2 +- .../Model/Checkout/BalanceCheckResponse.php | 2 +- src/Adyen/Model/Checkout/BankAccount.php | 2 +- src/Adyen/Model/Checkout/BillDeskDetails.php | 2 +- src/Adyen/Model/Checkout/BillingAddress.php | 2 +- src/Adyen/Model/Checkout/BlikDetails.php | 2 +- src/Adyen/Model/Checkout/BrowserInfo.php | 2 +- .../Model/Checkout/CancelOrderRequest.php | 2 +- .../Model/Checkout/CancelOrderResponse.php | 2 +- src/Adyen/Model/Checkout/Card.php | 2 +- src/Adyen/Model/Checkout/CardBrandDetails.php | 2 +- src/Adyen/Model/Checkout/CardDetails.php | 2 +- .../Model/Checkout/CardDetailsRequest.php | 2 +- .../Model/Checkout/CardDetailsResponse.php | 2 +- src/Adyen/Model/Checkout/CellulantDetails.php | 2 +- .../Model/Checkout/CheckoutAwaitAction.php | 2 +- .../CheckoutDelegatedAuthenticationAction.php | 2 +- .../Checkout/CheckoutNativeRedirectAction.php | 2 +- .../Model/Checkout/CheckoutOrderResponse.php | 2 +- .../Model/Checkout/CheckoutPaymentMethod.php | 6 +- .../Model/Checkout/CheckoutQrCodeAction.php | 2 +- .../Model/Checkout/CheckoutRedirectAction.php | 2 +- .../Model/Checkout/CheckoutSDKAction.php | 2 +- .../CheckoutSessionInstallmentOption.php | 2 +- .../Model/Checkout/CheckoutThreeDS2Action.php | 2 +- .../Model/Checkout/CheckoutVoucherAction.php | 2 +- src/Adyen/Model/Checkout/CommonField.php | 2 +- src/Adyen/Model/Checkout/Company.php | 2 +- src/Adyen/Model/Checkout/Configuration.php | 2 +- .../Checkout/CreateCheckoutSessionRequest.php | 4 +- .../CreateCheckoutSessionResponse.php | 4 +- .../Model/Checkout/CreateOrderRequest.php | 2 +- .../Model/Checkout/CreateOrderResponse.php | 2 +- src/Adyen/Model/Checkout/DeliveryAddress.php | 2 +- .../DetailsRequestAuthenticationData.php | 2 +- .../Model/Checkout/DeviceRenderOptions.php | 2 +- src/Adyen/Model/Checkout/DokuDetails.php | 2 +- .../Model/Checkout/DonationPaymentMethod.php | 2 +- .../Model/Checkout/DonationPaymentRequest.php | 9 +- .../Checkout/DonationPaymentResponse.php | 2 +- src/Adyen/Model/Checkout/DotpayDetails.php | 2 +- src/Adyen/Model/Checkout/DragonpayDetails.php | 2 +- .../Model/Checkout/EcontextVoucherDetails.php | 2 +- .../Model/Checkout/EncryptedOrderData.php | 2 +- src/Adyen/Model/Checkout/ExternalPlatform.php | 2 +- src/Adyen/Model/Checkout/ForexQuote.php | 2 +- src/Adyen/Model/Checkout/FraudCheckResult.php | 2 +- src/Adyen/Model/Checkout/FraudResult.php | 2 +- src/Adyen/Model/Checkout/FundOrigin.php | 2 +- src/Adyen/Model/Checkout/FundRecipient.php | 2 +- .../GenericIssuerPaymentMethodDetails.php | 2 +- src/Adyen/Model/Checkout/GiropayDetails.php | 2 +- src/Adyen/Model/Checkout/GooglePayDetails.php | 2 +- src/Adyen/Model/Checkout/IdealDetails.php | 2 +- src/Adyen/Model/Checkout/InputDetail.php | 2 +- .../Model/Checkout/InstallmentOption.php | 2 +- src/Adyen/Model/Checkout/Installments.php | 2 +- .../Model/Checkout/InstallmentsNumber.php | 2 +- src/Adyen/Model/Checkout/Item.php | 2 +- src/Adyen/Model/Checkout/KlarnaDetails.php | 2 +- src/Adyen/Model/Checkout/LineItem.php | 2 +- .../ListStoredPaymentMethodsResponse.php | 2 +- src/Adyen/Model/Checkout/Mandate.php | 2 +- .../Model/Checkout/MasterpassDetails.php | 2 +- src/Adyen/Model/Checkout/MbwayDetails.php | 6 +- src/Adyen/Model/Checkout/MerchantDevice.php | 2 +- .../Model/Checkout/MerchantRiskIndicator.php | 2 +- src/Adyen/Model/Checkout/MobilePayDetails.php | 2 +- src/Adyen/Model/Checkout/ModelInterface.php | 2 +- src/Adyen/Model/Checkout/MolPayDetails.php | 2 +- src/Adyen/Model/Checkout/Name.php | 2 +- src/Adyen/Model/Checkout/ObjectSerializer.php | 15 +- .../Model/Checkout/OpenInvoiceDetails.php | 2 +- src/Adyen/Model/Checkout/PayPalDetails.php | 2 +- src/Adyen/Model/Checkout/PayUUpiDetails.php | 2 +- .../Model/Checkout/PayWithGoogleDetails.php | 2 +- .../Checkout/PaymentAmountUpdateRequest.php | 2 +- .../Checkout/PaymentAmountUpdateResponse.php | 2 +- .../Model/Checkout/PaymentCancelRequest.php | 2 +- .../Model/Checkout/PaymentCancelResponse.php | 2 +- .../Model/Checkout/PaymentCaptureRequest.php | 2 +- .../Model/Checkout/PaymentCaptureResponse.php | 2 +- .../Checkout/PaymentCompletionDetails.php | 2 +- src/Adyen/Model/Checkout/PaymentDetails.php | 2 +- .../Model/Checkout/PaymentDetailsRequest.php | 2 +- .../Model/Checkout/PaymentDetailsResponse.php | 2 +- .../Model/Checkout/PaymentLinkRequest.php | 2 +- .../Model/Checkout/PaymentLinkResponse.php | 2 +- src/Adyen/Model/Checkout/PaymentMethod.php | 2 +- .../Model/Checkout/PaymentMethodGroup.php | 2 +- .../Model/Checkout/PaymentMethodIssuer.php | 2 +- .../Model/Checkout/PaymentMethodsRequest.php | 2 +- .../Model/Checkout/PaymentMethodsResponse.php | 2 +- .../Model/Checkout/PaymentRefundRequest.php | 48 +- .../Model/Checkout/PaymentRefundResponse.php | 48 +- src/Adyen/Model/Checkout/PaymentRequest.php | 2 +- src/Adyen/Model/Checkout/PaymentResponse.php | 2 +- .../Model/Checkout/PaymentResponseAction.php | 2 +- .../Model/Checkout/PaymentReversalRequest.php | 2 +- .../Checkout/PaymentReversalResponse.php | 2 +- .../Model/Checkout/PaymentSetupRequest.php | 2 +- .../Model/Checkout/PaymentSetupResponse.php | 2 +- .../Checkout/PaymentVerificationRequest.php | 2 +- .../Checkout/PaymentVerificationResponse.php | 2 +- src/Adyen/Model/Checkout/Phone.php | 2 +- .../Checkout/PlatformChargebackLogic.php | 2 +- src/Adyen/Model/Checkout/RatepayDetails.php | 2 +- src/Adyen/Model/Checkout/Recurring.php | 2 +- src/Adyen/Model/Checkout/RecurringDetail.php | 2 +- .../ResponseAdditionalData3DSecure.php | 2 +- .../ResponseAdditionalDataBillingAddress.php | 2 +- .../Checkout/ResponseAdditionalDataCard.php | 2 +- .../Checkout/ResponseAdditionalDataCommon.php | 2 +- .../ResponseAdditionalDataDomesticError.php | 2 +- .../ResponseAdditionalDataInstallments.php | 2 +- .../ResponseAdditionalDataNetworkTokens.php | 2 +- .../Checkout/ResponseAdditionalDataOpi.php | 2 +- .../Checkout/ResponseAdditionalDataSepa.php | 2 +- .../Model/Checkout/ResponsePaymentMethod.php | 2 +- src/Adyen/Model/Checkout/RiskData.php | 2 +- src/Adyen/Model/Checkout/SDKEphemPubKey.php | 2 +- .../Model/Checkout/SamsungPayDetails.php | 2 +- .../Model/Checkout/SepaDirectDebitDetails.php | 2 +- src/Adyen/Model/Checkout/ServiceError.php | 2 +- .../Model/Checkout/ServiceErrorDetails.php | 2 +- .../Model/Checkout/SessionResultResponse.php | 2 +- src/Adyen/Model/Checkout/ShopperInput.php | 2 +- .../Checkout/ShopperInteractionDevice.php | 2 +- src/Adyen/Model/Checkout/Split.php | 2 +- src/Adyen/Model/Checkout/SplitAmount.php | 2 +- .../StandalonePaymentCancelRequest.php | 2 +- .../StandalonePaymentCancelResponse.php | 2 +- src/Adyen/Model/Checkout/StoredDetails.php | 2 +- .../Model/Checkout/StoredPaymentMethod.php | 104 +- .../Checkout/StoredPaymentMethodDetails.php | 2 +- .../Checkout/StoredPaymentMethodResource.php | 2 +- src/Adyen/Model/Checkout/SubInputDetail.php | 2 +- src/Adyen/Model/Checkout/SubMerchant.php | 2 +- src/Adyen/Model/Checkout/SubMerchantInfo.php | 2 +- .../Model/Checkout/ThreeDS2RequestData.php | 2 +- .../Model/Checkout/ThreeDS2RequestFields.php | 2 +- .../Model/Checkout/ThreeDS2ResponseData.php | 2 +- src/Adyen/Model/Checkout/ThreeDS2Result.php | 2 +- .../Model/Checkout/ThreeDSRequestData.php | 2 +- .../ThreeDSRequestorAuthenticationInfo.php | 2 +- ...hreeDSRequestorPriorAuthenticationInfo.php | 2 +- src/Adyen/Model/Checkout/ThreeDSecureData.php | 2 +- .../Checkout/UpdatePaymentLinkRequest.php | 2 +- .../Model/Checkout/UpiCollectDetails.php | 2 +- src/Adyen/Model/Checkout/UpiIntentDetails.php | 2 +- src/Adyen/Model/Checkout/UtilityRequest.php | 2 +- src/Adyen/Model/Checkout/UtilityResponse.php | 2 +- src/Adyen/Model/Checkout/VippsDetails.php | 4 +- .../Model/Checkout/VisaCheckoutDetails.php | 2 +- src/Adyen/Model/Checkout/WeChatPayDetails.php | 2 +- .../Checkout/WeChatPayMiniProgramDetails.php | 2 +- src/Adyen/Model/Checkout/ZipDetails.php | 2 +- .../ConfigurationWebhook/AccountHolder.php | 835 ++++++ .../AccountHolderCapability.php | 801 ++++++ .../AccountHolderNotificationData.php | 418 +++ .../AccountHolderNotificationRequest.php | 494 ++++ .../AccountSupportingEntityCapability.php | 699 +++++ .../Model/ConfigurationWebhook/Address.php | 569 ++++ .../Model/ConfigurationWebhook/Amount.php | 424 +++ .../ConfigurationWebhook/Authentication.php | 452 +++ .../Model/ConfigurationWebhook/Balance.php | 532 ++++ .../ConfigurationWebhook/BalanceAccount.php | 801 ++++++ .../BalanceAccountNotificationData.php | 418 +++ .../BalanceAccountNotificationRequest.php | 494 ++++ .../BalancePlatformNotificationResponse.php | 384 +++ .../ConfigurationWebhook/BulkAddress.php | 659 +++++ .../CapabilityProblem.php | 418 +++ .../CapabilityProblemEntity.php | 521 ++++ .../CapabilityProblemEntityRecursive.php | 487 ++++ .../CapabilitySettings.php | 580 ++++ src/Adyen/Model/ConfigurationWebhook/Card.php | 842 ++++++ .../CardConfiguration.php | 829 ++++++ .../ConfigurationWebhook/CardOrderItem.php | 622 +++++ .../CardOrderItemDeliveryStatus.php | 497 ++++ .../CardOrderNotificationRequest.php | 494 ++++ .../Model/ConfigurationWebhook/Contact.php | 588 ++++ .../ConfigurationWebhook/ContactDetails.php | 495 ++++ .../Model/ConfigurationWebhook/Expiry.php | 418 +++ .../IbanAccountIdentification.php | 455 ++++ .../ConfigurationWebhook/ModelInterface.php | 92 + src/Adyen/Model/ConfigurationWebhook/Name.php | 424 +++ .../ConfigurationWebhook/ObjectSerializer.php | 316 +++ .../PaymentInstrument.php | 782 ++++++ .../PaymentInstrumentBankAccount.php | 534 ++++ .../PaymentInstrumentNotificationData.php | 418 +++ .../PaymentInstrumentReference.php | 387 +++ .../PaymentNotificationRequest.php | 494 ++++ .../ConfigurationWebhook/PersonalData.php | 452 +++ .../Model/ConfigurationWebhook/Phone.php | 457 ++++ .../ConfigurationWebhook/PhoneNumber.php | 489 ++++ .../PlatformPaymentConfiguration.php | 416 +++ .../RemediatingAction.php | 418 +++ .../Model/ConfigurationWebhook/Resource.php | 452 +++ .../SweepConfigurationNotificationData.php | 452 +++ .../SweepConfigurationNotificationRequest.php | 496 ++++ .../SweepConfigurationV2.php | 863 ++++++ .../SweepCounterparty.php | 452 +++ .../ConfigurationWebhook/SweepSchedule.php | 460 ++++ .../USLocalAccountIdentification.php | 559 ++++ .../VerificationDeadline.php | 577 ++++ .../VerificationError.php | 708 +++++ .../VerificationErrorRecursive.php | 674 +++++ .../Model/DataProtection/ModelInterface.php | 2 +- .../Model/DataProtection/ObjectSerializer.php | 15 +- .../Model/DataProtection/ServiceError.php | 2 +- .../SubjectErasureByPspReferenceRequest.php | 2 +- .../DataProtection/SubjectErasureResponse.php | 2 +- .../AULocalAccountIdentification.php | 2 +- .../AcceptTermsOfServiceRequest.php | 2 +- .../AcceptTermsOfServiceResponse.php | 2 +- .../AdditionalBankIdentification.php | 2 +- .../Model/LegalEntityManagement/Address.php | 2 +- .../Model/LegalEntityManagement/Amount.php | 2 +- .../LegalEntityManagement/Attachment.php | 2 +- .../LegalEntityManagement/BankAccountInfo.php | 8 +- .../BankAccountInfoAccountIdentification.php | 864 ++++++ .../Model/LegalEntityManagement/BirthData.php | 2 +- .../LegalEntityManagement/BusinessLine.php | 6 +- .../BusinessLineInfo.php | 6 +- .../BusinessLineInfoUpdate.php | 6 +- .../LegalEntityManagement/BusinessLines.php | 2 +- .../CALocalAccountIdentification.php | 2 +- .../CZLocalAccountIdentification.php | 2 +- .../CalculateTermsOfServiceStatusResponse.php | 2 +- .../CapabilityProblem.php | 2 +- .../CapabilityProblemEntity.php | 2 +- .../CapabilityProblemEntityRecursive.php | 2 +- .../CapabilitySettings.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- .../DataReviewConfirmationResponse.php | 384 +++ .../Model/LegalEntityManagement/Document.php | 2 +- .../LegalEntityManagement/DocumentPage.php | 2 +- .../DocumentReference.php | 2 +- .../LegalEntityManagement/EntityReference.php | 2 +- .../GeneratePciDescriptionRequest.php | 2 +- .../GeneratePciDescriptionResponse.php | 2 +- .../GetPciQuestionnaireInfosResponse.php | 2 +- .../GetPciQuestionnaireResponse.php | 2 +- ...tTermsOfServiceAcceptanceInfosResponse.php | 2 +- .../GetTermsOfServiceDocumentRequest.php | 2 +- .../GetTermsOfServiceDocumentResponse.php | 2 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../IbanAccountIdentification.php | 2 +- .../IdentificationData.php | 2 +- .../LegalEntityManagement/Individual.php | 2 +- .../LegalEntityManagement/LegalEntity.php | 48 +- .../LegalEntityAssociation.php | 2 +- .../LegalEntityCapability.php | 2 +- .../LegalEntityManagement/LegalEntityInfo.php | 48 +- .../LegalEntityInfoRequiredType.php | 48 +- .../LegalEntityManagement/ModelInterface.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- .../Model/LegalEntityManagement/Name.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../ObjectSerializer.php | 15 +- .../LegalEntityManagement/OnboardingLink.php | 2 +- .../OnboardingLinkInfo.php | 2 +- .../LegalEntityManagement/OnboardingTheme.php | 2 +- .../OnboardingThemes.php | 2 +- .../LegalEntityManagement/Organization.php | 2 +- .../LegalEntityManagement/OwnerEntity.php | 2 +- .../PLLocalAccountIdentification.php | 2 +- .../LegalEntityManagement/PciDocumentInfo.php | 2 +- .../PciSigningRequest.php | 2 +- .../PciSigningResponse.php | 2 +- .../LegalEntityManagement/PhoneNumber.php | 2 +- .../RemediatingAction.php | 2 +- .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- .../LegalEntityManagement/ServiceError.php | 2 +- .../SoleProprietorship.php | 36 +- .../LegalEntityManagement/SourceOfFunds.php | 2 +- .../Model/LegalEntityManagement/StockData.php | 2 +- .../SupportingEntityCapability.php | 2 +- .../LegalEntityManagement/TaxInformation.php | 2 +- .../TaxReportingClassification.php | 2 +- .../TermsOfServiceAcceptanceInfo.php | 2 +- .../TransferInstrument.php | 2 +- .../TransferInstrumentInfo.php | 2 +- .../TransferInstrumentReference.php | 4 +- .../Model/LegalEntityManagement/Trust.php | 36 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 2 +- .../UndefinedBeneficiary.php | 2 +- .../UnincorporatedPartnership.php | 36 +- .../VerificationDeadline.php | 4 +- .../VerificationError.php | 2 +- .../VerificationErrorRecursive.php | 2 +- .../VerificationErrors.php | 2 +- .../Model/LegalEntityManagement/WebData.php | 2 +- .../WebDataExemption.php | 2 +- .../Model/Management/AdditionalCommission.php | 2 +- .../Model/Management/AdditionalSettings.php | 2 +- .../Management/AdditionalSettingsResponse.php | 2 +- src/Adyen/Model/Management/Address.php | 2 +- .../Model/Management/AfterpayTouchInfo.php | 2 +- src/Adyen/Model/Management/AllowedOrigin.php | 2 +- .../Management/AllowedOriginsResponse.php | 2 +- src/Adyen/Model/Management/Amount.php | 2 +- src/Adyen/Model/Management/AndroidApp.php | 2 +- .../Model/Management/AndroidAppsResponse.php | 2 +- .../Model/Management/AndroidCertificate.php | 2 +- .../AndroidCertificatesResponse.php | 2 +- src/Adyen/Model/Management/ApiCredential.php | 2 +- .../Model/Management/ApiCredentialLinks.php | 2 +- src/Adyen/Model/Management/ApplePayInfo.php | 2 +- src/Adyen/Model/Management/BcmcInfo.php | 2 +- .../Management/BillingEntitiesResponse.php | 2 +- src/Adyen/Model/Management/BillingEntity.php | 2 +- .../Model/Management/CardholderReceipt.php | 2 +- .../Model/Management/CartesBancairesInfo.php | 2 +- src/Adyen/Model/Management/ClearpayInfo.php | 2 +- src/Adyen/Model/Management/Commission.php | 2 +- src/Adyen/Model/Management/Company.php | 2 +- .../Model/Management/CompanyApiCredential.php | 2 +- src/Adyen/Model/Management/CompanyLinks.php | 2 +- src/Adyen/Model/Management/CompanyUser.php | 2 +- src/Adyen/Model/Management/Configuration.php | 36 +- src/Adyen/Model/Management/Connectivity.php | 2 +- src/Adyen/Model/Management/Contact.php | 2 +- .../Management/CreateAllowedOriginRequest.php | 2 +- .../CreateApiCredentialResponse.php | 2 +- .../CreateCompanyApiCredentialRequest.php | 2 +- .../CreateCompanyApiCredentialResponse.php | 2 +- .../Management/CreateCompanyUserRequest.php | 2 +- .../Management/CreateCompanyUserResponse.php | 2 +- .../CreateCompanyWebhookRequest.php | 2 +- .../CreateMerchantApiCredentialRequest.php | 2 +- .../Management/CreateMerchantRequest.php | 2 +- .../Management/CreateMerchantResponse.php | 2 +- .../Management/CreateMerchantUserRequest.php | 2 +- .../CreateMerchantWebhookRequest.php | 2 +- .../Model/Management/CreateUserResponse.php | 2 +- src/Adyen/Model/Management/Currency.php | 8 +- .../Model/Management/CustomNotification.php | 2 +- src/Adyen/Model/Management/DataCenter.php | 2 +- src/Adyen/Model/Management/EventUrl.php | 2 +- .../Management/ExternalTerminalAction.php | 2 +- src/Adyen/Model/Management/File.php | 2 +- .../Management/GenerateApiKeyResponse.php | 2 +- .../Management/GenerateClientKeyResponse.php | 2 +- .../Management/GenerateHmacKeyResponse.php | 2 +- .../Model/Management/GenericPmWithTdiInfo.php | 2 +- src/Adyen/Model/Management/GiroPayInfo.php | 2 +- src/Adyen/Model/Management/GooglePayInfo.php | 2 +- src/Adyen/Model/Management/Gratuity.php | 2 +- src/Adyen/Model/Management/Hardware.php | 2 +- src/Adyen/Model/Management/IdName.php | 2 +- .../Management/InstallAndroidAppDetails.php | 2 +- .../InstallAndroidCertificateDetails.php | 2 +- src/Adyen/Model/Management/InvalidField.php | 2 +- src/Adyen/Model/Management/Key.php | 2 +- src/Adyen/Model/Management/KlarnaInfo.php | 2 +- src/Adyen/Model/Management/Links.php | 2 +- src/Adyen/Model/Management/LinksElement.php | 2 +- .../ListCompanyApiCredentialsResponse.php | 2 +- .../Model/Management/ListCompanyResponse.php | 2 +- .../Management/ListCompanyUsersResponse.php | 2 +- .../ListExternalTerminalActionsResponse.php | 2 +- .../ListMerchantApiCredentialsResponse.php | 2 +- .../Model/Management/ListMerchantResponse.php | 2 +- .../Management/ListMerchantUsersResponse.php | 2 +- .../Model/Management/ListStoresResponse.php | 2 +- .../Management/ListTerminalsResponse.php | 2 +- .../Model/Management/ListWebhooksResponse.php | 2 +- src/Adyen/Model/Management/Localization.php | 2 +- src/Adyen/Model/Management/Logo.php | 2 +- .../Model/Management/MeApiCredential.php | 2 +- .../Model/Management/MealVoucherFRInfo.php | 2 +- src/Adyen/Model/Management/Merchant.php | 2 +- src/Adyen/Model/Management/MerchantLinks.php | 2 +- .../Management/MinorUnitsMonetaryValue.php | 2 +- src/Adyen/Model/Management/ModelInterface.php | 2 +- src/Adyen/Model/Management/Name.php | 2 +- src/Adyen/Model/Management/Name2.php | 2 +- src/Adyen/Model/Management/Nexo.php | 2 +- src/Adyen/Model/Management/Notification.php | 2 +- .../Model/Management/NotificationUrl.php | 2 +- .../Model/Management/ObjectSerializer.php | 15 +- .../Model/Management/OfflineProcessing.php | 2 +- src/Adyen/Model/Management/Opi.php | 2 +- src/Adyen/Model/Management/OrderItem.php | 2 +- .../Model/Management/PaginationLinks.php | 2 +- src/Adyen/Model/Management/Passcodes.php | 2 +- src/Adyen/Model/Management/PayAtTable.php | 2 +- src/Adyen/Model/Management/PayPalInfo.php | 2 +- src/Adyen/Model/Management/Payment.php | 2 +- src/Adyen/Model/Management/PaymentMethod.php | 2 +- .../Management/PaymentMethodResponse.php | 2 +- .../Management/PaymentMethodSetupInfo.php | 2 +- src/Adyen/Model/Management/PayoutSettings.php | 2 +- .../Management/PayoutSettingsRequest.php | 2 +- .../Management/PayoutSettingsResponse.php | 2 +- src/Adyen/Model/Management/Profile.php | 2 +- src/Adyen/Model/Management/ReceiptOptions.php | 2 +- .../Model/Management/ReceiptPrinting.php | 2 +- .../Model/Management/ReleaseUpdateDetails.php | 2 +- .../Management/RequestActivationResponse.php | 2 +- .../Model/Management/RestServiceError.php | 2 +- .../ScheduleTerminalActionsRequest.php | 2 +- ...uleTerminalActionsRequestActionDetails.php | 2 +- .../ScheduleTerminalActionsResponse.php | 2 +- src/Adyen/Model/Management/Settings.php | 2 +- .../Model/Management/ShippingLocation.php | 2 +- .../Management/ShippingLocationsResponse.php | 2 +- src/Adyen/Model/Management/Signature.php | 2 +- src/Adyen/Model/Management/SofortInfo.php | 2 +- .../Model/Management/SplitConfiguration.php | 2 +- .../Management/SplitConfigurationList.php | 2 +- .../Management/SplitConfigurationLogic.php | 2 +- .../Management/SplitConfigurationRule.php | 2 +- src/Adyen/Model/Management/Standalone.php | 2 +- src/Adyen/Model/Management/Store.php | 2 +- .../Model/Management/StoreCreationRequest.php | 2 +- .../StoreCreationWithMerchantCodeRequest.php | 2 +- src/Adyen/Model/Management/StoreLocation.php | 2 +- .../Management/StoreSplitConfiguration.php | 6 +- src/Adyen/Model/Management/Surcharge.php | 2 +- src/Adyen/Model/Management/SwishInfo.php | 2 +- src/Adyen/Model/Management/TapToPay.php | 384 +++ src/Adyen/Model/Management/Terminal.php | 2 +- .../TerminalActionScheduleDetail.php | 2 +- .../Model/Management/TerminalAssignment.php | 2 +- .../Model/Management/TerminalConnectivity.php | 2 +- .../TerminalConnectivityBluetooth.php | 2 +- .../TerminalConnectivityCellular.php | 2 +- .../TerminalConnectivityEthernet.php | 2 +- .../Management/TerminalConnectivityWifi.php | 2 +- .../Management/TerminalModelsResponse.php | 2 +- src/Adyen/Model/Management/TerminalOrder.php | 2 +- .../Model/Management/TerminalOrderRequest.php | 2 +- .../Management/TerminalOrdersResponse.php | 2 +- .../Model/Management/TerminalProduct.php | 2 +- .../Model/Management/TerminalProductPrice.php | 8 +- .../Management/TerminalProductsResponse.php | 2 +- .../TerminalReassignmentRequest.php | 2 +- .../Management/TerminalReassignmentTarget.php | 2 +- .../Model/Management/TerminalSettings.php | 36 +- .../Management/TestCompanyWebhookRequest.php | 2 +- src/Adyen/Model/Management/TestOutput.php | 2 +- .../Model/Management/TestWebhookRequest.php | 2 +- .../Model/Management/TestWebhookResponse.php | 2 +- src/Adyen/Model/Management/Timeouts.php | 2 +- .../Management/TransactionDescriptionInfo.php | 2 +- src/Adyen/Model/Management/TwintInfo.php | 2 +- .../Management/UninstallAndroidAppDetails.php | 2 +- .../UninstallAndroidCertificateDetails.php | 2 +- .../Model/Management/UpdatableAddress.php | 2 +- .../UpdateCompanyApiCredentialRequest.php | 2 +- .../Management/UpdateCompanyUserRequest.php | 2 +- .../UpdateCompanyWebhookRequest.php | 2 +- .../UpdateMerchantApiCredentialRequest.php | 2 +- .../Management/UpdateMerchantUserRequest.php | 2 +- .../UpdateMerchantWebhookRequest.php | 2 +- .../Management/UpdatePaymentMethodInfo.php | 2 +- .../UpdatePayoutSettingsRequest.php | 2 +- .../UpdateSplitConfigurationLogicRequest.php | 2 +- .../UpdateSplitConfigurationRequest.php | 2 +- .../UpdateSplitConfigurationRuleRequest.php | 2 +- .../Model/Management/UpdateStoreRequest.php | 36 +- .../Management/UploadAndroidAppResponse.php | 2 +- src/Adyen/Model/Management/Url.php | 2 +- src/Adyen/Model/Management/User.php | 2 +- src/Adyen/Model/Management/VippsInfo.php | 2 +- src/Adyen/Model/Management/Webhook.php | 2 +- src/Adyen/Model/Management/WebhookLinks.php | 2 +- src/Adyen/Model/Management/WifiProfiles.php | 2 +- .../AccountCapabilityData.php | 594 ++++ .../AccountCreateNotificationData.php | 532 ++++ .../AccountNotificationResponse.php | 384 +++ .../AccountUpdateNotificationData.php | 495 ++++ .../ManagementWebhook/CapabilityProblem.php | 418 +++ .../CapabilityProblemEntity.php | 521 ++++ .../CapabilityProblemEntityRecursive.php | 487 ++++ .../MerchantCreatedNotificationRequest.php | 529 ++++ .../MerchantUpdatedNotificationRequest.php | 529 ++++ .../MidServiceNotificationData.php | 744 +++++ .../ManagementWebhook/ModelInterface.php | 92 + .../ManagementWebhook/ObjectSerializer.php | 316 +++ ...aymentMethodCreatedNotificationRequest.php | 529 ++++ .../PaymentMethodNotificationResponse.php | 384 +++ ...ethodRequestRemovedNotificationRequest.php | 529 ++++ ...ScheduledForRemovalNotificationRequest.php | 529 ++++ .../ManagementWebhook/RemediatingAction.php | 418 +++ .../ManagementWebhook/VerificationError.php | 555 ++++ .../VerificationErrorRecursive.php | 521 ++++ .../Model/POSTerminalManagement/Address.php | 2 +- .../AssignTerminalsRequest.php | 2 +- .../AssignTerminalsResponse.php | 2 +- .../FindTerminalRequest.php | 2 +- .../FindTerminalResponse.php | 2 +- .../GetStoresUnderAccountRequest.php | 2 +- .../GetStoresUnderAccountResponse.php | 2 +- .../GetTerminalDetailsRequest.php | 2 +- .../GetTerminalDetailsResponse.php | 2 +- .../GetTerminalsUnderAccountRequest.php | 2 +- .../GetTerminalsUnderAccountResponse.php | 2 +- .../POSTerminalManagement/MerchantAccount.php | 2 +- .../POSTerminalManagement/ModelInterface.php | 2 +- .../ObjectSerializer.php | 15 +- .../POSTerminalManagement/ServiceError.php | 2 +- .../Model/POSTerminalManagement/Store.php | 2 +- src/Adyen/Model/Payment/AccountInfo.php | 1220 +++++++++ src/Adyen/Model/Payment/AcctInfo.php | 1151 ++++++++ .../Model/Payment/AdditionalData3DSecure.php | 593 ++++ .../Model/Payment/AdditionalDataAirline.php | 1305 +++++++++ .../Model/Payment/AdditionalDataCarRental.php | 1132 ++++++++ .../Model/Payment/AdditionalDataCommon.php | 927 +++++++ .../Model/Payment/AdditionalDataLevel23.php | 928 +++++++ .../Model/Payment/AdditionalDataLodging.php | 894 ++++++ .../Payment/AdditionalDataModifications.php | 384 +++ .../Payment/AdditionalDataOpenInvoice.php | 962 +++++++ src/Adyen/Model/Payment/AdditionalDataOpi.php | 384 +++ .../Model/Payment/AdditionalDataRatepay.php | 622 +++++ .../Model/Payment/AdditionalDataRetry.php | 452 +++ .../Model/Payment/AdditionalDataRisk.php | 1064 ++++++++ .../Payment/AdditionalDataRiskStandalone.php | 860 ++++++ .../Payment/AdditionalDataSubMerchant.php | 690 +++++ .../AdditionalDataTemporaryServices.php | 656 +++++ .../Model/Payment/AdditionalDataWallets.php | 554 ++++ src/Adyen/Model/Payment/Address.php | 569 ++++ .../Payment/AdjustAuthorisationRequest.php | 733 +++++ src/Adyen/Model/Payment/Amount.php | 424 +++ src/Adyen/Model/Payment/ApplicationInfo.php | 554 ++++ .../Payment/AuthenticationResultRequest.php | 424 +++ .../Payment/AuthenticationResultResponse.php | 418 +++ src/Adyen/Model/Payment/BankAccount.php | 656 +++++ src/Adyen/Model/Payment/BrowserInfo.php | 672 +++++ .../Model/Payment/CancelOrRefundRequest.php | 662 +++++ src/Adyen/Model/Payment/CancelRequest.php | 696 +++++ src/Adyen/Model/Payment/CaptureRequest.php | 733 +++++ src/Adyen/Model/Payment/Card.php | 622 +++++ src/Adyen/Model/Payment/CommonField.php | 418 +++ .../Model/Payment/DeviceRenderOptions.php | 482 ++++ src/Adyen/Model/Payment/DonationRequest.php | 563 ++++ src/Adyen/Model/Payment/ExternalPlatform.php | 452 +++ src/Adyen/Model/Payment/ForexQuote.php | 762 ++++++ src/Adyen/Model/Payment/FraudCheckResult.php | 457 ++++ .../Model/Payment/FraudCheckResultWrapper.php | 384 +++ src/Adyen/Model/Payment/FraudResult.php | 419 +++ src/Adyen/Model/Payment/FundDestination.php | 656 +++++ src/Adyen/Model/Payment/FundSource.php | 554 ++++ src/Adyen/Model/Payment/Installments.php | 452 +++ src/Adyen/Model/Payment/Mandate.php | 744 +++++ src/Adyen/Model/Payment/MerchantDevice.php | 452 +++ .../Model/Payment/MerchantRiskIndicator.php | 906 ++++++ src/Adyen/Model/Payment/ModelInterface.php | 92 + .../Model/Payment/ModificationResult.php | 503 ++++ src/Adyen/Model/Payment/Name.php | 424 +++ src/Adyen/Model/Payment/ObjectSerializer.php | 316 +++ src/Adyen/Model/Payment/PaymentRequest.php | 2295 ++++++++++++++++ src/Adyen/Model/Payment/PaymentRequest3d.php | 1957 +++++++++++++ .../Model/Payment/PaymentRequest3ds2.php | 1957 +++++++++++++ src/Adyen/Model/Payment/PaymentResult.php | 781 ++++++ src/Adyen/Model/Payment/Phone.php | 418 +++ .../Model/Payment/PlatformChargebackLogic.php | 487 ++++ src/Adyen/Model/Payment/Recurring.php | 592 ++++ src/Adyen/Model/Payment/RefundRequest.php | 733 +++++ .../ResponseAdditionalData3DSecure.php | 520 ++++ .../ResponseAdditionalDataBillingAddress.php | 554 ++++ .../Payment/ResponseAdditionalDataCard.php | 622 +++++ .../Payment/ResponseAdditionalDataCommon.php | 2424 +++++++++++++++++ .../ResponseAdditionalDataDomesticError.php | 418 +++ .../ResponseAdditionalDataInstallments.php | 758 ++++++ .../ResponseAdditionalDataNetworkTokens.php | 452 +++ .../Payment/ResponseAdditionalDataOpi.php | 384 +++ .../Payment/ResponseAdditionalDataSepa.php | 452 +++ src/Adyen/Model/Payment/SDKEphemPubKey.php | 486 ++++ src/Adyen/Model/Payment/ServiceError.php | 552 ++++ .../Payment/ShopperInteractionDevice.php | 452 +++ src/Adyen/Model/Payment/Split.php | 570 ++++ src/Adyen/Model/Payment/SplitAmount.php | 421 +++ src/Adyen/Model/Payment/SubMerchant.php | 520 ++++ .../Model/Payment/TechnicalCancelRequest.php | 696 +++++ src/Adyen/Model/Payment/ThreeDS1Result.php | 554 ++++ .../Model/Payment/ThreeDS2RequestData.php | 1905 +++++++++++++ src/Adyen/Model/Payment/ThreeDS2Result.php | 947 +++++++ .../Model/Payment/ThreeDS2ResultRequest.php | 424 +++ .../Model/Payment/ThreeDS2ResultResponse.php | 384 +++ .../ThreeDSRequestorAuthenticationInfo.php | 493 ++++ ...hreeDSRequestorPriorAuthenticationInfo.php | 523 ++++ src/Adyen/Model/Payment/ThreeDSecureData.php | 883 ++++++ .../Payment/VoidPendingRefundRequest.php | 727 +++++ src/Adyen/Model/Payout/Address.php | 2 +- src/Adyen/Model/Payout/Amount.php | 2 +- src/Adyen/Model/Payout/BankAccount.php | 2 +- src/Adyen/Model/Payout/Card.php | 2 +- src/Adyen/Model/Payout/FraudCheckResult.php | 2 +- .../Model/Payout/FraudCheckResultWrapper.php | 2 +- src/Adyen/Model/Payout/FraudResult.php | 2 +- src/Adyen/Model/Payout/FundSource.php | 2 +- src/Adyen/Model/Payout/ModelInterface.php | 2 +- src/Adyen/Model/Payout/ModifyRequest.php | 2 +- src/Adyen/Model/Payout/ModifyResponse.php | 2 +- src/Adyen/Model/Payout/Name.php | 2 +- src/Adyen/Model/Payout/ObjectSerializer.php | 15 +- src/Adyen/Model/Payout/PayoutRequest.php | 2 +- src/Adyen/Model/Payout/PayoutResponse.php | 2 +- src/Adyen/Model/Payout/Recurring.php | 2 +- .../Payout/ResponseAdditionalData3DSecure.php | 2 +- .../ResponseAdditionalDataBillingAddress.php | 2 +- .../Payout/ResponseAdditionalDataCard.php | 2 +- .../Payout/ResponseAdditionalDataCommon.php | 2 +- .../ResponseAdditionalDataDomesticError.php | 2 +- .../ResponseAdditionalDataInstallments.php | 2 +- .../ResponseAdditionalDataNetworkTokens.php | 2 +- .../Payout/ResponseAdditionalDataOpi.php | 2 +- .../Payout/ResponseAdditionalDataSepa.php | 2 +- src/Adyen/Model/Payout/ServiceError.php | 2 +- .../Payout/StoreDetailAndSubmitRequest.php | 2 +- .../Payout/StoreDetailAndSubmitResponse.php | 2 +- src/Adyen/Model/Payout/StoreDetailRequest.php | 2 +- .../Model/Payout/StoreDetailResponse.php | 2 +- src/Adyen/Model/Payout/SubmitRequest.php | 2 +- src/Adyen/Model/Payout/SubmitResponse.php | 2 +- src/Adyen/Model/Recurring/Address.php | 2 +- src/Adyen/Model/Recurring/Amount.php | 2 +- src/Adyen/Model/Recurring/BankAccount.php | 2 +- src/Adyen/Model/Recurring/Card.php | 2 +- .../Model/Recurring/CreatePermitRequest.php | 2 +- .../Model/Recurring/CreatePermitResult.php | 2 +- .../Model/Recurring/DisablePermitRequest.php | 2 +- .../Model/Recurring/DisablePermitResult.php | 2 +- src/Adyen/Model/Recurring/DisableRequest.php | 2 +- src/Adyen/Model/Recurring/DisableResult.php | 2 +- src/Adyen/Model/Recurring/ModelInterface.php | 2 +- src/Adyen/Model/Recurring/Name.php | 2 +- .../Model/Recurring/NotifyShopperRequest.php | 2 +- .../Model/Recurring/NotifyShopperResult.php | 2 +- .../Model/Recurring/ObjectSerializer.php | 15 +- src/Adyen/Model/Recurring/Permit.php | 2 +- .../Model/Recurring/PermitRestriction.php | 2 +- src/Adyen/Model/Recurring/PermitResult.php | 2 +- src/Adyen/Model/Recurring/Recurring.php | 2 +- src/Adyen/Model/Recurring/RecurringDetail.php | 2 +- .../Recurring/RecurringDetailWrapper.php | 2 +- .../Recurring/RecurringDetailsRequest.php | 2 +- .../Recurring/RecurringDetailsResult.php | 2 +- .../ScheduleAccountUpdaterRequest.php | 2 +- .../ScheduleAccountUpdaterResult.php | 2 +- src/Adyen/Model/Recurring/ServiceError.php | 2 +- src/Adyen/Model/Recurring/TokenDetails.php | 2 +- .../BalancePlatformNotificationResponse.php | 384 +++ .../Model/ReportWebhook/ModelInterface.php | 92 + .../Model/ReportWebhook/ObjectSerializer.php | 316 +++ .../ReportWebhook/ReportNotificationData.php | 597 ++++ .../ReportNotificationRequest.php | 492 ++++ src/Adyen/Model/ReportWebhook/Resource.php | 452 +++ .../Model/ReportWebhook/ResourceReference.php | 452 +++ src/Adyen/Model/StoredValue/Amount.php | 2 +- .../Model/StoredValue/ModelInterface.php | 2 +- .../Model/StoredValue/ObjectSerializer.php | 15 +- src/Adyen/Model/StoredValue/ServiceError.php | 2 +- .../StoredValueBalanceCheckRequest.php | 2 +- .../StoredValueBalanceCheckResponse.php | 2 +- .../StoredValueBalanceMergeRequest.php | 2 +- .../StoredValueBalanceMergeResponse.php | 2 +- .../StoredValue/StoredValueIssueRequest.php | 2 +- .../StoredValue/StoredValueIssueResponse.php | 2 +- .../StoredValue/StoredValueLoadRequest.php | 2 +- .../StoredValue/StoredValueLoadResponse.php | 2 +- .../StoredValueStatusChangeRequest.php | 2 +- .../StoredValueStatusChangeResponse.php | 2 +- .../StoredValue/StoredValueVoidRequest.php | 2 +- .../StoredValue/StoredValueVoidResponse.php | 2 +- src/Adyen/Model/TransactionWebhook/Amount.php | 424 +++ .../BalancePlatformNotificationResponse.php | 384 +++ .../TransactionWebhook/ModelInterface.php | 92 + .../TransactionWebhook/ObjectSerializer.php | 316 +++ .../Model/TransactionWebhook/Resource.php | 452 +++ .../TransactionWebhook/ResourceReference.php | 452 +++ .../Model/TransactionWebhook/Transaction.php | 747 +++++ .../TransactionNotificationRequestV4.php | 489 ++++ .../Model/TransactionWebhook/TransferData.php | 421 +++ .../AULocalAccountIdentification.php | 492 ++++ .../AdditionalBankIdentification.php | 451 +++ src/Adyen/Model/TransferWebhook/Address.php | 557 ++++ src/Adyen/Model/TransferWebhook/Amount.php | 424 +++ .../TransferWebhook/AmountAdjustment.php | 487 ++++ .../BRLocalAccountIdentification.php | 529 ++++ .../Model/TransferWebhook/BalanceMutation.php | 486 ++++ .../BalancePlatformNotificationResponse.php | 384 +++ .../Model/TransferWebhook/BankAccountV3.php | 424 +++ .../BankAccountV3AccountIdentification.php | 901 ++++++ .../TransferWebhook/BankCategoryData.php | 490 ++++ .../CALocalAccountIdentification.php | 596 ++++ .../CZLocalAccountIdentification.php | 492 ++++ .../Model/TransferWebhook/CounterpartyV3.php | 486 ++++ .../DKLocalAccountIdentification.php | 492 ++++ .../HKLocalAccountIdentification.php | 492 ++++ .../HULocalAccountIdentification.php | 455 ++++ .../IbanAccountIdentification.php | 455 ++++ .../TransferWebhook/InternalCategoryData.php | 483 ++++ .../Model/TransferWebhook/IssuedCard.php | 639 +++++ .../Model/TransferWebhook/MerchantData.php | 520 ++++ .../Model/TransferWebhook/ModelInterface.php | 92 + .../Model/TransferWebhook/Modification.php | 677 +++++ .../NOLocalAccountIdentification.php | 455 ++++ .../NZLocalAccountIdentification.php | 455 ++++ .../Model/TransferWebhook/NameLocation.php | 554 ++++ .../NumberAndBicAccountIdentification.php | 526 ++++ .../TransferWebhook/ObjectSerializer.php | 316 +++ .../PLLocalAccountIdentification.php | 455 ++++ .../TransferWebhook/PartyIdentification.php | 626 +++++ .../TransferWebhook/PaymentInstrument.php | 486 ++++ .../Model/TransferWebhook/PlatformPayment.php | 640 +++++ .../RelayedAuthorisationData.php | 418 +++ src/Adyen/Model/TransferWebhook/Resource.php | 452 +++ .../TransferWebhook/ResourceReference.php | 452 +++ .../SELocalAccountIdentification.php | 492 ++++ .../SGLocalAccountIdentification.php | 489 ++++ .../TransactionEventViolation.php | 452 +++ .../TransactionRuleReference.php | 518 ++++ .../TransferWebhook/TransactionRuleSource.php | 418 +++ .../TransactionRulesResult.php | 484 ++++ .../Model/TransferWebhook/TransferData.php | 1490 ++++++++++ .../TransferDataCategoryData.php | 729 +++++ .../Model/TransferWebhook/TransferEvent.php | 1145 ++++++++ .../TransferNotificationRequest.php | 491 ++++ .../TransferNotificationTransferTracking.php | 449 +++ .../TransferNotificationValidationFact.php | 418 +++ .../UKLocalAccountIdentification.php | 492 ++++ .../USLocalAccountIdentification.php | 559 ++++ .../AULocalAccountIdentification.php | 2 +- .../AdditionalBankIdentification.php | 2 +- src/Adyen/Model/Transfers/Address.php | 2 +- src/Adyen/Model/Transfers/Amount.php | 2 +- .../BRLocalAccountIdentification.php | 2 +- src/Adyen/Model/Transfers/BankAccountV3.php | 2 +- .../BankAccountV3AccountIdentification.php | 2 +- .../Model/Transfers/BankCategoryData.php | 2 +- .../CALocalAccountIdentification.php | 2 +- .../CZLocalAccountIdentification.php | 2 +- src/Adyen/Model/Transfers/CapitalBalance.php | 2 +- src/Adyen/Model/Transfers/CapitalGrant.php | 2 +- .../Model/Transfers/CapitalGrantInfo.php | 2 +- src/Adyen/Model/Transfers/CapitalGrants.php | 2 +- src/Adyen/Model/Transfers/Counterparty.php | 2 +- .../Model/Transfers/CounterpartyInfoV3.php | 2 +- src/Adyen/Model/Transfers/CounterpartyV3.php | 2 +- .../DKLocalAccountIdentification.php | 2 +- src/Adyen/Model/Transfers/Fee.php | 2 +- .../HKLocalAccountIdentification.php | 2 +- .../HULocalAccountIdentification.php | 2 +- .../Transfers/IbanAccountIdentification.php | 2 +- .../Model/Transfers/InternalCategoryData.php | 2 +- src/Adyen/Model/Transfers/InvalidField.php | 2 +- src/Adyen/Model/Transfers/IssuedCard.php | 2 +- src/Adyen/Model/Transfers/Link.php | 2 +- src/Adyen/Model/Transfers/Links.php | 2 +- src/Adyen/Model/Transfers/MerchantData.php | 2 +- src/Adyen/Model/Transfers/ModelInterface.php | 2 +- .../NOLocalAccountIdentification.php | 2 +- .../NZLocalAccountIdentification.php | 2 +- src/Adyen/Model/Transfers/NameLocation.php | 2 +- .../NumberAndBicAccountIdentification.php | 2 +- .../Model/Transfers/ObjectSerializer.php | 15 +- .../PLLocalAccountIdentification.php | 2 +- .../Model/Transfers/PartyIdentification.php | 2 +- .../Model/Transfers/PaymentInstrument.php | 2 +- src/Adyen/Model/Transfers/PlatformPayment.php | 2 +- .../Transfers/RelayedAuthorisationData.php | 2 +- src/Adyen/Model/Transfers/Repayment.php | 2 +- src/Adyen/Model/Transfers/RepaymentTerm.php | 2 +- .../Model/Transfers/ResourceReference.php | 2 +- .../Model/Transfers/RestServiceError.php | 2 +- .../Model/Transfers/ReturnTransferRequest.php | 2 +- .../Transfers/ReturnTransferResponse.php | 2 +- .../SELocalAccountIdentification.php | 2 +- .../SGLocalAccountIdentification.php | 2 +- src/Adyen/Model/Transfers/ServiceError.php | 2 +- .../Model/Transfers/ThresholdRepayment.php | 2 +- src/Adyen/Model/Transfers/Transaction.php | 2 +- .../Transfers/TransactionSearchResponse.php | 2 +- src/Adyen/Model/Transfers/Transfer.php | 2 +- .../Model/Transfers/TransferCategoryData.php | 2 +- src/Adyen/Model/Transfers/TransferData.php | 2 +- src/Adyen/Model/Transfers/TransferInfo.php | 2 +- .../TransferNotificationValidationFact.php | 2 +- .../UKLocalAccountIdentification.php | 2 +- .../USLocalAccountIdentification.php | 2 +- .../Transfers/UltimatePartyIdentification.php | 2 +- .../Service/BalanceControl/GeneralApi.php | 56 + .../BalancePlatform/AccountHoldersApi.php | 32 +- .../BalancePlatform/BalanceAccountsApi.php | 109 +- .../BankAccountValidationApi.php | 5 +- .../BalancePlatform/GrantAccountsApi.php | 2 +- .../BalancePlatform/GrantOffersApi.php | 2 +- .../BalancePlatform/NetworkTokensApi.php | 5 +- .../PaymentInstrumentGroupsApi.php | 22 +- .../BalancePlatform/PaymentInstrumentsApi.php | 60 +- .../Service/BalancePlatform/PlatformApi.php | 26 +- .../BalancePlatform/TransactionRulesApi.php | 32 +- .../BalancePlatform/TransferRoutesApi.php | 2 +- src/Adyen/Service/BinLookup/GeneralApi.php | 71 + .../Checkout/ClassicCheckoutSDKApi.php | 2 +- .../Service/Checkout/ModificationsApi.php | 34 +- src/Adyen/Service/Checkout/OrdersApi.php | 32 +- .../Service/Checkout/PaymentLinksApi.php | 24 +- src/Adyen/Service/Checkout/PaymentsApi.php | 32 +- src/Adyen/Service/Checkout/RecurringApi.php | 5 +- src/Adyen/Service/Checkout/UtilityApi.php | 2 +- .../Service/DataProtection/GeneralApi.php | 56 + .../BusinessLinesApi.php | 35 +- .../LegalEntityManagement/DocumentsApi.php | 5 +- .../HostedOnboardingApi.php | 30 +- .../LegalEntitiesApi.php | 73 +- .../PCIQuestionnairesApi.php | 28 +- .../TermsOfServiceApi.php | 56 +- .../TransferInstrumentsApi.php | 35 +- .../APICredentialsCompanyLevelApi.php | 46 +- .../APICredentialsMerchantLevelApi.php | 46 +- .../Management/APIKeyCompanyLevelApi.php | 2 +- .../Management/APIKeyMerchantLevelApi.php | 2 +- .../Management/AccountCompanyLevelApi.php | 28 +- .../Management/AccountMerchantLevelApi.php | 28 +- .../Management/AccountStoreLevelApi.php | 90 +- .../AllowedOriginsCompanyLevelApi.php | 35 +- .../AllowedOriginsMerchantLevelApi.php | 35 +- .../AndroidFilesCompanyLevelApi.php | 31 +- .../Management/ClientKeyCompanyLevelApi.php | 2 +- .../Management/ClientKeyMerchantLevelApi.php | 2 +- .../Service/Management/MyAPICredentialApi.php | 75 +- .../PaymentMethodsMerchantLevelApi.php | 51 +- .../PayoutSettingsMerchantLevelApi.php | 53 +- .../SplitConfigurationMerchantLevelApi.php | 98 +- .../TerminalActionsCompanyLevelApi.php | 28 +- .../TerminalActionsTerminalLevelApi.php | 2 +- .../TerminalOrdersCompanyLevelApi.php | 136 +- .../TerminalOrdersMerchantLevelApi.php | 136 +- .../TerminalSettingsCompanyLevelApi.php | 2 +- .../TerminalSettingsMerchantLevelApi.php | 2 +- .../TerminalSettingsStoreLevelApi.php | 64 +- .../TerminalSettingsTerminalLevelApi.php | 2 +- .../Management/TerminalsTerminalLevelApi.php | 5 +- .../Management/UsersCompanyLevelApi.php | 46 +- .../Management/UsersMerchantLevelApi.php | 46 +- .../Management/WebhooksCompanyLevelApi.php | 77 +- .../Management/WebhooksMerchantLevelApi.php | 77 +- .../POSTerminalManagement/GeneralApi.php | 116 + .../Service/Payment/ModificationsApi.php | 161 ++ src/Adyen/Service/Payment/PaymentsApi.php | 116 + .../Service/Payout/InitializationApi.php | 2 +- .../Service/Payout/InstantPayoutsApi.php | 2 +- src/Adyen/Service/Payout/ReviewingApi.php | 2 +- src/Adyen/Service/Recurring/GeneralApi.php | 131 + src/Adyen/Service/StoredValue/GeneralApi.php | 131 + src/Adyen/Service/Transfers/CapitalApi.php | 2 +- .../Service/Transfers/TransactionsApi.php | 2 +- src/Adyen/Service/Transfers/TransfersApi.php | 32 +- 1046 files changed, 135460 insertions(+), 1876 deletions(-) create mode 100644 src/Adyen/Model/ACSWebhook/Amount.php create mode 100644 src/Adyen/Model/ACSWebhook/AuthenticationInfo.php create mode 100644 src/Adyen/Model/ACSWebhook/AuthenticationNotificationData.php create mode 100644 src/Adyen/Model/ACSWebhook/AuthenticationNotificationRequest.php create mode 100644 src/Adyen/Model/ACSWebhook/BalancePlatformNotificationResponse.php create mode 100644 src/Adyen/Model/ACSWebhook/ChallengeInfo.php create mode 100644 src/Adyen/Model/ACSWebhook/ModelInterface.php create mode 100644 src/Adyen/Model/ACSWebhook/ObjectSerializer.php create mode 100644 src/Adyen/Model/ACSWebhook/PurchaseInfo.php create mode 100644 src/Adyen/Model/ACSWebhook/Resource.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/AccountHolder.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/AccountHolderCapability.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/AccountHolderNotificationData.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/AccountHolderNotificationRequest.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/AccountSupportingEntityCapability.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Address.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Amount.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Authentication.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Balance.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/BalanceAccount.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/BalanceAccountNotificationData.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/BalanceAccountNotificationRequest.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/BalancePlatformNotificationResponse.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/BulkAddress.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CapabilityProblem.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CapabilityProblemEntity.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CapabilityProblemEntityRecursive.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CapabilitySettings.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Card.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CardConfiguration.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CardOrderItem.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CardOrderItemDeliveryStatus.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/CardOrderNotificationRequest.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Contact.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/ContactDetails.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Expiry.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/IbanAccountIdentification.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/ModelInterface.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Name.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/ObjectSerializer.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PaymentInstrument.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentBankAccount.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentNotificationData.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentReference.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PaymentNotificationRequest.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PersonalData.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Phone.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PhoneNumber.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/PlatformPaymentConfiguration.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/RemediatingAction.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/Resource.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/SweepConfigurationNotificationData.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/SweepConfigurationNotificationRequest.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/SweepConfigurationV2.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/SweepCounterparty.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/SweepSchedule.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/USLocalAccountIdentification.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/VerificationDeadline.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/VerificationError.php create mode 100644 src/Adyen/Model/ConfigurationWebhook/VerificationErrorRecursive.php create mode 100644 src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php create mode 100644 src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php create mode 100644 src/Adyen/Model/Management/TapToPay.php create mode 100644 src/Adyen/Model/ManagementWebhook/AccountCapabilityData.php create mode 100644 src/Adyen/Model/ManagementWebhook/AccountCreateNotificationData.php create mode 100644 src/Adyen/Model/ManagementWebhook/AccountNotificationResponse.php create mode 100644 src/Adyen/Model/ManagementWebhook/AccountUpdateNotificationData.php create mode 100644 src/Adyen/Model/ManagementWebhook/CapabilityProblem.php create mode 100644 src/Adyen/Model/ManagementWebhook/CapabilityProblemEntity.php create mode 100644 src/Adyen/Model/ManagementWebhook/CapabilityProblemEntityRecursive.php create mode 100644 src/Adyen/Model/ManagementWebhook/MerchantCreatedNotificationRequest.php create mode 100644 src/Adyen/Model/ManagementWebhook/MerchantUpdatedNotificationRequest.php create mode 100644 src/Adyen/Model/ManagementWebhook/MidServiceNotificationData.php create mode 100644 src/Adyen/Model/ManagementWebhook/ModelInterface.php create mode 100644 src/Adyen/Model/ManagementWebhook/ObjectSerializer.php create mode 100644 src/Adyen/Model/ManagementWebhook/PaymentMethodCreatedNotificationRequest.php create mode 100644 src/Adyen/Model/ManagementWebhook/PaymentMethodNotificationResponse.php create mode 100644 src/Adyen/Model/ManagementWebhook/PaymentMethodRequestRemovedNotificationRequest.php create mode 100644 src/Adyen/Model/ManagementWebhook/PaymentMethodScheduledForRemovalNotificationRequest.php create mode 100644 src/Adyen/Model/ManagementWebhook/RemediatingAction.php create mode 100644 src/Adyen/Model/ManagementWebhook/VerificationError.php create mode 100644 src/Adyen/Model/ManagementWebhook/VerificationErrorRecursive.php create mode 100644 src/Adyen/Model/Payment/AccountInfo.php create mode 100644 src/Adyen/Model/Payment/AcctInfo.php create mode 100644 src/Adyen/Model/Payment/AdditionalData3DSecure.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataAirline.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataCarRental.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataCommon.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataLevel23.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataLodging.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataModifications.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataOpenInvoice.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataOpi.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataRatepay.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataRetry.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataRisk.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataRiskStandalone.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataSubMerchant.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataTemporaryServices.php create mode 100644 src/Adyen/Model/Payment/AdditionalDataWallets.php create mode 100644 src/Adyen/Model/Payment/Address.php create mode 100644 src/Adyen/Model/Payment/AdjustAuthorisationRequest.php create mode 100644 src/Adyen/Model/Payment/Amount.php create mode 100644 src/Adyen/Model/Payment/ApplicationInfo.php create mode 100644 src/Adyen/Model/Payment/AuthenticationResultRequest.php create mode 100644 src/Adyen/Model/Payment/AuthenticationResultResponse.php create mode 100644 src/Adyen/Model/Payment/BankAccount.php create mode 100644 src/Adyen/Model/Payment/BrowserInfo.php create mode 100644 src/Adyen/Model/Payment/CancelOrRefundRequest.php create mode 100644 src/Adyen/Model/Payment/CancelRequest.php create mode 100644 src/Adyen/Model/Payment/CaptureRequest.php create mode 100644 src/Adyen/Model/Payment/Card.php create mode 100644 src/Adyen/Model/Payment/CommonField.php create mode 100644 src/Adyen/Model/Payment/DeviceRenderOptions.php create mode 100644 src/Adyen/Model/Payment/DonationRequest.php create mode 100644 src/Adyen/Model/Payment/ExternalPlatform.php create mode 100644 src/Adyen/Model/Payment/ForexQuote.php create mode 100644 src/Adyen/Model/Payment/FraudCheckResult.php create mode 100644 src/Adyen/Model/Payment/FraudCheckResultWrapper.php create mode 100644 src/Adyen/Model/Payment/FraudResult.php create mode 100644 src/Adyen/Model/Payment/FundDestination.php create mode 100644 src/Adyen/Model/Payment/FundSource.php create mode 100644 src/Adyen/Model/Payment/Installments.php create mode 100644 src/Adyen/Model/Payment/Mandate.php create mode 100644 src/Adyen/Model/Payment/MerchantDevice.php create mode 100644 src/Adyen/Model/Payment/MerchantRiskIndicator.php create mode 100644 src/Adyen/Model/Payment/ModelInterface.php create mode 100644 src/Adyen/Model/Payment/ModificationResult.php create mode 100644 src/Adyen/Model/Payment/Name.php create mode 100644 src/Adyen/Model/Payment/ObjectSerializer.php create mode 100644 src/Adyen/Model/Payment/PaymentRequest.php create mode 100644 src/Adyen/Model/Payment/PaymentRequest3d.php create mode 100644 src/Adyen/Model/Payment/PaymentRequest3ds2.php create mode 100644 src/Adyen/Model/Payment/PaymentResult.php create mode 100644 src/Adyen/Model/Payment/Phone.php create mode 100644 src/Adyen/Model/Payment/PlatformChargebackLogic.php create mode 100644 src/Adyen/Model/Payment/Recurring.php create mode 100644 src/Adyen/Model/Payment/RefundRequest.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalData3DSecure.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataCard.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataCommon.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataInstallments.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataOpi.php create mode 100644 src/Adyen/Model/Payment/ResponseAdditionalDataSepa.php create mode 100644 src/Adyen/Model/Payment/SDKEphemPubKey.php create mode 100644 src/Adyen/Model/Payment/ServiceError.php create mode 100644 src/Adyen/Model/Payment/ShopperInteractionDevice.php create mode 100644 src/Adyen/Model/Payment/Split.php create mode 100644 src/Adyen/Model/Payment/SplitAmount.php create mode 100644 src/Adyen/Model/Payment/SubMerchant.php create mode 100644 src/Adyen/Model/Payment/TechnicalCancelRequest.php create mode 100644 src/Adyen/Model/Payment/ThreeDS1Result.php create mode 100644 src/Adyen/Model/Payment/ThreeDS2RequestData.php create mode 100644 src/Adyen/Model/Payment/ThreeDS2Result.php create mode 100644 src/Adyen/Model/Payment/ThreeDS2ResultRequest.php create mode 100644 src/Adyen/Model/Payment/ThreeDS2ResultResponse.php create mode 100644 src/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.php create mode 100644 src/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.php create mode 100644 src/Adyen/Model/Payment/ThreeDSecureData.php create mode 100644 src/Adyen/Model/Payment/VoidPendingRefundRequest.php create mode 100644 src/Adyen/Model/ReportWebhook/BalancePlatformNotificationResponse.php create mode 100644 src/Adyen/Model/ReportWebhook/ModelInterface.php create mode 100644 src/Adyen/Model/ReportWebhook/ObjectSerializer.php create mode 100644 src/Adyen/Model/ReportWebhook/ReportNotificationData.php create mode 100644 src/Adyen/Model/ReportWebhook/ReportNotificationRequest.php create mode 100644 src/Adyen/Model/ReportWebhook/Resource.php create mode 100644 src/Adyen/Model/ReportWebhook/ResourceReference.php create mode 100644 src/Adyen/Model/TransactionWebhook/Amount.php create mode 100644 src/Adyen/Model/TransactionWebhook/BalancePlatformNotificationResponse.php create mode 100644 src/Adyen/Model/TransactionWebhook/ModelInterface.php create mode 100644 src/Adyen/Model/TransactionWebhook/ObjectSerializer.php create mode 100644 src/Adyen/Model/TransactionWebhook/Resource.php create mode 100644 src/Adyen/Model/TransactionWebhook/ResourceReference.php create mode 100644 src/Adyen/Model/TransactionWebhook/Transaction.php create mode 100644 src/Adyen/Model/TransactionWebhook/TransactionNotificationRequestV4.php create mode 100644 src/Adyen/Model/TransactionWebhook/TransferData.php create mode 100644 src/Adyen/Model/TransferWebhook/AULocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/AdditionalBankIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/Address.php create mode 100644 src/Adyen/Model/TransferWebhook/Amount.php create mode 100644 src/Adyen/Model/TransferWebhook/AmountAdjustment.php create mode 100644 src/Adyen/Model/TransferWebhook/BRLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/BalanceMutation.php create mode 100644 src/Adyen/Model/TransferWebhook/BalancePlatformNotificationResponse.php create mode 100644 src/Adyen/Model/TransferWebhook/BankAccountV3.php create mode 100644 src/Adyen/Model/TransferWebhook/BankAccountV3AccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/BankCategoryData.php create mode 100644 src/Adyen/Model/TransferWebhook/CALocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/CZLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/CounterpartyV3.php create mode 100644 src/Adyen/Model/TransferWebhook/DKLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/HKLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/HULocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/IbanAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/InternalCategoryData.php create mode 100644 src/Adyen/Model/TransferWebhook/IssuedCard.php create mode 100644 src/Adyen/Model/TransferWebhook/MerchantData.php create mode 100644 src/Adyen/Model/TransferWebhook/ModelInterface.php create mode 100644 src/Adyen/Model/TransferWebhook/Modification.php create mode 100644 src/Adyen/Model/TransferWebhook/NOLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/NZLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/NameLocation.php create mode 100644 src/Adyen/Model/TransferWebhook/NumberAndBicAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/ObjectSerializer.php create mode 100644 src/Adyen/Model/TransferWebhook/PLLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/PartyIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/PaymentInstrument.php create mode 100644 src/Adyen/Model/TransferWebhook/PlatformPayment.php create mode 100644 src/Adyen/Model/TransferWebhook/RelayedAuthorisationData.php create mode 100644 src/Adyen/Model/TransferWebhook/Resource.php create mode 100644 src/Adyen/Model/TransferWebhook/ResourceReference.php create mode 100644 src/Adyen/Model/TransferWebhook/SELocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/SGLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/TransactionEventViolation.php create mode 100644 src/Adyen/Model/TransferWebhook/TransactionRuleReference.php create mode 100644 src/Adyen/Model/TransferWebhook/TransactionRuleSource.php create mode 100644 src/Adyen/Model/TransferWebhook/TransactionRulesResult.php create mode 100644 src/Adyen/Model/TransferWebhook/TransferData.php create mode 100644 src/Adyen/Model/TransferWebhook/TransferDataCategoryData.php create mode 100644 src/Adyen/Model/TransferWebhook/TransferEvent.php create mode 100644 src/Adyen/Model/TransferWebhook/TransferNotificationRequest.php create mode 100644 src/Adyen/Model/TransferWebhook/TransferNotificationTransferTracking.php create mode 100644 src/Adyen/Model/TransferWebhook/TransferNotificationValidationFact.php create mode 100644 src/Adyen/Model/TransferWebhook/UKLocalAccountIdentification.php create mode 100644 src/Adyen/Model/TransferWebhook/USLocalAccountIdentification.php create mode 100644 src/Adyen/Service/BalanceControl/GeneralApi.php create mode 100644 src/Adyen/Service/BinLookup/GeneralApi.php create mode 100644 src/Adyen/Service/DataProtection/GeneralApi.php create mode 100644 src/Adyen/Service/POSTerminalManagement/GeneralApi.php create mode 100644 src/Adyen/Service/Payment/ModificationsApi.php create mode 100644 src/Adyen/Service/Payment/PaymentsApi.php create mode 100644 src/Adyen/Service/Recurring/GeneralApi.php create mode 100644 src/Adyen/Service/StoredValue/GeneralApi.php diff --git a/src/Adyen/Model/ACSWebhook/Amount.php b/src/Adyen/Model/ACSWebhook/Amount.php new file mode 100644 index 000000000..a24cac62f --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/Amount.php @@ -0,0 +1,424 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('value', $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['value'] === null) { + $invalidProperties[] = "'value' 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 value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/ACSWebhook/AuthenticationInfo.php b/src/Adyen/Model/ACSWebhook/AuthenticationInfo.php new file mode 100644 index 000000000..0dc4c6e60 --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/AuthenticationInfo.php @@ -0,0 +1,1222 @@ + + */ +class AuthenticationInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthenticationInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acsTransId' => 'string', + 'challenge' => '\Adyen\Model\ACSWebhook\ChallengeInfo', + 'challengeIndicator' => 'string', + 'createdAt' => '\DateTime', + 'deviceChannel' => 'string', + 'dsTransID' => 'string', + 'exemptionIndicator' => 'string', + 'inPSD2Scope' => 'bool', + 'messageCategory' => 'string', + 'messageVersion' => 'string', + 'riskScore' => 'int', + 'threeDSServerTransID' => 'string', + 'transStatus' => 'string', + 'transStatusReason' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acsTransId' => null, + 'challenge' => null, + 'challengeIndicator' => null, + 'createdAt' => 'date-time', + 'deviceChannel' => null, + 'dsTransID' => null, + 'exemptionIndicator' => null, + 'inPSD2Scope' => null, + 'messageCategory' => null, + 'messageVersion' => null, + 'riskScore' => 'int32', + 'threeDSServerTransID' => null, + 'transStatus' => null, + 'transStatusReason' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acsTransId' => false, + 'challenge' => false, + 'challengeIndicator' => false, + 'createdAt' => false, + 'deviceChannel' => false, + 'dsTransID' => false, + 'exemptionIndicator' => false, + 'inPSD2Scope' => false, + 'messageCategory' => false, + 'messageVersion' => false, + 'riskScore' => true, + 'threeDSServerTransID' => false, + 'transStatus' => false, + 'transStatusReason' => 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 = [ + 'acsTransId' => 'acsTransId', + 'challenge' => 'challenge', + 'challengeIndicator' => 'challengeIndicator', + 'createdAt' => 'createdAt', + 'deviceChannel' => 'deviceChannel', + 'dsTransID' => 'dsTransID', + 'exemptionIndicator' => 'exemptionIndicator', + 'inPSD2Scope' => 'inPSD2Scope', + 'messageCategory' => 'messageCategory', + 'messageVersion' => 'messageVersion', + 'riskScore' => 'riskScore', + 'threeDSServerTransID' => 'threeDSServerTransID', + 'transStatus' => 'transStatus', + 'transStatusReason' => 'transStatusReason', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acsTransId' => 'setAcsTransId', + 'challenge' => 'setChallenge', + 'challengeIndicator' => 'setChallengeIndicator', + 'createdAt' => 'setCreatedAt', + 'deviceChannel' => 'setDeviceChannel', + 'dsTransID' => 'setDsTransID', + 'exemptionIndicator' => 'setExemptionIndicator', + 'inPSD2Scope' => 'setInPSD2Scope', + 'messageCategory' => 'setMessageCategory', + 'messageVersion' => 'setMessageVersion', + 'riskScore' => 'setRiskScore', + 'threeDSServerTransID' => 'setThreeDSServerTransID', + 'transStatus' => 'setTransStatus', + 'transStatusReason' => 'setTransStatusReason', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acsTransId' => 'getAcsTransId', + 'challenge' => 'getChallenge', + 'challengeIndicator' => 'getChallengeIndicator', + 'createdAt' => 'getCreatedAt', + 'deviceChannel' => 'getDeviceChannel', + 'dsTransID' => 'getDsTransID', + 'exemptionIndicator' => 'getExemptionIndicator', + 'inPSD2Scope' => 'getInPSD2Scope', + 'messageCategory' => 'getMessageCategory', + 'messageVersion' => 'getMessageVersion', + 'riskScore' => 'getRiskScore', + 'threeDSServerTransID' => 'getThreeDSServerTransID', + 'transStatus' => 'getTransStatus', + 'transStatusReason' => 'getTransStatusReason', + '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 CHALLENGE_INDICATOR__01 = '01'; + public const CHALLENGE_INDICATOR__02 = '02'; + public const CHALLENGE_INDICATOR__03 = '03'; + public const CHALLENGE_INDICATOR__04 = '04'; + public const CHALLENGE_INDICATOR__05 = '05'; + public const CHALLENGE_INDICATOR__07 = '07'; + public const CHALLENGE_INDICATOR__08 = '08'; + public const CHALLENGE_INDICATOR__09 = '09'; + public const CHALLENGE_INDICATOR__80 = '80'; + public const CHALLENGE_INDICATOR__82 = '82'; + public const DEVICE_CHANNEL_APP = 'app'; + public const DEVICE_CHANNEL_BROWSER = 'browser'; + public const DEVICE_CHANNEL_THREE_DS_REQUESTOR_INITIATED = 'ThreeDSRequestorInitiated'; + 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 EXEMPTION_INDICATOR_ACQUIRER_EXEMPTION = 'acquirerExemption'; + public const EXEMPTION_INDICATOR_NO_EXEMPTION_APPLIED = 'noExemptionApplied'; + public const EXEMPTION_INDICATOR_VISA_DAF_EXEMPTION = 'visaDAFExemption'; + public const MESSAGE_CATEGORY_PAYMENT = 'payment'; + public const MESSAGE_CATEGORY_NON_PAYMENT = 'nonPayment'; + public const TRANS_STATUS_Y = 'Y'; + public const TRANS_STATUS_N = 'N'; + public const TRANS_STATUS_R = 'R'; + public const TRANS_STATUS_I = 'I'; + public const TRANS_STATUS_U = 'U'; + public const TRANS_STATUS_REASON__01 = '01'; + public const TRANS_STATUS_REASON__02 = '02'; + public const TRANS_STATUS_REASON__03 = '03'; + public const TRANS_STATUS_REASON__04 = '04'; + public const TRANS_STATUS_REASON__05 = '05'; + public const TRANS_STATUS_REASON__06 = '06'; + public const TRANS_STATUS_REASON__07 = '07'; + public const TRANS_STATUS_REASON__08 = '08'; + public const TRANS_STATUS_REASON__09 = '09'; + public const TRANS_STATUS_REASON__10 = '10'; + public const TRANS_STATUS_REASON__11 = '11'; + public const TRANS_STATUS_REASON__12 = '12'; + public const TRANS_STATUS_REASON__13 = '13'; + public const TRANS_STATUS_REASON__14 = '14'; + public const TRANS_STATUS_REASON__15 = '15'; + public const TRANS_STATUS_REASON__16 = '16'; + public const TRANS_STATUS_REASON__17 = '17'; + public const TRANS_STATUS_REASON__18 = '18'; + public const TRANS_STATUS_REASON__19 = '19'; + public const TRANS_STATUS_REASON__20 = '20'; + public const TRANS_STATUS_REASON__21 = '21'; + public const TRANS_STATUS_REASON__22 = '22'; + public const TRANS_STATUS_REASON__23 = '23'; + public const TRANS_STATUS_REASON__24 = '24'; + public const TRANS_STATUS_REASON__25 = '25'; + public const TRANS_STATUS_REASON__26 = '26'; + public const TRANS_STATUS_REASON__80 = '80'; + public const TRANS_STATUS_REASON__81 = '81'; + public const TRANS_STATUS_REASON__82 = '82'; + public const TRANS_STATUS_REASON__83 = '83'; + public const TRANS_STATUS_REASON__84 = '84'; + public const TRANS_STATUS_REASON__85 = '85'; + public const TRANS_STATUS_REASON__86 = '86'; + public const TRANS_STATUS_REASON__87 = '87'; + public const TRANS_STATUS_REASON__88 = '88'; + public const TYPE_FRICTIONLESS = 'frictionless'; + public const TYPE_CHALLENGE = 'challenge'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChallengeIndicatorAllowableValues() + { + return [ + self::CHALLENGE_INDICATOR__01, + self::CHALLENGE_INDICATOR__02, + self::CHALLENGE_INDICATOR__03, + self::CHALLENGE_INDICATOR__04, + self::CHALLENGE_INDICATOR__05, + self::CHALLENGE_INDICATOR__07, + self::CHALLENGE_INDICATOR__08, + self::CHALLENGE_INDICATOR__09, + self::CHALLENGE_INDICATOR__80, + self::CHALLENGE_INDICATOR__82, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeviceChannelAllowableValues() + { + return [ + self::DEVICE_CHANNEL_APP, + self::DEVICE_CHANNEL_BROWSER, + self::DEVICE_CHANNEL_THREE_DS_REQUESTOR_INITIATED, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExemptionIndicatorAllowableValues() + { + return [ + self::EXEMPTION_INDICATOR_LOW_VALUE, + self::EXEMPTION_INDICATOR_SECURE_CORPORATE, + self::EXEMPTION_INDICATOR_TRUSTED_BENEFICIARY, + self::EXEMPTION_INDICATOR_TRANSACTION_RISK_ANALYSIS, + self::EXEMPTION_INDICATOR_ACQUIRER_EXEMPTION, + self::EXEMPTION_INDICATOR_NO_EXEMPTION_APPLIED, + self::EXEMPTION_INDICATOR_VISA_DAF_EXEMPTION, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMessageCategoryAllowableValues() + { + return [ + self::MESSAGE_CATEGORY_PAYMENT, + self::MESSAGE_CATEGORY_NON_PAYMENT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTransStatusAllowableValues() + { + return [ + self::TRANS_STATUS_Y, + self::TRANS_STATUS_N, + self::TRANS_STATUS_R, + self::TRANS_STATUS_I, + self::TRANS_STATUS_U, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTransStatusReasonAllowableValues() + { + return [ + self::TRANS_STATUS_REASON__01, + self::TRANS_STATUS_REASON__02, + self::TRANS_STATUS_REASON__03, + self::TRANS_STATUS_REASON__04, + self::TRANS_STATUS_REASON__05, + self::TRANS_STATUS_REASON__06, + self::TRANS_STATUS_REASON__07, + self::TRANS_STATUS_REASON__08, + self::TRANS_STATUS_REASON__09, + self::TRANS_STATUS_REASON__10, + self::TRANS_STATUS_REASON__11, + self::TRANS_STATUS_REASON__12, + self::TRANS_STATUS_REASON__13, + self::TRANS_STATUS_REASON__14, + self::TRANS_STATUS_REASON__15, + self::TRANS_STATUS_REASON__16, + self::TRANS_STATUS_REASON__17, + self::TRANS_STATUS_REASON__18, + self::TRANS_STATUS_REASON__19, + self::TRANS_STATUS_REASON__20, + self::TRANS_STATUS_REASON__21, + self::TRANS_STATUS_REASON__22, + self::TRANS_STATUS_REASON__23, + self::TRANS_STATUS_REASON__24, + self::TRANS_STATUS_REASON__25, + self::TRANS_STATUS_REASON__26, + self::TRANS_STATUS_REASON__80, + self::TRANS_STATUS_REASON__81, + self::TRANS_STATUS_REASON__82, + self::TRANS_STATUS_REASON__83, + self::TRANS_STATUS_REASON__84, + self::TRANS_STATUS_REASON__85, + self::TRANS_STATUS_REASON__86, + self::TRANS_STATUS_REASON__87, + self::TRANS_STATUS_REASON__88, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_FRICTIONLESS, + self::TYPE_CHALLENGE, + ]; + } + /** + * 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('acsTransId', $data ?? [], null); + $this->setIfExists('challenge', $data ?? [], null); + $this->setIfExists('challengeIndicator', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('deviceChannel', $data ?? [], null); + $this->setIfExists('dsTransID', $data ?? [], null); + $this->setIfExists('exemptionIndicator', $data ?? [], null); + $this->setIfExists('inPSD2Scope', $data ?? [], null); + $this->setIfExists('messageCategory', $data ?? [], null); + $this->setIfExists('messageVersion', $data ?? [], null); + $this->setIfExists('riskScore', $data ?? [], null); + $this->setIfExists('threeDSServerTransID', $data ?? [], null); + $this->setIfExists('transStatus', $data ?? [], null); + $this->setIfExists('transStatusReason', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['acsTransId'] === null) { + $invalidProperties[] = "'acsTransId' can't be null"; + } + if ($this->container['challengeIndicator'] === null) { + $invalidProperties[] = "'challengeIndicator' can't be null"; + } + $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) + ); + } + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['deviceChannel'] === null) { + $invalidProperties[] = "'deviceChannel' can't be null"; + } + $allowedValues = $this->getDeviceChannelAllowableValues(); + if (!is_null($this->container['deviceChannel']) && !in_array($this->container['deviceChannel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deviceChannel', must be one of '%s'", + $this->container['deviceChannel'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['dsTransID'] === null) { + $invalidProperties[] = "'dsTransID' can't be null"; + } + $allowedValues = $this->getExemptionIndicatorAllowableValues(); + if (!is_null($this->container['exemptionIndicator']) && !in_array($this->container['exemptionIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'exemptionIndicator', must be one of '%s'", + $this->container['exemptionIndicator'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['inPSD2Scope'] === null) { + $invalidProperties[] = "'inPSD2Scope' can't be null"; + } + if ($this->container['messageCategory'] === null) { + $invalidProperties[] = "'messageCategory' can't be null"; + } + $allowedValues = $this->getMessageCategoryAllowableValues(); + if (!is_null($this->container['messageCategory']) && !in_array($this->container['messageCategory'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'messageCategory', must be one of '%s'", + $this->container['messageCategory'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['messageVersion'] === null) { + $invalidProperties[] = "'messageVersion' can't be null"; + } + if ($this->container['threeDSServerTransID'] === null) { + $invalidProperties[] = "'threeDSServerTransID' can't be null"; + } + if ($this->container['transStatus'] === null) { + $invalidProperties[] = "'transStatus' can't be null"; + } + $allowedValues = $this->getTransStatusAllowableValues(); + if (!is_null($this->container['transStatus']) && !in_array($this->container['transStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'transStatus', must be one of '%s'", + $this->container['transStatus'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTransStatusReasonAllowableValues(); + if (!is_null($this->container['transStatusReason']) && !in_array($this->container['transStatusReason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'transStatusReason', must be one of '%s'", + $this->container['transStatusReason'], + implode("', '", $allowedValues) + ); + } + + 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 acsTransId + * + * @return string + */ + public function getAcsTransId() + { + return $this->container['acsTransId']; + } + + /** + * Sets acsTransId + * + * @param string $acsTransId Universally unique transaction identifier assigned by the Access Control Server (ACS) to identify a single transaction. + * + * @return self + */ + public function setAcsTransId($acsTransId) + { + if (is_null($acsTransId)) { + throw new \InvalidArgumentException('non-nullable acsTransId cannot be null'); + } + $this->container['acsTransId'] = $acsTransId; + + return $this; + } + + /** + * Gets challenge + * + * @return \Adyen\Model\ACSWebhook\ChallengeInfo|null + */ + public function getChallenge() + { + return $this->container['challenge']; + } + + /** + * Sets challenge + * + * @param \Adyen\Model\ACSWebhook\ChallengeInfo|null $challenge challenge + * + * @return self + */ + public function setChallenge($challenge) + { + if (is_null($challenge)) { + throw new \InvalidArgumentException('non-nullable challenge cannot be null'); + } + $this->container['challenge'] = $challenge; + + return $this; + } + + /** + * Gets challengeIndicator + * + * @return string + */ + public function getChallengeIndicator() + { + return $this->container['challengeIndicator']; + } + + /** + * Sets challengeIndicator + * + * @param string $challengeIndicator Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) + * + * @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 createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Date and time in UTC of the cardholder authentication. [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**. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets deviceChannel + * + * @return string + */ + public function getDeviceChannel() + { + return $this->container['deviceChannel']; + } + + /** + * Sets deviceChannel + * + * @param string $deviceChannel Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) + * + * @return self + */ + public function setDeviceChannel($deviceChannel) + { + if (is_null($deviceChannel)) { + throw new \InvalidArgumentException('non-nullable deviceChannel cannot be null'); + } + $allowedValues = $this->getDeviceChannelAllowableValues(); + if (!in_array($deviceChannel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deviceChannel', must be one of '%s'", + $deviceChannel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deviceChannel'] = $deviceChannel; + + return $this; + } + + /** + * Gets dsTransID + * + * @return string + */ + public function getDsTransID() + { + return $this->container['dsTransID']; + } + + /** + * Sets dsTransID + * + * @param string $dsTransID Universally unique transaction identifier assigned by the DS (card scheme) to identify a single transaction. + * + * @return self + */ + public function setDsTransID($dsTransID) + { + if (is_null($dsTransID)) { + throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); + } + $this->container['dsTransID'] = $dsTransID; + + return $this; + } + + /** + * Gets exemptionIndicator + * + * @return string|null + */ + public function getExemptionIndicator() + { + return $this->container['exemptionIndicator']; + } + + /** + * Sets exemptionIndicator + * + * @param string|null $exemptionIndicator Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** + * + * @return self + */ + public function setExemptionIndicator($exemptionIndicator) + { + if (is_null($exemptionIndicator)) { + throw new \InvalidArgumentException('non-nullable exemptionIndicator cannot be null'); + } + $allowedValues = $this->getExemptionIndicatorAllowableValues(); + if (!in_array($exemptionIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'exemptionIndicator', must be one of '%s'", + $exemptionIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['exemptionIndicator'] = $exemptionIndicator; + + return $this; + } + + /** + * Gets inPSD2Scope + * + * @return bool + */ + public function getInPSD2Scope() + { + return $this->container['inPSD2Scope']; + } + + /** + * Sets inPSD2Scope + * + * @param bool $inPSD2Scope Indicates if the purchase was in the PSD2 scope. + * + * @return self + */ + public function setInPSD2Scope($inPSD2Scope) + { + if (is_null($inPSD2Scope)) { + throw new \InvalidArgumentException('non-nullable inPSD2Scope cannot be null'); + } + $this->container['inPSD2Scope'] = $inPSD2Scope; + + return $this; + } + + /** + * Gets messageCategory + * + * @return string + */ + public function getMessageCategory() + { + return $this->container['messageCategory']; + } + + /** + * Sets messageCategory + * + * @param string $messageCategory Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** + * + * @return self + */ + public function setMessageCategory($messageCategory) + { + if (is_null($messageCategory)) { + throw new \InvalidArgumentException('non-nullable messageCategory cannot be null'); + } + $allowedValues = $this->getMessageCategoryAllowableValues(); + if (!in_array($messageCategory, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'messageCategory', must be one of '%s'", + $messageCategory, + implode("', '", $allowedValues) + ) + ); + } + $this->container['messageCategory'] = $messageCategory; + + return $this; + } + + /** + * Gets messageVersion + * + * @return string + */ + public function getMessageVersion() + { + return $this->container['messageVersion']; + } + + /** + * Sets messageVersion + * + * @param string $messageVersion The `messageVersion` value as defined in the 3D Secure 2 specification. + * + * @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 riskScore + * + * @return int|null + */ + public function getRiskScore() + { + return $this->container['riskScore']; + } + + /** + * Sets riskScore + * + * @param int|null $riskScore Risk score calculated from the transaction rules. + * + * @return self + */ + public function setRiskScore($riskScore) + { + // Do nothing for nullable integers + $this->container['riskScore'] = $riskScore; + + return $this; + } + + /** + * Gets threeDSServerTransID + * + * @return string + */ + public function getThreeDSServerTransID() + { + return $this->container['threeDSServerTransID']; + } + + /** + * Sets threeDSServerTransID + * + * @param string $threeDSServerTransID The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. + * + * @return self + */ + public function setThreeDSServerTransID($threeDSServerTransID) + { + if (is_null($threeDSServerTransID)) { + throw new \InvalidArgumentException('non-nullable threeDSServerTransID cannot be null'); + } + $this->container['threeDSServerTransID'] = $threeDSServerTransID; + + return $this; + } + + /** + * Gets transStatus + * + * @return string + */ + public function getTransStatus() + { + return $this->container['transStatus']; + } + + /** + * Sets transStatus + * + * @param string $transStatus The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. + * + * @return self + */ + public function setTransStatus($transStatus) + { + if (is_null($transStatus)) { + throw new \InvalidArgumentException('non-nullable transStatus cannot be null'); + } + $allowedValues = $this->getTransStatusAllowableValues(); + if (!in_array($transStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'transStatus', must be one of '%s'", + $transStatus, + implode("', '", $allowedValues) + ) + ); + } + $this->container['transStatus'] = $transStatus; + + return $this; + } + + /** + * Gets transStatusReason + * + * @return string|null + */ + public function getTransStatusReason() + { + return $this->container['transStatusReason']; + } + + /** + * Sets transStatusReason + * + * @param string|null $transStatusReason Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). + * + * @return self + */ + public function setTransStatusReason($transStatusReason) + { + if (is_null($transStatusReason)) { + throw new \InvalidArgumentException('non-nullable transStatusReason cannot be null'); + } + $allowedValues = $this->getTransStatusReasonAllowableValues(); + if (!in_array($transStatusReason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'transStatusReason', must be one of '%s'", + $transStatusReason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['transStatusReason'] = $transStatusReason; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of authentication performed. Possible values: * **frictionless** * **challenge** + * + * @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/ACSWebhook/AuthenticationNotificationData.php b/src/Adyen/Model/ACSWebhook/AuthenticationNotificationData.php new file mode 100644 index 000000000..91e5d2cab --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/AuthenticationNotificationData.php @@ -0,0 +1,604 @@ + + */ +class AuthenticationNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthenticationNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'authentication' => '\Adyen\Model\ACSWebhook\AuthenticationInfo', + 'balancePlatform' => 'string', + 'id' => 'string', + 'paymentInstrumentId' => 'string', + 'purchase' => '\Adyen\Model\ACSWebhook\PurchaseInfo', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'authentication' => null, + 'balancePlatform' => null, + 'id' => null, + 'paymentInstrumentId' => null, + 'purchase' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'authentication' => false, + 'balancePlatform' => false, + 'id' => false, + 'paymentInstrumentId' => false, + 'purchase' => 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 = [ + 'authentication' => 'authentication', + 'balancePlatform' => 'balancePlatform', + 'id' => 'id', + 'paymentInstrumentId' => 'paymentInstrumentId', + 'purchase' => 'purchase', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authentication' => 'setAuthentication', + 'balancePlatform' => 'setBalancePlatform', + 'id' => 'setId', + 'paymentInstrumentId' => 'setPaymentInstrumentId', + 'purchase' => 'setPurchase', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authentication' => 'getAuthentication', + 'balancePlatform' => 'getBalancePlatform', + 'id' => 'getId', + 'paymentInstrumentId' => 'getPaymentInstrumentId', + 'purchase' => 'getPurchase', + '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_AUTHENTICATED = 'authenticated'; + public const STATUS_REJECTED = 'rejected'; + public const STATUS_ERROR = 'error'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_AUTHENTICATED, + self::STATUS_REJECTED, + self::STATUS_ERROR, + ]; + } + /** + * 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('authentication', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentInstrumentId', $data ?? [], null); + $this->setIfExists('purchase', $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['authentication'] === null) { + $invalidProperties[] = "'authentication' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['paymentInstrumentId'] === null) { + $invalidProperties[] = "'paymentInstrumentId' can't be null"; + } + if ($this->container['purchase'] === null) { + $invalidProperties[] = "'purchase' 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 authentication + * + * @return \Adyen\Model\ACSWebhook\AuthenticationInfo + */ + public function getAuthentication() + { + return $this->container['authentication']; + } + + /** + * Sets authentication + * + * @param \Adyen\Model\ACSWebhook\AuthenticationInfo $authentication authentication + * + * @return self + */ + public function setAuthentication($authentication) + { + if (is_null($authentication)) { + throw new \InvalidArgumentException('non-nullable authentication cannot be null'); + } + $this->container['authentication'] = $authentication; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier of the authentication. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets paymentInstrumentId + * + * @return string + */ + public function getPaymentInstrumentId() + { + return $this->container['paymentInstrumentId']; + } + + /** + * Sets paymentInstrumentId + * + * @param string $paymentInstrumentId Unique identifier of the payment instrument that was used for the authentication. + * + * @return self + */ + public function setPaymentInstrumentId($paymentInstrumentId) + { + if (is_null($paymentInstrumentId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); + } + $this->container['paymentInstrumentId'] = $paymentInstrumentId; + + return $this; + } + + /** + * Gets purchase + * + * @return \Adyen\Model\ACSWebhook\PurchaseInfo + */ + public function getPurchase() + { + return $this->container['purchase']; + } + + /** + * Sets purchase + * + * @param \Adyen\Model\ACSWebhook\PurchaseInfo $purchase purchase + * + * @return self + */ + public function setPurchase($purchase) + { + if (is_null($purchase)) { + throw new \InvalidArgumentException('non-nullable purchase cannot be null'); + } + $this->container['purchase'] = $purchase; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Outcome of the authentication. Allowed values: * authenticated * rejected * error + * + * @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/ACSWebhook/AuthenticationNotificationRequest.php b/src/Adyen/Model/ACSWebhook/AuthenticationNotificationRequest.php new file mode 100644 index 000000000..e3b32def7 --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/AuthenticationNotificationRequest.php @@ -0,0 +1,492 @@ + + */ +class AuthenticationNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthenticationNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ACSWebhook\AuthenticationNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_BALANCE_PLATFORM_AUTHENTICATION_CREATED = 'balancePlatform.authentication.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_PLATFORM_AUTHENTICATION_CREATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ACSWebhook\AuthenticationNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ACSWebhook\AuthenticationNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @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/ACSWebhook/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ACSWebhook/BalancePlatformNotificationResponse.php new file mode 100644 index 000000000..82a582e1c --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/BalancePlatformNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalancePlatformNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/ACSWebhook/ChallengeInfo.php b/src/Adyen/Model/ACSWebhook/ChallengeInfo.php new file mode 100644 index 000000000..c07f3b3b1 --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/ChallengeInfo.php @@ -0,0 +1,632 @@ + + */ +class ChallengeInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ChallengeInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'challengeCancel' => 'string', + 'flow' => 'string', + 'lastInteraction' => '\DateTime', + 'phoneNumber' => 'string', + 'resends' => 'int', + 'retries' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'challengeCancel' => null, + 'flow' => null, + 'lastInteraction' => 'date-time', + 'phoneNumber' => null, + 'resends' => 'int32', + 'retries' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'challengeCancel' => false, + 'flow' => false, + 'lastInteraction' => false, + 'phoneNumber' => false, + 'resends' => true, + 'retries' => 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 = [ + 'challengeCancel' => 'challengeCancel', + 'flow' => 'flow', + 'lastInteraction' => 'lastInteraction', + 'phoneNumber' => 'phoneNumber', + 'resends' => 'resends', + 'retries' => 'retries' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'challengeCancel' => 'setChallengeCancel', + 'flow' => 'setFlow', + 'lastInteraction' => 'setLastInteraction', + 'phoneNumber' => 'setPhoneNumber', + 'resends' => 'setResends', + 'retries' => 'setRetries' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'challengeCancel' => 'getChallengeCancel', + 'flow' => 'getFlow', + 'lastInteraction' => 'getLastInteraction', + 'phoneNumber' => 'getPhoneNumber', + 'resends' => 'getResends', + 'retries' => 'getRetries' + ]; + + /** + * 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 CHALLENGE_CANCEL__01 = '01'; + public const CHALLENGE_CANCEL__02 = '02'; + public const CHALLENGE_CANCEL__03 = '03'; + public const CHALLENGE_CANCEL__04 = '04'; + public const CHALLENGE_CANCEL__05 = '05'; + public const CHALLENGE_CANCEL__06 = '06'; + public const CHALLENGE_CANCEL__07 = '07'; + public const FLOW_OTP_SMS = 'OTP_SMS'; + public const FLOW_OOB = 'OOB'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChallengeCancelAllowableValues() + { + return [ + self::CHALLENGE_CANCEL__01, + self::CHALLENGE_CANCEL__02, + self::CHALLENGE_CANCEL__03, + self::CHALLENGE_CANCEL__04, + self::CHALLENGE_CANCEL__05, + self::CHALLENGE_CANCEL__06, + self::CHALLENGE_CANCEL__07, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFlowAllowableValues() + { + return [ + self::FLOW_OTP_SMS, + self::FLOW_OOB, + ]; + } + /** + * 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('challengeCancel', $data ?? [], null); + $this->setIfExists('flow', $data ?? [], null); + $this->setIfExists('lastInteraction', $data ?? [], null); + $this->setIfExists('phoneNumber', $data ?? [], null); + $this->setIfExists('resends', $data ?? [], null); + $this->setIfExists('retries', $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->getChallengeCancelAllowableValues(); + if (!is_null($this->container['challengeCancel']) && !in_array($this->container['challengeCancel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'challengeCancel', must be one of '%s'", + $this->container['challengeCancel'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['flow'] === null) { + $invalidProperties[] = "'flow' can't be null"; + } + $allowedValues = $this->getFlowAllowableValues(); + if (!is_null($this->container['flow']) && !in_array($this->container['flow'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'flow', must be one of '%s'", + $this->container['flow'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['lastInteraction'] === null) { + $invalidProperties[] = "'lastInteraction' 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 challengeCancel + * + * @return string|null + */ + public function getChallengeCancel() + { + return $this->container['challengeCancel']; + } + + /** + * Sets challengeCancel + * + * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * + * @return self + */ + public function setChallengeCancel($challengeCancel) + { + if (is_null($challengeCancel)) { + throw new \InvalidArgumentException('non-nullable challengeCancel cannot be null'); + } + $allowedValues = $this->getChallengeCancelAllowableValues(); + if (!in_array($challengeCancel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'challengeCancel', must be one of '%s'", + $challengeCancel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['challengeCancel'] = $challengeCancel; + + return $this; + } + + /** + * Gets flow + * + * @return string + */ + public function getFlow() + { + return $this->container['flow']; + } + + /** + * Sets flow + * + * @param string $flow The flow used in the challenge. Possible values: * **OTP_SMS**: one-time password (OTP) flow * **OOB**: out-of-band (OOB) flow + * + * @return self + */ + public function setFlow($flow) + { + if (is_null($flow)) { + throw new \InvalidArgumentException('non-nullable flow cannot be null'); + } + $allowedValues = $this->getFlowAllowableValues(); + if (!in_array($flow, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'flow', must be one of '%s'", + $flow, + implode("', '", $allowedValues) + ) + ); + } + $this->container['flow'] = $flow; + + return $this; + } + + /** + * Gets lastInteraction + * + * @return \DateTime + */ + public function getLastInteraction() + { + return $this->container['lastInteraction']; + } + + /** + * Sets lastInteraction + * + * @param \DateTime $lastInteraction The last time of interaction with the challenge. + * + * @return self + */ + public function setLastInteraction($lastInteraction) + { + if (is_null($lastInteraction)) { + throw new \InvalidArgumentException('non-nullable lastInteraction cannot be null'); + } + $this->container['lastInteraction'] = $lastInteraction; + + return $this; + } + + /** + * Gets phoneNumber + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param string|null $phoneNumber The last four digits of the phone number used in the challenge. + * + * @return self + */ + public function setPhoneNumber($phoneNumber) + { + if (is_null($phoneNumber)) { + throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); + } + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + + /** + * Gets resends + * + * @return int|null + */ + public function getResends() + { + return $this->container['resends']; + } + + /** + * Sets resends + * + * @param int|null $resends The number of times the one-time password (OTP) was resent during the challenge. + * + * @return self + */ + public function setResends($resends) + { + // Do nothing for nullable integers + $this->container['resends'] = $resends; + + return $this; + } + + /** + * Gets retries + * + * @return int|null + */ + public function getRetries() + { + return $this->container['retries']; + } + + /** + * Sets retries + * + * @param int|null $retries The number of retries used in the challenge. + * + * @return self + */ + public function setRetries($retries) + { + // Do nothing for nullable integers + $this->container['retries'] = $retries; + + 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/ACSWebhook/ModelInterface.php b/src/Adyen/Model/ACSWebhook/ModelInterface.php new file mode 100644 index 000000000..b887390f4 --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/ModelInterface.php @@ -0,0 +1,92 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/ACSWebhook/PurchaseInfo.php b/src/Adyen/Model/ACSWebhook/PurchaseInfo.php new file mode 100644 index 000000000..82bf47c30 --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/PurchaseInfo.php @@ -0,0 +1,461 @@ + + */ +class PurchaseInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PurchaseInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'date' => 'string', + 'merchantName' => 'string', + 'originalAmount' => '\Adyen\Model\ACSWebhook\Amount' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'date' => null, + 'merchantName' => null, + 'originalAmount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'date' => false, + 'merchantName' => false, + 'originalAmount' => 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 = [ + 'date' => 'date', + 'merchantName' => 'merchantName', + 'originalAmount' => 'originalAmount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'date' => 'setDate', + 'merchantName' => 'setMerchantName', + 'originalAmount' => 'setOriginalAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'date' => 'getDate', + 'merchantName' => 'getMerchantName', + 'originalAmount' => 'getOriginalAmount' + ]; + + /** + * 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('date', $data ?? [], null); + $this->setIfExists('merchantName', $data ?? [], null); + $this->setIfExists('originalAmount', $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['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['merchantName'] === null) { + $invalidProperties[] = "'merchantName' can't be null"; + } + if ($this->container['originalAmount'] === null) { + $invalidProperties[] = "'originalAmount' 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 date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date Date of the purchase. + * + * @return self + */ + public function setDate($date) + { + if (is_null($date)) { + throw new \InvalidArgumentException('non-nullable date cannot be null'); + } + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets merchantName + * + * @return string + */ + public function getMerchantName() + { + return $this->container['merchantName']; + } + + /** + * Sets merchantName + * + * @param string $merchantName Name of the merchant. + * + * @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 originalAmount + * + * @return \Adyen\Model\ACSWebhook\Amount + */ + public function getOriginalAmount() + { + return $this->container['originalAmount']; + } + + /** + * Sets originalAmount + * + * @param \Adyen\Model\ACSWebhook\Amount $originalAmount originalAmount + * + * @return self + */ + public function setOriginalAmount($originalAmount) + { + if (is_null($originalAmount)) { + throw new \InvalidArgumentException('non-nullable originalAmount cannot be null'); + } + $this->container['originalAmount'] = $originalAmount; + + 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/ACSWebhook/Resource.php b/src/Adyen/Model/ACSWebhook/Resource.php new file mode 100644 index 000000000..c933c2243 --- /dev/null +++ b/src/Adyen/Model/ACSWebhook/Resource.php @@ -0,0 +1,452 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** + * 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/BalanceControl/Amount.php b/src/Adyen/Model/BalanceControl/Amount.php index 00665e4f6..bf952009b 100644 --- a/src/Adyen/Model/BalanceControl/Amount.php +++ b/src/Adyen/Model/BalanceControl/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php index 139c67dd6..2fdc68bf1 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php index 3299a8908..724a47f8a 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalanceControl/ModelInterface.php b/src/Adyen/Model/BalanceControl/ModelInterface.php index 11f4953c8..a2c6952c8 100644 --- a/src/Adyen/Model/BalanceControl/ModelInterface.php +++ b/src/Adyen/Model/BalanceControl/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index ad7407225..2ed0eb3a0 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php index f27e0821a..9123f65ee 100644 --- a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index 365ef4af4..b05a13e0c 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php index 5b4536b7e..a74bdfef9 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php index ca54ccbb7..1de87bce6 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php index 33619ca92..4d34899bd 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php b/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php index 8d0cf14b5..6cc7abba0 100644 --- a/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php b/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php index 2b30ca9fa..89eaa0eb9 100644 --- a/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php +++ b/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php b/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php index 35dc29f23..4bb4efaba 100644 --- a/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Address.php b/src/Adyen/Model/BalancePlatform/Address.php index 977c665e0..19e9ed5f5 100644 --- a/src/Adyen/Model/BalancePlatform/Address.php +++ b/src/Adyen/Model/BalancePlatform/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AddressRequirement.php b/src/Adyen/Model/BalancePlatform/AddressRequirement.php index 041a7a9b6..069c6da72 100644 --- a/src/Adyen/Model/BalancePlatform/AddressRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AddressRequirement.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Amount.php b/src/Adyen/Model/BalancePlatform/Amount.php index 5afa26e08..5f7633ddc 100644 --- a/src/Adyen/Model/BalancePlatform/Amount.php +++ b/src/Adyen/Model/BalancePlatform/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php index 5f3d37123..612ac11f2 100644 --- a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Authentication.php b/src/Adyen/Model/BalancePlatform/Authentication.php index 95fcb42c8..d3d4e7ac0 100644 --- a/src/Adyen/Model/BalancePlatform/Authentication.php +++ b/src/Adyen/Model/BalancePlatform/Authentication.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php index 0f2153959..d54e1bf11 100644 --- a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Balance.php b/src/Adyen/Model/BalancePlatform/Balance.php index da44b35f2..12233bea8 100644 --- a/src/Adyen/Model/BalancePlatform/Balance.php +++ b/src/Adyen/Model/BalancePlatform/Balance.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index d8456e950..08f45254c 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index a82948bbf..64ca3ea7b 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index bccfbacd4..4563f79e7 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index e477f881a..707bd499d 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BalancePlatform.php b/src/Adyen/Model/BalancePlatform/BalancePlatform.php index b8e9719ff..f1d166683 100644 --- a/src/Adyen/Model/BalancePlatform/BalancePlatform.php +++ b/src/Adyen/Model/BalancePlatform/BalancePlatform.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php b/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php index de3575d97..02d262af8 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php +++ b/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BankAccount.php b/src/Adyen/Model/BalancePlatform/BankAccount.php index 5327d092f..5dd4ee3da 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccount.php +++ b/src/Adyen/Model/BalancePlatform/BankAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index d808045d8..460bf20ee 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php index fc9f66de7..172990854 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php index d41a9d2bb..721d3c5e0 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index 13cf1319c..f36d0988e 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BankIdentification.php b/src/Adyen/Model/BalancePlatform/BankIdentification.php index cff25d900..2386d7317 100644 --- a/src/Adyen/Model/BalancePlatform/BankIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php b/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php index c15cef140..f0c9eb28c 100644 --- a/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/BulkAddress.php b/src/Adyen/Model/BalancePlatform/BulkAddress.php index c09d4054d..cced8cd23 100644 --- a/src/Adyen/Model/BalancePlatform/BulkAddress.php +++ b/src/Adyen/Model/BalancePlatform/BulkAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php index 814c15d52..4a1dd2bd1 100644 --- a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php index 7bb4a2fe9..bfead0b4d 100644 --- a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblem.php b/src/Adyen/Model/BalancePlatform/CapabilityProblem.php index 0ad4e4232..c279fea76 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblem.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblem.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php index 818398a06..a20c971cf 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php index 4f605b7d7..7a69158e0 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index b03b47262..4fffa9e80 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -385,7 +385,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -412,7 +412,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -448,7 +448,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/CapitalBalance.php b/src/Adyen/Model/BalancePlatform/CapitalBalance.php index 251907823..cbb79d994 100644 --- a/src/Adyen/Model/BalancePlatform/CapitalBalance.php +++ b/src/Adyen/Model/BalancePlatform/CapitalBalance.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php b/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php index d327bc522..b1ad10b00 100644 --- a/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php +++ b/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Card.php b/src/Adyen/Model/BalancePlatform/Card.php index 8a9ab2f62..e1b1a76c1 100644 --- a/src/Adyen/Model/BalancePlatform/Card.php +++ b/src/Adyen/Model/BalancePlatform/Card.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CardConfiguration.php b/src/Adyen/Model/BalancePlatform/CardConfiguration.php index 14105278f..b9a71ab4d 100644 --- a/src/Adyen/Model/BalancePlatform/CardConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/CardConfiguration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CardInfo.php b/src/Adyen/Model/BalancePlatform/CardInfo.php index fc86a8101..6ba673ef9 100644 --- a/src/Adyen/Model/BalancePlatform/CardInfo.php +++ b/src/Adyen/Model/BalancePlatform/CardInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ContactDetails.php b/src/Adyen/Model/BalancePlatform/ContactDetails.php index c14564ca9..7a18a18bb 100644 --- a/src/Adyen/Model/BalancePlatform/ContactDetails.php +++ b/src/Adyen/Model/BalancePlatform/ContactDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Counterparty.php b/src/Adyen/Model/BalancePlatform/Counterparty.php index aad3b7832..e6d91b3c4 100644 --- a/src/Adyen/Model/BalancePlatform/Counterparty.php +++ b/src/Adyen/Model/BalancePlatform/Counterparty.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php index fbf6f1f19..2b605ad48 100644 --- a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CountriesRestriction.php b/src/Adyen/Model/BalancePlatform/CountriesRestriction.php index f4accd1dd..fe2db616d 100644 --- a/src/Adyen/Model/BalancePlatform/CountriesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/CountriesRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 805603649..2357b2876 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php index 26337eff2..8ffb03ff3 100644 --- a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php b/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php index ab5aba40d..620221dd4 100644 --- a/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php +++ b/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php index 197ad467f..c886b04d7 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/DeliveryContact.php b/src/Adyen/Model/BalancePlatform/DeliveryContact.php index 4973f2b86..367e10d80 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryContact.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryContact.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/DeviceInfo.php b/src/Adyen/Model/BalancePlatform/DeviceInfo.php index 83dab0c3a..b465d7082 100644 --- a/src/Adyen/Model/BalancePlatform/DeviceInfo.php +++ b/src/Adyen/Model/BalancePlatform/DeviceInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php b/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php index 10be5cdaf..603ab8a6a 100644 --- a/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Duration.php b/src/Adyen/Model/BalancePlatform/Duration.php index 2926d654a..70713ea56 100644 --- a/src/Adyen/Model/BalancePlatform/Duration.php +++ b/src/Adyen/Model/BalancePlatform/Duration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php b/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php index 1f8a766fc..5ecbe040b 100644 --- a/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Expiry.php b/src/Adyen/Model/BalancePlatform/Expiry.php index aab7f10d5..61f2cca42 100644 --- a/src/Adyen/Model/BalancePlatform/Expiry.php +++ b/src/Adyen/Model/BalancePlatform/Expiry.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Fee.php b/src/Adyen/Model/BalancePlatform/Fee.php index a7804a1c0..f803d247d 100644 --- a/src/Adyen/Model/BalancePlatform/Fee.php +++ b/src/Adyen/Model/BalancePlatform/Fee.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php b/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php index 77f552a91..3cc08549b 100644 --- a/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php index ea3df25eb..9d5bce9ef 100644 --- a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/GrantLimit.php b/src/Adyen/Model/BalancePlatform/GrantLimit.php index 6274ece8c..729175de4 100644 --- a/src/Adyen/Model/BalancePlatform/GrantLimit.php +++ b/src/Adyen/Model/BalancePlatform/GrantLimit.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/GrantOffer.php b/src/Adyen/Model/BalancePlatform/GrantOffer.php index 264f5817b..186f5503a 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffer.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/GrantOffers.php b/src/Adyen/Model/BalancePlatform/GrantOffers.php index ba0672f95..20f4206c8 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffers.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffers.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 262c9de65..600242241 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php index 58d44aded..cdf593038 100644 --- a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php index cb08b0b23..aa08e52ce 100644 --- a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php b/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php index 00c47d037..59a49830f 100644 --- a/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php +++ b/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/InvalidField.php b/src/Adyen/Model/BalancePlatform/InvalidField.php index c7ac961d7..9591293bf 100644 --- a/src/Adyen/Model/BalancePlatform/InvalidField.php +++ b/src/Adyen/Model/BalancePlatform/InvalidField.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php b/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php index 58c7af8de..48fa0ef44 100644 --- a/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php +++ b/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php b/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php index 5bb9e8227..c70186e0d 100644 --- a/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/MccsRestriction.php b/src/Adyen/Model/BalancePlatform/MccsRestriction.php index 0080eb48e..0bc961eff 100644 --- a/src/Adyen/Model/BalancePlatform/MccsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MccsRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php b/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php index 4fd543cc8..d3bddac72 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php +++ b/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php b/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php index 4d08489ae..a88c301b0 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php b/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php index dec44b923..6dcebd8d3 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ModelInterface.php b/src/Adyen/Model/BalancePlatform/ModelInterface.php index adb620136..019ee99d6 100644 --- a/src/Adyen/Model/BalancePlatform/ModelInterface.php +++ b/src/Adyen/Model/BalancePlatform/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php index f9b9d615d..9532fc4d9 100644 --- a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index ff1b67d47..0bfebfff6 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Name.php b/src/Adyen/Model/BalancePlatform/Name.php index 1125f4899..54884fe91 100644 --- a/src/Adyen/Model/BalancePlatform/Name.php +++ b/src/Adyen/Model/BalancePlatform/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/NetworkToken.php b/src/Adyen/Model/BalancePlatform/NetworkToken.php index d5d4a0ee1..704865beb 100644 --- a/src/Adyen/Model/BalancePlatform/NetworkToken.php +++ b/src/Adyen/Model/BalancePlatform/NetworkToken.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php index f56df6518..349326300 100644 --- a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index bc0e09bdd..fa9af7e82 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php index 3d43494ee..607311dc3 100644 --- a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php index 19556386d..1bfccd6a3 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php index c09fa929b..a19d50bb3 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php index 0009db76c..746ed65fe 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php index 42057ff3a..303bd04e1 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php index 07ad4b4d5..1bbc6d26c 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php index 8f60d8fa4..0ac7d75fe 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php index fcd483bcf..7c188e6de 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php index 3932e4e82..331e62094 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index 00fd465f4..e97bf5511 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php index 0c7349dd5..94d036680 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php index 894083084..69fe1520c 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Phone.php b/src/Adyen/Model/BalancePlatform/Phone.php index 7f3f5b4ec..39e9d2736 100644 --- a/src/Adyen/Model/BalancePlatform/Phone.php +++ b/src/Adyen/Model/BalancePlatform/Phone.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PhoneNumber.php b/src/Adyen/Model/BalancePlatform/PhoneNumber.php index b6beeea48..45ac74747 100644 --- a/src/Adyen/Model/BalancePlatform/PhoneNumber.php +++ b/src/Adyen/Model/BalancePlatform/PhoneNumber.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php index 0ea45c5c8..f13605674 100644 --- a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php b/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php index eaea3f1b6..c17193564 100644 --- a/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/RemediatingAction.php b/src/Adyen/Model/BalancePlatform/RemediatingAction.php index 42033857e..4f98cf59f 100644 --- a/src/Adyen/Model/BalancePlatform/RemediatingAction.php +++ b/src/Adyen/Model/BalancePlatform/RemediatingAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/Repayment.php b/src/Adyen/Model/BalancePlatform/Repayment.php index 86e0100c1..659568478 100644 --- a/src/Adyen/Model/BalancePlatform/Repayment.php +++ b/src/Adyen/Model/BalancePlatform/Repayment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/RepaymentTerm.php b/src/Adyen/Model/BalancePlatform/RepaymentTerm.php index 72ed3f35c..60fa8a8c2 100644 --- a/src/Adyen/Model/BalancePlatform/RepaymentTerm.php +++ b/src/Adyen/Model/BalancePlatform/RepaymentTerm.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/RestServiceError.php b/src/Adyen/Model/BalancePlatform/RestServiceError.php index cef78e4f9..45c5f9c34 100644 --- a/src/Adyen/Model/BalancePlatform/RestServiceError.php +++ b/src/Adyen/Model/BalancePlatform/RestServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php index 42886f6fa..da9c3f722 100644 --- a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php index 768da1518..74a9914cc 100644 --- a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php index a69e037b9..58ff0bfe5 100644 --- a/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php +++ b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php index 8f0d5adc1..991f179b9 100644 --- a/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php +++ b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/StringMatch.php b/src/Adyen/Model/BalancePlatform/StringMatch.php index d14d37407..2ac87c457 100644 --- a/src/Adyen/Model/BalancePlatform/StringMatch.php +++ b/src/Adyen/Model/BalancePlatform/StringMatch.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 9a5e1b56e..0a860af04 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SweepCounterparty.php b/src/Adyen/Model/BalancePlatform/SweepCounterparty.php index 3c4ab9b41..fe1e9cbf6 100644 --- a/src/Adyen/Model/BalancePlatform/SweepCounterparty.php +++ b/src/Adyen/Model/BalancePlatform/SweepCounterparty.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/SweepSchedule.php b/src/Adyen/Model/BalancePlatform/SweepSchedule.php index bf132e224..ffbea35d4 100644 --- a/src/Adyen/Model/BalancePlatform/SweepSchedule.php +++ b/src/Adyen/Model/BalancePlatform/SweepSchedule.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php b/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php index 626106254..f8be61e14 100644 --- a/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php +++ b/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TimeOfDay.php b/src/Adyen/Model/BalancePlatform/TimeOfDay.php index 3a56136a1..d4a6e566f 100644 --- a/src/Adyen/Model/BalancePlatform/TimeOfDay.php +++ b/src/Adyen/Model/BalancePlatform/TimeOfDay.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php b/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php index 1c47f0cc8..2237f5317 100644 --- a/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php b/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php index 754e4cb8a..7fa1a6713 100644 --- a/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRule.php b/src/Adyen/Model/BalancePlatform/TransactionRule.php index e43fd3b94..0e8b9f95e 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRule.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRule.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php b/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php index 6a9cf9e66..9252d99cb 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php b/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php index 6d9c1702a..7ab59cf4f 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php b/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php index 7af7f754e..3f832d0eb 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php b/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php index 9a252f1a7..39056765d 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index e4c005f8a..13f02509a 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php b/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php index 0a1f4a2b5..8af9753a7 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index f7ac9b9df..45d43dbb7 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php index d16303a25..755f3109a 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php index 74f39f20d..df4d6e3c4 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php b/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php index b26b034a1..83c1460b4 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php index 4bad25012..11a815ca1 100644 --- a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php index b17e284f8..16abfbe15 100644 --- a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php b/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php index 218c6ebfa..5a5689e2a 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php +++ b/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php index 15f69aa6b..93dbae0ab 100644 --- a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index f728eba4b..e403b7087 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/VerificationDeadline.php b/src/Adyen/Model/BalancePlatform/VerificationDeadline.php index 821f264fd..0c1152dee 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationDeadline.php +++ b/src/Adyen/Model/BalancePlatform/VerificationDeadline.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/VerificationError.php b/src/Adyen/Model/BalancePlatform/VerificationError.php index fa32d607d..5bf4ae7b7 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationError.php +++ b/src/Adyen/Model/BalancePlatform/VerificationError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php b/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php index c087d6b47..022023081 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php +++ b/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/Amount.php b/src/Adyen/Model/BinLookup/Amount.php index bcd742fda..eca0e656d 100644 --- a/src/Adyen/Model/BinLookup/Amount.php +++ b/src/Adyen/Model/BinLookup/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/BinDetail.php b/src/Adyen/Model/BinLookup/BinDetail.php index 59bf66a35..3b463c2bc 100644 --- a/src/Adyen/Model/BinLookup/BinDetail.php +++ b/src/Adyen/Model/BinLookup/BinDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/CardBin.php b/src/Adyen/Model/BinLookup/CardBin.php index aa37d4bd2..938310f90 100644 --- a/src/Adyen/Model/BinLookup/CardBin.php +++ b/src/Adyen/Model/BinLookup/CardBin.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php b/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php index 5f7d2ce77..609dbb314 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php +++ b/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/CostEstimateRequest.php b/src/Adyen/Model/BinLookup/CostEstimateRequest.php index 765ab300b..d29b4373b 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateRequest.php +++ b/src/Adyen/Model/BinLookup/CostEstimateRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/CostEstimateResponse.php b/src/Adyen/Model/BinLookup/CostEstimateResponse.php index 3e743edce..3b2e18fdd 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateResponse.php +++ b/src/Adyen/Model/BinLookup/CostEstimateResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 52c30a926..2499a4783 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/MerchantDetails.php b/src/Adyen/Model/BinLookup/MerchantDetails.php index 82a7a5633..ebcc5dd96 100644 --- a/src/Adyen/Model/BinLookup/MerchantDetails.php +++ b/src/Adyen/Model/BinLookup/MerchantDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/ModelInterface.php b/src/Adyen/Model/BinLookup/ModelInterface.php index 62b445071..8c6a41375 100644 --- a/src/Adyen/Model/BinLookup/ModelInterface.php +++ b/src/Adyen/Model/BinLookup/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 9ca7ca593..09437b7d8 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index a7bf98bdd..b480f9c44 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/ServiceError.php b/src/Adyen/Model/BinLookup/ServiceError.php index eda7c9771..36af9c8ba 100644 --- a/src/Adyen/Model/BinLookup/ServiceError.php +++ b/src/Adyen/Model/BinLookup/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php b/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php index fd4531787..3f1999520 100644 --- a/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php +++ b/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php index 48b8592b9..733c83bff 100644 --- a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php +++ b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php index 770acf282..c9d363cfb 100644 --- a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php +++ b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 54 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AccountInfo.php b/src/Adyen/Model/Checkout/AccountInfo.php index 706aef35d..1dfed679b 100644 --- a/src/Adyen/Model/Checkout/AccountInfo.php +++ b/src/Adyen/Model/Checkout/AccountInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AcctInfo.php b/src/Adyen/Model/Checkout/AcctInfo.php index e4c7f8261..a2f5c76b3 100644 --- a/src/Adyen/Model/Checkout/AcctInfo.php +++ b/src/Adyen/Model/Checkout/AcctInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index d76671d9a..4557c901d 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index 6820a19f8..03bc1bd65 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataAirline.php b/src/Adyen/Model/Checkout/AdditionalDataAirline.php index f9a2a0cd7..0377b28e8 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataAirline.php +++ b/src/Adyen/Model/Checkout/AdditionalDataAirline.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php index 46581be72..ac0f9d613 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataCommon.php b/src/Adyen/Model/Checkout/AdditionalDataCommon.php index c5a1daba4..ac0475271 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCommon.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index ef41a31d2..a382d6f7a 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataLodging.php b/src/Adyen/Model/Checkout/AdditionalDataLodging.php index 10c346cc3..5a0ea90a1 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLodging.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLodging.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php b/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php index 8a8c29dd0..ec258a967 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php +++ b/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataOpi.php b/src/Adyen/Model/Checkout/AdditionalDataOpi.php index 2db0d1d6f..d9891d229 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataOpi.php +++ b/src/Adyen/Model/Checkout/AdditionalDataOpi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRatepay.php b/src/Adyen/Model/Checkout/AdditionalDataRatepay.php index 8d7ce42e7..56677942c 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRatepay.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRatepay.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRetry.php b/src/Adyen/Model/Checkout/AdditionalDataRetry.php index 5060355af..0e82b6a7d 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRetry.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRetry.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRisk.php b/src/Adyen/Model/Checkout/AdditionalDataRisk.php index 423796d69..c0901c440 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRisk.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRisk.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php b/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php index 612b2ddd8..e044f870b 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php index 6f5c8cdb7..f3dad0dad 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php index 7ee94ef05..af5bfbebc 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AdditionalDataWallets.php b/src/Adyen/Model/Checkout/AdditionalDataWallets.php index 52c553276..2ddbf6995 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataWallets.php +++ b/src/Adyen/Model/Checkout/AdditionalDataWallets.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Address.php b/src/Adyen/Model/Checkout/Address.php index 319a35e6e..c1949a378 100644 --- a/src/Adyen/Model/Checkout/Address.php +++ b/src/Adyen/Model/Checkout/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index 9e4634e00..be27ce340 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AmazonPayDetails.php b/src/Adyen/Model/Checkout/AmazonPayDetails.php index 20cad0c7f..f79fa037a 100644 --- a/src/Adyen/Model/Checkout/AmazonPayDetails.php +++ b/src/Adyen/Model/Checkout/AmazonPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Amount.php b/src/Adyen/Model/Checkout/Amount.php index dd41d2056..b069e038f 100644 --- a/src/Adyen/Model/Checkout/Amount.php +++ b/src/Adyen/Model/Checkout/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AndroidPayDetails.php b/src/Adyen/Model/Checkout/AndroidPayDetails.php index 0d8a98089..98fef1a2b 100644 --- a/src/Adyen/Model/Checkout/AndroidPayDetails.php +++ b/src/Adyen/Model/Checkout/AndroidPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index 9cf96a163..0a390ecc6 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplePaySessionRequest.php b/src/Adyen/Model/Checkout/ApplePaySessionRequest.php index b0c9bfc7a..b2eb387ba 100644 --- a/src/Adyen/Model/Checkout/ApplePaySessionRequest.php +++ b/src/Adyen/Model/Checkout/ApplePaySessionRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplePaySessionResponse.php b/src/Adyen/Model/Checkout/ApplePaySessionResponse.php index 096115eb0..3edcd83dd 100644 --- a/src/Adyen/Model/Checkout/ApplePaySessionResponse.php +++ b/src/Adyen/Model/Checkout/ApplePaySessionResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ApplicationInfo.php b/src/Adyen/Model/Checkout/ApplicationInfo.php index 718886c97..8caca5b79 100644 --- a/src/Adyen/Model/Checkout/ApplicationInfo.php +++ b/src/Adyen/Model/Checkout/ApplicationInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/AuthenticationData.php b/src/Adyen/Model/Checkout/AuthenticationData.php index 4c7027a8d..470fc04fd 100644 --- a/src/Adyen/Model/Checkout/AuthenticationData.php +++ b/src/Adyen/Model/Checkout/AuthenticationData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Avs.php b/src/Adyen/Model/Checkout/Avs.php index 5fcf2dacb..a19609fd6 100644 --- a/src/Adyen/Model/Checkout/Avs.php +++ b/src/Adyen/Model/Checkout/Avs.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index c1ec35741..b41f808ed 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index 599a485a8..01f8f6d3d 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BalanceCheckResponse.php b/src/Adyen/Model/Checkout/BalanceCheckResponse.php index cb54f6e1b..f6e9a3722 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckResponse.php +++ b/src/Adyen/Model/Checkout/BalanceCheckResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BankAccount.php b/src/Adyen/Model/Checkout/BankAccount.php index 1a3cc3e5c..01a3f510f 100644 --- a/src/Adyen/Model/Checkout/BankAccount.php +++ b/src/Adyen/Model/Checkout/BankAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BillDeskDetails.php b/src/Adyen/Model/Checkout/BillDeskDetails.php index e5b94af6a..b94921dfe 100644 --- a/src/Adyen/Model/Checkout/BillDeskDetails.php +++ b/src/Adyen/Model/Checkout/BillDeskDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BillingAddress.php b/src/Adyen/Model/Checkout/BillingAddress.php index a6e3c3cce..a060c1e20 100644 --- a/src/Adyen/Model/Checkout/BillingAddress.php +++ b/src/Adyen/Model/Checkout/BillingAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BlikDetails.php b/src/Adyen/Model/Checkout/BlikDetails.php index 26e91d75b..635e73ef7 100644 --- a/src/Adyen/Model/Checkout/BlikDetails.php +++ b/src/Adyen/Model/Checkout/BlikDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/BrowserInfo.php b/src/Adyen/Model/Checkout/BrowserInfo.php index b6cef3e06..bf69ebe29 100644 --- a/src/Adyen/Model/Checkout/BrowserInfo.php +++ b/src/Adyen/Model/Checkout/BrowserInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CancelOrderRequest.php b/src/Adyen/Model/Checkout/CancelOrderRequest.php index 6aa4f5fec..1f1ece2aa 100644 --- a/src/Adyen/Model/Checkout/CancelOrderRequest.php +++ b/src/Adyen/Model/Checkout/CancelOrderRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CancelOrderResponse.php b/src/Adyen/Model/Checkout/CancelOrderResponse.php index 76a1a6662..57dd3143f 100644 --- a/src/Adyen/Model/Checkout/CancelOrderResponse.php +++ b/src/Adyen/Model/Checkout/CancelOrderResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Card.php b/src/Adyen/Model/Checkout/Card.php index aba06c6b7..2c7659fa2 100644 --- a/src/Adyen/Model/Checkout/Card.php +++ b/src/Adyen/Model/Checkout/Card.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardBrandDetails.php b/src/Adyen/Model/Checkout/CardBrandDetails.php index 9ea153813..114393cec 100644 --- a/src/Adyen/Model/Checkout/CardBrandDetails.php +++ b/src/Adyen/Model/Checkout/CardBrandDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 2ec7a7274..88e177299 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardDetailsRequest.php b/src/Adyen/Model/Checkout/CardDetailsRequest.php index 15524d64e..1d50f1559 100644 --- a/src/Adyen/Model/Checkout/CardDetailsRequest.php +++ b/src/Adyen/Model/Checkout/CardDetailsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CardDetailsResponse.php b/src/Adyen/Model/Checkout/CardDetailsResponse.php index c1ff06287..cc6c71a1f 100644 --- a/src/Adyen/Model/Checkout/CardDetailsResponse.php +++ b/src/Adyen/Model/Checkout/CardDetailsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CellulantDetails.php b/src/Adyen/Model/Checkout/CellulantDetails.php index 218342c67..790177290 100644 --- a/src/Adyen/Model/Checkout/CellulantDetails.php +++ b/src/Adyen/Model/Checkout/CellulantDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php index 5a1afd4a5..699701044 100644 --- a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php +++ b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php index 38b7dbf34..5561764ac 100644 --- a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php +++ b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php b/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php index 609f01bfc..62fe8cf5e 100644 --- a/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php +++ b/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutOrderResponse.php b/src/Adyen/Model/Checkout/CheckoutOrderResponse.php index 2946f527a..9f869297e 100644 --- a/src/Adyen/Model/Checkout/CheckoutOrderResponse.php +++ b/src/Adyen/Model/Checkout/CheckoutOrderResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 3014e4214..2bf4dff4f 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -1644,7 +1644,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1671,7 +1671,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php index 1d1daf3b7..3d1639d9f 100644 --- a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php +++ b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutRedirectAction.php b/src/Adyen/Model/Checkout/CheckoutRedirectAction.php index 4d4483a52..c3fd6f4fe 100644 --- a/src/Adyen/Model/Checkout/CheckoutRedirectAction.php +++ b/src/Adyen/Model/Checkout/CheckoutRedirectAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutSDKAction.php b/src/Adyen/Model/Checkout/CheckoutSDKAction.php index 5516c3425..30c89c85c 100644 --- a/src/Adyen/Model/Checkout/CheckoutSDKAction.php +++ b/src/Adyen/Model/Checkout/CheckoutSDKAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php b/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php index d17175a63..0a17d2f4b 100644 --- a/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php +++ b/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php index fd842145e..baf01352e 100644 --- a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php +++ b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php index 474c89f38..417f5f7f4 100644 --- a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php +++ b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CommonField.php b/src/Adyen/Model/Checkout/CommonField.php index 40b106866..3ef6a90f7 100644 --- a/src/Adyen/Model/Checkout/CommonField.php +++ b/src/Adyen/Model/Checkout/CommonField.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Company.php b/src/Adyen/Model/Checkout/Company.php index d9c1dbed7..553a01ca5 100644 --- a/src/Adyen/Model/Checkout/Company.php +++ b/src/Adyen/Model/Checkout/Company.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Configuration.php b/src/Adyen/Model/Checkout/Configuration.php index acd853e6d..b7aae8cd0 100644 --- a/src/Adyen/Model/Checkout/Configuration.php +++ b/src/Adyen/Model/Checkout/Configuration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index 019ecab87..f578763a9 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -2358,7 +2358,7 @@ public function getThemeId() /** * Sets themeId * - * @param string|null $themeId Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + * @param string|null $themeId Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 654c205d3..8fc838f79 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -2439,7 +2439,7 @@ public function getThemeId() /** * Sets themeId * - * @param string|null $themeId Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + * @param string|null $themeId Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateOrderRequest.php b/src/Adyen/Model/Checkout/CreateOrderRequest.php index 829393a4d..a4f0cb2ab 100644 --- a/src/Adyen/Model/Checkout/CreateOrderRequest.php +++ b/src/Adyen/Model/Checkout/CreateOrderRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/CreateOrderResponse.php b/src/Adyen/Model/Checkout/CreateOrderResponse.php index 0db7824ba..277237313 100644 --- a/src/Adyen/Model/Checkout/CreateOrderResponse.php +++ b/src/Adyen/Model/Checkout/CreateOrderResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DeliveryAddress.php b/src/Adyen/Model/Checkout/DeliveryAddress.php index f7d24133a..144917909 100644 --- a/src/Adyen/Model/Checkout/DeliveryAddress.php +++ b/src/Adyen/Model/Checkout/DeliveryAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php index b926ff170..c0be6578a 100644 --- a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php +++ b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DeviceRenderOptions.php b/src/Adyen/Model/Checkout/DeviceRenderOptions.php index 8d13b7700..1e8146f0b 100644 --- a/src/Adyen/Model/Checkout/DeviceRenderOptions.php +++ b/src/Adyen/Model/Checkout/DeviceRenderOptions.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DokuDetails.php b/src/Adyen/Model/Checkout/DokuDetails.php index c7713317d..2a6e428c7 100644 --- a/src/Adyen/Model/Checkout/DokuDetails.php +++ b/src/Adyen/Model/Checkout/DokuDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index 9adb16267..03d339ae5 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 6ed687297..4a24b2f8d 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -603,9 +603,6 @@ public function listInvalidProperties() ); } - if ($this->container['donationAccount'] === null) { - $invalidProperties[] = "'donationAccount' can't be null"; - } if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -1071,7 +1068,7 @@ public function setDeviceFingerprint($deviceFingerprint) /** * Gets donationAccount * - * @return string + * @return string|null */ public function getDonationAccount() { @@ -1081,7 +1078,7 @@ public function getDonationAccount() /** * Sets donationAccount * - * @param string $donationAccount Donation account to which the transaction is credited. + * @param string|null $donationAccount Donation account to which the transaction is credited. * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentResponse.php b/src/Adyen/Model/Checkout/DonationPaymentResponse.php index 0ed91010c..749d65837 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentResponse.php +++ b/src/Adyen/Model/Checkout/DonationPaymentResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DotpayDetails.php b/src/Adyen/Model/Checkout/DotpayDetails.php index 7fc3c7bae..e9164300b 100644 --- a/src/Adyen/Model/Checkout/DotpayDetails.php +++ b/src/Adyen/Model/Checkout/DotpayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/DragonpayDetails.php b/src/Adyen/Model/Checkout/DragonpayDetails.php index f795c17db..82316fe45 100644 --- a/src/Adyen/Model/Checkout/DragonpayDetails.php +++ b/src/Adyen/Model/Checkout/DragonpayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php index 3afc1c385..6a690c8c9 100644 --- a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php +++ b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/EncryptedOrderData.php b/src/Adyen/Model/Checkout/EncryptedOrderData.php index a0d2dfbfb..004257872 100644 --- a/src/Adyen/Model/Checkout/EncryptedOrderData.php +++ b/src/Adyen/Model/Checkout/EncryptedOrderData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ExternalPlatform.php b/src/Adyen/Model/Checkout/ExternalPlatform.php index 283276919..a87f8391f 100644 --- a/src/Adyen/Model/Checkout/ExternalPlatform.php +++ b/src/Adyen/Model/Checkout/ExternalPlatform.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ForexQuote.php b/src/Adyen/Model/Checkout/ForexQuote.php index 87577ad45..17f4e62d6 100644 --- a/src/Adyen/Model/Checkout/ForexQuote.php +++ b/src/Adyen/Model/Checkout/ForexQuote.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FraudCheckResult.php b/src/Adyen/Model/Checkout/FraudCheckResult.php index 265c57b35..d743ad334 100644 --- a/src/Adyen/Model/Checkout/FraudCheckResult.php +++ b/src/Adyen/Model/Checkout/FraudCheckResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FraudResult.php b/src/Adyen/Model/Checkout/FraudResult.php index b23ed4dfd..e21cf0279 100644 --- a/src/Adyen/Model/Checkout/FraudResult.php +++ b/src/Adyen/Model/Checkout/FraudResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FundOrigin.php b/src/Adyen/Model/Checkout/FundOrigin.php index d82127fb5..64280a585 100644 --- a/src/Adyen/Model/Checkout/FundOrigin.php +++ b/src/Adyen/Model/Checkout/FundOrigin.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/FundRecipient.php b/src/Adyen/Model/Checkout/FundRecipient.php index ab2664de4..6354f61a1 100644 --- a/src/Adyen/Model/Checkout/FundRecipient.php +++ b/src/Adyen/Model/Checkout/FundRecipient.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php index c819d7d9f..0568f60b1 100644 --- a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/GiropayDetails.php b/src/Adyen/Model/Checkout/GiropayDetails.php index 25cef0437..6a369f01a 100644 --- a/src/Adyen/Model/Checkout/GiropayDetails.php +++ b/src/Adyen/Model/Checkout/GiropayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index 1d99626dd..accd43fae 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index 6926cf79c..0b35c439d 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/InputDetail.php b/src/Adyen/Model/Checkout/InputDetail.php index fa77258d0..2a9f71bee 100644 --- a/src/Adyen/Model/Checkout/InputDetail.php +++ b/src/Adyen/Model/Checkout/InputDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/InstallmentOption.php b/src/Adyen/Model/Checkout/InstallmentOption.php index ea065932b..d0915e04d 100644 --- a/src/Adyen/Model/Checkout/InstallmentOption.php +++ b/src/Adyen/Model/Checkout/InstallmentOption.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Installments.php b/src/Adyen/Model/Checkout/Installments.php index 6136c947b..9742f80c0 100644 --- a/src/Adyen/Model/Checkout/Installments.php +++ b/src/Adyen/Model/Checkout/Installments.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/InstallmentsNumber.php b/src/Adyen/Model/Checkout/InstallmentsNumber.php index 38245fb37..33d210608 100644 --- a/src/Adyen/Model/Checkout/InstallmentsNumber.php +++ b/src/Adyen/Model/Checkout/InstallmentsNumber.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Item.php b/src/Adyen/Model/Checkout/Item.php index 2b92a46b4..3693d15e9 100644 --- a/src/Adyen/Model/Checkout/Item.php +++ b/src/Adyen/Model/Checkout/Item.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 7fe4e2d8a..81dc81d46 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/LineItem.php b/src/Adyen/Model/Checkout/LineItem.php index ea9bce2f8..ef80aa933 100644 --- a/src/Adyen/Model/Checkout/LineItem.php +++ b/src/Adyen/Model/Checkout/LineItem.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php b/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php index ada358aae..88214bb72 100644 --- a/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php +++ b/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Mandate.php b/src/Adyen/Model/Checkout/Mandate.php index 9e19599be..70a646ddf 100644 --- a/src/Adyen/Model/Checkout/Mandate.php +++ b/src/Adyen/Model/Checkout/Mandate.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index 40bfbcfef..02e2cd876 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index 3ee8c045d..a63457b23 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -364,7 +364,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -391,7 +391,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MerchantDevice.php b/src/Adyen/Model/Checkout/MerchantDevice.php index 42793e929..a471e76dd 100644 --- a/src/Adyen/Model/Checkout/MerchantDevice.php +++ b/src/Adyen/Model/Checkout/MerchantDevice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php index 793b15ce4..17ad8213b 100644 --- a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MobilePayDetails.php b/src/Adyen/Model/Checkout/MobilePayDetails.php index a00b9d54b..f17a736c8 100644 --- a/src/Adyen/Model/Checkout/MobilePayDetails.php +++ b/src/Adyen/Model/Checkout/MobilePayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ModelInterface.php b/src/Adyen/Model/Checkout/ModelInterface.php index 661c821be..db5493a75 100644 --- a/src/Adyen/Model/Checkout/ModelInterface.php +++ b/src/Adyen/Model/Checkout/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/MolPayDetails.php b/src/Adyen/Model/Checkout/MolPayDetails.php index bb50be1c4..041e740f6 100644 --- a/src/Adyen/Model/Checkout/MolPayDetails.php +++ b/src/Adyen/Model/Checkout/MolPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Name.php b/src/Adyen/Model/Checkout/Name.php index b4bcdd2bd..35c27d373 100644 --- a/src/Adyen/Model/Checkout/Name.php +++ b/src/Adyen/Model/Checkout/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 29dd654c7..628f63adc 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index efbb7c144..0d4e5c822 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index d15a46ebc..f8de39edc 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index 64c309842..1fbf215af 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index 9b8bcf98b..9417cc0cf 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php b/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php index 62a133fa5..7d1726b6d 100644 --- a/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php +++ b/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php b/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php index dc9051a3e..e2186c8f4 100644 --- a/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php +++ b/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCancelRequest.php b/src/Adyen/Model/Checkout/PaymentCancelRequest.php index 51bdd5da6..5aa0b1c67 100644 --- a/src/Adyen/Model/Checkout/PaymentCancelRequest.php +++ b/src/Adyen/Model/Checkout/PaymentCancelRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCancelResponse.php b/src/Adyen/Model/Checkout/PaymentCancelResponse.php index a38995416..1e2666baa 100644 --- a/src/Adyen/Model/Checkout/PaymentCancelResponse.php +++ b/src/Adyen/Model/Checkout/PaymentCancelResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCaptureRequest.php b/src/Adyen/Model/Checkout/PaymentCaptureRequest.php index 73f605141..3881d1ab3 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureRequest.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCaptureResponse.php b/src/Adyen/Model/Checkout/PaymentCaptureResponse.php index ce142575e..7636d83c8 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureResponse.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php index 619d151ac..22e27e134 100644 --- a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php +++ b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 1ca42e366..262007e52 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php index e06b80e40..a406b54ef 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php index da3648270..19ea4eede 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index 444921400..d60de2330 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index d8ab13e20..249c5a074 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethod.php b/src/Adyen/Model/Checkout/PaymentMethod.php index 8383fc671..3b50f8f0b 100644 --- a/src/Adyen/Model/Checkout/PaymentMethod.php +++ b/src/Adyen/Model/Checkout/PaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethodGroup.php b/src/Adyen/Model/Checkout/PaymentMethodGroup.php index ffa67663b..280b61468 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodGroup.php +++ b/src/Adyen/Model/Checkout/PaymentMethodGroup.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php index 93cb2de32..276c3ccde 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php +++ b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index 941f23372..16894706d 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentMethodsResponse.php b/src/Adyen/Model/Checkout/PaymentMethodsResponse.php index 7b42cbf8c..d730b69b2 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentRefundRequest.php b/src/Adyen/Model/Checkout/PaymentRefundRequest.php index ea1c28f65..ca30a1797 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRefundRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -50,7 +50,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', 'reference' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]' + 'splits' => '\Adyen\Model\Checkout\Split[]', + 'store' => 'string' ]; /** @@ -67,7 +68,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => null, 'merchantRefundReason' => null, 'reference' => null, - 'splits' => null + 'splits' => null, + 'store' => null ]; /** @@ -82,7 +84,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => false, 'merchantRefundReason' => false, 'reference' => false, - 'splits' => false + 'splits' => false, + 'store' => false ]; /** @@ -177,7 +180,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', 'reference' => 'reference', - 'splits' => 'splits' + 'splits' => 'splits', + 'store' => 'store' ]; /** @@ -192,7 +196,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', 'reference' => 'setReference', - 'splits' => 'setSplits' + 'splits' => 'setSplits', + 'store' => 'setStore' ]; /** @@ -207,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', 'reference' => 'getReference', - 'splits' => 'getSplits' + 'splits' => 'getSplits', + 'store' => 'getStore' ]; /** @@ -294,6 +300,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantRefundReason', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); } /** @@ -551,6 +558,33 @@ public function setSplits($splits) return $this; } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/PaymentRefundResponse.php b/src/Adyen/Model/Checkout/PaymentRefundResponse.php index b5864a2b7..8ee8287c7 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundResponse.php +++ b/src/Adyen/Model/Checkout/PaymentRefundResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -52,7 +52,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => 'string', 'reference' => 'string', 'splits' => '\Adyen\Model\Checkout\Split[]', - 'status' => 'string' + 'status' => 'string', + 'store' => 'string' ]; /** @@ -71,7 +72,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => null, 'reference' => null, 'splits' => null, - 'status' => null + 'status' => null, + 'store' => null ]; /** @@ -88,7 +90,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => false, 'reference' => false, 'splits' => false, - 'status' => false + 'status' => false, + 'store' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'pspReference', 'reference' => 'reference', 'splits' => 'splits', - 'status' => 'status' + 'status' => 'status', + 'store' => 'store' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'setPspReference', 'reference' => 'setReference', 'splits' => 'setSplits', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'store' => 'setStore' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'getPspReference', 'reference' => 'getReference', 'splits' => 'getSplits', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'store' => 'getStore' ]; /** @@ -320,6 +326,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); } /** @@ -659,6 +666,33 @@ public function setStatus($status) return $this; } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index bd1cb6d36..333505083 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentResponse.php b/src/Adyen/Model/Checkout/PaymentResponse.php index 95040ec4f..f9d609857 100644 --- a/src/Adyen/Model/Checkout/PaymentResponse.php +++ b/src/Adyen/Model/Checkout/PaymentResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index b525811d0..4144d958f 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentReversalRequest.php b/src/Adyen/Model/Checkout/PaymentReversalRequest.php index 484b98273..10e3784f7 100644 --- a/src/Adyen/Model/Checkout/PaymentReversalRequest.php +++ b/src/Adyen/Model/Checkout/PaymentReversalRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentReversalResponse.php b/src/Adyen/Model/Checkout/PaymentReversalResponse.php index 0a2953c0d..739c95bb1 100644 --- a/src/Adyen/Model/Checkout/PaymentReversalResponse.php +++ b/src/Adyen/Model/Checkout/PaymentReversalResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index bb6f5edb6..5e6c0651f 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentSetupResponse.php b/src/Adyen/Model/Checkout/PaymentSetupResponse.php index 2cae7555a..08c7a7f98 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupResponse.php +++ b/src/Adyen/Model/Checkout/PaymentSetupResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentVerificationRequest.php b/src/Adyen/Model/Checkout/PaymentVerificationRequest.php index 8db20e3f9..cbe96d346 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationRequest.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php index 7a69124b8..a994362ab 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Phone.php b/src/Adyen/Model/Checkout/Phone.php index 67d26bd86..eeb8d2285 100644 --- a/src/Adyen/Model/Checkout/Phone.php +++ b/src/Adyen/Model/Checkout/Phone.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php index 530eb5a3b..dacd4a0dc 100644 --- a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index 29055bb4b..3a8b555dc 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Recurring.php b/src/Adyen/Model/Checkout/Recurring.php index 2a06af608..328a7a9ab 100644 --- a/src/Adyen/Model/Checkout/Recurring.php +++ b/src/Adyen/Model/Checkout/Recurring.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/RecurringDetail.php b/src/Adyen/Model/Checkout/RecurringDetail.php index b70fa2cb1..c0ee39c27 100644 --- a/src/Adyen/Model/Checkout/RecurringDetail.php +++ b/src/Adyen/Model/Checkout/RecurringDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php index 1b3bbfb9e..de3819532 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php index 7ea9ef74e..c232d9429 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php index 953154f5e..3c48d808b 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index a17aa34dd..2886cd81e 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php index fbb874a20..da93220ef 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php index 02e20aa68..06e41418e 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php index acf76b612..25d59b246 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php index 40fa6e552..a57145226 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php index 195220692..85229db88 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ResponsePaymentMethod.php b/src/Adyen/Model/Checkout/ResponsePaymentMethod.php index e0e0787f1..8715daa60 100644 --- a/src/Adyen/Model/Checkout/ResponsePaymentMethod.php +++ b/src/Adyen/Model/Checkout/ResponsePaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/RiskData.php b/src/Adyen/Model/Checkout/RiskData.php index f04428c92..ead5c8043 100644 --- a/src/Adyen/Model/Checkout/RiskData.php +++ b/src/Adyen/Model/Checkout/RiskData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SDKEphemPubKey.php b/src/Adyen/Model/Checkout/SDKEphemPubKey.php index d02c3754d..2057aca7b 100644 --- a/src/Adyen/Model/Checkout/SDKEphemPubKey.php +++ b/src/Adyen/Model/Checkout/SDKEphemPubKey.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index 7e6a0f0e0..cdf52312e 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index c358ea30a..53c8fd73f 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ServiceError.php b/src/Adyen/Model/Checkout/ServiceError.php index 50c56f697..0f3fa0073 100644 --- a/src/Adyen/Model/Checkout/ServiceError.php +++ b/src/Adyen/Model/Checkout/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ServiceErrorDetails.php b/src/Adyen/Model/Checkout/ServiceErrorDetails.php index b046de338..abc2a8ae2 100644 --- a/src/Adyen/Model/Checkout/ServiceErrorDetails.php +++ b/src/Adyen/Model/Checkout/ServiceErrorDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SessionResultResponse.php b/src/Adyen/Model/Checkout/SessionResultResponse.php index 8d195dea2..4afaec630 100644 --- a/src/Adyen/Model/Checkout/SessionResultResponse.php +++ b/src/Adyen/Model/Checkout/SessionResultResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ShopperInput.php b/src/Adyen/Model/Checkout/ShopperInput.php index e9a6dffcb..17402b321 100644 --- a/src/Adyen/Model/Checkout/ShopperInput.php +++ b/src/Adyen/Model/Checkout/ShopperInput.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ShopperInteractionDevice.php b/src/Adyen/Model/Checkout/ShopperInteractionDevice.php index 999901d36..bc4286b6d 100644 --- a/src/Adyen/Model/Checkout/ShopperInteractionDevice.php +++ b/src/Adyen/Model/Checkout/ShopperInteractionDevice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/Split.php b/src/Adyen/Model/Checkout/Split.php index 55cb16b5f..6bfdf3111 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SplitAmount.php b/src/Adyen/Model/Checkout/SplitAmount.php index 614eedfa8..b9ae9ea03 100644 --- a/src/Adyen/Model/Checkout/SplitAmount.php +++ b/src/Adyen/Model/Checkout/SplitAmount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php b/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php index 1041ed8e2..60d65f325 100644 --- a/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php +++ b/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php b/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php index d6f9286ee..5b8b65e76 100644 --- a/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php +++ b/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StoredDetails.php b/src/Adyen/Model/Checkout/StoredDetails.php index 9ab6ce8d1..ba44eedbb 100644 --- a/src/Adyen/Model/Checkout/StoredDetails.php +++ b/src/Adyen/Model/Checkout/StoredDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethod.php b/src/Adyen/Model/Checkout/StoredPaymentMethod.php index e81aabbca..f7c314443 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethod.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -44,12 +44,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankLocationId' => 'string', 'brand' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', 'holderName' => 'string', 'iban' => 'string', 'id' => 'string', + 'label' => 'string', 'lastFour' => 'string', 'name' => 'string', 'networkTxReference' => 'string', @@ -68,12 +71,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ + 'bankAccountNumber' => null, + 'bankLocationId' => null, 'brand' => null, 'expiryMonth' => null, 'expiryYear' => null, 'holderName' => null, 'iban' => null, 'id' => null, + 'label' => null, 'lastFour' => null, 'name' => null, 'networkTxReference' => null, @@ -90,12 +96,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankLocationId' => false, 'brand' => false, 'expiryMonth' => false, 'expiryYear' => false, 'holderName' => false, 'iban' => false, 'id' => false, + 'label' => false, 'lastFour' => false, 'name' => false, 'networkTxReference' => false, @@ -192,12 +201,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankLocationId' => 'bankLocationId', 'brand' => 'brand', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', 'holderName' => 'holderName', 'iban' => 'iban', 'id' => 'id', + 'label' => 'label', 'lastFour' => 'lastFour', 'name' => 'name', 'networkTxReference' => 'networkTxReference', @@ -214,12 +226,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankLocationId' => 'setBankLocationId', 'brand' => 'setBrand', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', 'holderName' => 'setHolderName', 'iban' => 'setIban', 'id' => 'setId', + 'label' => 'setLabel', 'lastFour' => 'setLastFour', 'name' => 'setName', 'networkTxReference' => 'setNetworkTxReference', @@ -236,12 +251,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankLocationId' => 'getBankLocationId', 'brand' => 'getBrand', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', 'holderName' => 'getHolderName', 'iban' => 'getIban', 'id' => 'getId', + 'label' => 'getLabel', 'lastFour' => 'getLastFour', 'name' => 'getName', 'networkTxReference' => 'getNetworkTxReference', @@ -309,12 +327,15 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); $this->setIfExists('lastFour', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('networkTxReference', $data ?? [], null); @@ -367,6 +388,60 @@ public function valid() } + /** + * Gets bankAccountNumber + * + * @return string|null + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string|null $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + if (is_null($bankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); + } + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The location id of the bank. The field value is `nil` in most cases. + * + * @return self + */ + public function setBankLocationId($bankLocationId) + { + if (is_null($bankLocationId)) { + throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + } + $this->container['bankLocationId'] = $bankLocationId; + + return $this; + } + /** * Gets brand * @@ -529,6 +604,33 @@ public function setId($id) return $this; } + /** + * Gets label + * + * @return string|null + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label The shopper’s issuer account label + * + * @return self + */ + public function setLabel($label) + { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** * Gets lastFour * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index 78fa167e6..e6af578de 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php index 81b16d608..f3e8776d3 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SubInputDetail.php b/src/Adyen/Model/Checkout/SubInputDetail.php index f8157f0e6..fca20edfc 100644 --- a/src/Adyen/Model/Checkout/SubInputDetail.php +++ b/src/Adyen/Model/Checkout/SubInputDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SubMerchant.php b/src/Adyen/Model/Checkout/SubMerchant.php index 597741329..8c8573dd9 100644 --- a/src/Adyen/Model/Checkout/SubMerchant.php +++ b/src/Adyen/Model/Checkout/SubMerchant.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/SubMerchantInfo.php b/src/Adyen/Model/Checkout/SubMerchantInfo.php index b8cd02f02..39388a3f9 100644 --- a/src/Adyen/Model/Checkout/SubMerchantInfo.php +++ b/src/Adyen/Model/Checkout/SubMerchantInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index ff669ce11..358fe278b 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php index e86012fd4..9227c8ff7 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php b/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php index f96bd05b2..3be9cf846 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDS2Result.php b/src/Adyen/Model/Checkout/ThreeDS2Result.php index 73605f2f7..16b89965a 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2Result.php +++ b/src/Adyen/Model/Checkout/ThreeDS2Result.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestData.php b/src/Adyen/Model/Checkout/ThreeDSRequestData.php index 235a986e1..60218dd46 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php b/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php index cca5df038..16c5ca5f7 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php b/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php index e32addd04..f4542cb1e 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ThreeDSecureData.php b/src/Adyen/Model/Checkout/ThreeDSecureData.php index dc727a165..92d359f3a 100644 --- a/src/Adyen/Model/Checkout/ThreeDSecureData.php +++ b/src/Adyen/Model/Checkout/ThreeDSecureData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php b/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php index 1e5b3087b..c964d9637 100644 --- a/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index 343cb1dcf..5f048c8d7 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index 476fd5e01..3c1b198b5 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UtilityRequest.php b/src/Adyen/Model/Checkout/UtilityRequest.php index 4efba11f8..251892a1c 100644 --- a/src/Adyen/Model/Checkout/UtilityRequest.php +++ b/src/Adyen/Model/Checkout/UtilityRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/UtilityResponse.php b/src/Adyen/Model/Checkout/UtilityResponse.php index b6d6d5bdf..327cdeb14 100644 --- a/src/Adyen/Model/Checkout/UtilityResponse.php +++ b/src/Adyen/Model/Checkout/UtilityResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index dce8cf45e..cd692465f 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -424,7 +424,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index 408f48499..098465adf 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/WeChatPayDetails.php b/src/Adyen/Model/Checkout/WeChatPayDetails.php index a124ec219..7d23fece0 100644 --- a/src/Adyen/Model/Checkout/WeChatPayDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index 04e0994ec..1ae26ab9a 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index 8b1bb8b39..25bd9c0b4 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/ConfigurationWebhook/AccountHolder.php b/src/Adyen/Model/ConfigurationWebhook/AccountHolder.php new file mode 100644 index 000000000..6f2497d4b --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/AccountHolder.php @@ -0,0 +1,835 @@ + + */ +class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountHolder'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'capabilities' => 'array', + 'contactDetails' => '\Adyen\Model\ConfigurationWebhook\ContactDetails', + 'description' => 'string', + 'id' => 'string', + 'legalEntityId' => 'string', + 'metadata' => 'array', + 'migratedAccountHolderCode' => 'string', + 'primaryBalanceAccount' => 'string', + 'reference' => 'string', + 'status' => 'string', + 'timeZone' => 'string', + 'verificationDeadlines' => '\Adyen\Model\ConfigurationWebhook\VerificationDeadline[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'capabilities' => null, + 'contactDetails' => null, + 'description' => null, + 'id' => null, + 'legalEntityId' => null, + 'metadata' => null, + 'migratedAccountHolderCode' => null, + 'primaryBalanceAccount' => null, + 'reference' => null, + 'status' => null, + 'timeZone' => null, + 'verificationDeadlines' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'capabilities' => false, + 'contactDetails' => false, + 'description' => false, + 'id' => false, + 'legalEntityId' => false, + 'metadata' => false, + 'migratedAccountHolderCode' => false, + 'primaryBalanceAccount' => false, + 'reference' => false, + 'status' => false, + 'timeZone' => false, + 'verificationDeadlines' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'capabilities' => 'capabilities', + 'contactDetails' => 'contactDetails', + 'description' => 'description', + 'id' => 'id', + 'legalEntityId' => 'legalEntityId', + 'metadata' => 'metadata', + 'migratedAccountHolderCode' => 'migratedAccountHolderCode', + 'primaryBalanceAccount' => 'primaryBalanceAccount', + 'reference' => 'reference', + 'status' => 'status', + 'timeZone' => 'timeZone', + 'verificationDeadlines' => 'verificationDeadlines' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'capabilities' => 'setCapabilities', + 'contactDetails' => 'setContactDetails', + 'description' => 'setDescription', + 'id' => 'setId', + 'legalEntityId' => 'setLegalEntityId', + 'metadata' => 'setMetadata', + 'migratedAccountHolderCode' => 'setMigratedAccountHolderCode', + 'primaryBalanceAccount' => 'setPrimaryBalanceAccount', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'timeZone' => 'setTimeZone', + 'verificationDeadlines' => 'setVerificationDeadlines' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'capabilities' => 'getCapabilities', + 'contactDetails' => 'getContactDetails', + 'description' => 'getDescription', + 'id' => 'getId', + 'legalEntityId' => 'getLegalEntityId', + 'metadata' => 'getMetadata', + 'migratedAccountHolderCode' => 'getMigratedAccountHolderCode', + 'primaryBalanceAccount' => 'getPrimaryBalanceAccount', + 'reference' => 'getReference', + 'status' => 'getStatus', + 'timeZone' => 'getTimeZone', + 'verificationDeadlines' => 'getVerificationDeadlines' + ]; + + /** + * 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_CLOSED = 'Closed'; + public const STATUS_INACTIVE = 'Inactive'; + public const STATUS_SUSPENDED = 'Suspended'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_CLOSED, + self::STATUS_INACTIVE, + self::STATUS_SUSPENDED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('capabilities', $data ?? [], null); + $this->setIfExists('contactDetails', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('legalEntityId', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('migratedAccountHolderCode', $data ?? [], null); + $this->setIfExists('primaryBalanceAccount', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('timeZone', $data ?? [], null); + $this->setIfExists('verificationDeadlines', $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['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['legalEntityId'] === null) { + $invalidProperties[] = "'legalEntityId' 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 balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets capabilities + * + * @return array|null + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param array|null $capabilities Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. + * + * @return self + */ + public function setCapabilities($capabilities) + { + if (is_null($capabilities)) { + throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); + } + $this->container['capabilities'] = $capabilities; + + return $this; + } + + /** + * Gets contactDetails + * + * @return \Adyen\Model\ConfigurationWebhook\ContactDetails|null + */ + public function getContactDetails() + { + return $this->container['contactDetails']; + } + + /** + * Sets contactDetails + * + * @param \Adyen\Model\ConfigurationWebhook\ContactDetails|null $contactDetails contactDetails + * + * @return self + */ + public function setContactDetails($contactDetails) + { + if (is_null($contactDetails)) { + throw new \InvalidArgumentException('non-nullable contactDetails cannot be null'); + } + $this->container['contactDetails'] = $contactDetails; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Your description for the account holder, maximum 300 characters. + * + * @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 id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the account holder. + * + * @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 legalEntityId + * + * @return string + */ + public function getLegalEntityId() + { + return $this->container['legalEntityId']; + } + + /** + * Sets legalEntityId + * + * @param string $legalEntityId The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. + * + * @return self + */ + public function setLegalEntityId($legalEntityId) + { + if (is_null($legalEntityId)) { + throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); + } + $this->container['legalEntityId'] = $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. 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 migratedAccountHolderCode + * + * @return string|null + */ + public function getMigratedAccountHolderCode() + { + return $this->container['migratedAccountHolderCode']; + } + + /** + * Sets migratedAccountHolderCode + * + * @param string|null $migratedAccountHolderCode The unique identifier of the migrated account holder in the classic integration. + * + * @return self + */ + public function setMigratedAccountHolderCode($migratedAccountHolderCode) + { + if (is_null($migratedAccountHolderCode)) { + throw new \InvalidArgumentException('non-nullable migratedAccountHolderCode cannot be null'); + } + $this->container['migratedAccountHolderCode'] = $migratedAccountHolderCode; + + return $this; + } + + /** + * Gets primaryBalanceAccount + * + * @return string|null + */ + public function getPrimaryBalanceAccount() + { + return $this->container['primaryBalanceAccount']; + } + + /** + * Sets primaryBalanceAccount + * + * @param string|null $primaryBalanceAccount The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. + * + * @return self + */ + public function setPrimaryBalanceAccount($primaryBalanceAccount) + { + if (is_null($primaryBalanceAccount)) { + throw new \InvalidArgumentException('non-nullable primaryBalanceAccount cannot be null'); + } + $this->container['primaryBalanceAccount'] = $primaryBalanceAccount; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the account holder, maximum 150 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the account holder. Possible values: * **Active**: The account holder is active. This is the default status when creating an account holder. * **Inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **Suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **Closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets timeZone + * + * @return string|null + */ + public function getTimeZone() + { + return $this->container['timeZone']; + } + + /** + * Sets timeZone + * + * @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 + */ + public function setTimeZone($timeZone) + { + if (is_null($timeZone)) { + throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); + } + $this->container['timeZone'] = $timeZone; + + return $this; + } + + /** + * Gets verificationDeadlines + * + * @return \Adyen\Model\ConfigurationWebhook\VerificationDeadline[]|null + */ + public function getVerificationDeadlines() + { + return $this->container['verificationDeadlines']; + } + + /** + * Sets verificationDeadlines + * + * @param \Adyen\Model\ConfigurationWebhook\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. + * + * @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/ConfigurationWebhook/AccountHolderCapability.php b/src/Adyen/Model/ConfigurationWebhook/AccountHolderCapability.php new file mode 100644 index 000000000..c94a43e2b --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/AccountHolderCapability.php @@ -0,0 +1,801 @@ + + */ +class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountHolderCapability'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'allowed' => 'bool', + 'allowedLevel' => 'string', + 'allowedSettings' => '\Adyen\Model\ConfigurationWebhook\CapabilitySettings', + 'enabled' => 'bool', + 'problems' => '\Adyen\Model\ConfigurationWebhook\CapabilityProblem[]', + 'requested' => 'bool', + 'requestedLevel' => 'string', + 'requestedSettings' => '\Adyen\Model\ConfigurationWebhook\CapabilitySettings', + 'transferInstruments' => '\Adyen\Model\ConfigurationWebhook\AccountSupportingEntityCapability[]', + 'verificationStatus' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'allowed' => null, + 'allowedLevel' => null, + 'allowedSettings' => null, + 'enabled' => null, + 'problems' => null, + 'requested' => null, + 'requestedLevel' => null, + 'requestedSettings' => null, + 'transferInstruments' => null, + 'verificationStatus' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'allowed' => false, + 'allowedLevel' => false, + 'allowedSettings' => false, + 'enabled' => false, + 'problems' => false, + 'requested' => false, + 'requestedLevel' => false, + 'requestedSettings' => false, + 'transferInstruments' => false, + 'verificationStatus' => 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 = [ + 'allowed' => 'allowed', + 'allowedLevel' => 'allowedLevel', + 'allowedSettings' => 'allowedSettings', + 'enabled' => 'enabled', + 'problems' => 'problems', + 'requested' => 'requested', + 'requestedLevel' => 'requestedLevel', + 'requestedSettings' => 'requestedSettings', + 'transferInstruments' => 'transferInstruments', + 'verificationStatus' => 'verificationStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'allowed' => 'setAllowed', + 'allowedLevel' => 'setAllowedLevel', + 'allowedSettings' => 'setAllowedSettings', + 'enabled' => 'setEnabled', + 'problems' => 'setProblems', + 'requested' => 'setRequested', + 'requestedLevel' => 'setRequestedLevel', + 'requestedSettings' => 'setRequestedSettings', + 'transferInstruments' => 'setTransferInstruments', + 'verificationStatus' => 'setVerificationStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'allowed' => 'getAllowed', + 'allowedLevel' => 'getAllowedLevel', + 'allowedSettings' => 'getAllowedSettings', + 'enabled' => 'getEnabled', + 'problems' => 'getProblems', + 'requested' => 'getRequested', + 'requestedLevel' => 'getRequestedLevel', + 'requestedSettings' => 'getRequestedSettings', + 'transferInstruments' => 'getTransferInstruments', + 'verificationStatus' => 'getVerificationStatus' + ]; + + /** + * 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 ALLOWED_LEVEL_HIGH = 'high'; + public const ALLOWED_LEVEL_LOW = 'low'; + public const ALLOWED_LEVEL_MEDIUM = 'medium'; + public const ALLOWED_LEVEL_NOT_APPLICABLE = 'notApplicable'; + public const REQUESTED_LEVEL_HIGH = 'high'; + public const REQUESTED_LEVEL_LOW = 'low'; + public const REQUESTED_LEVEL_MEDIUM = 'medium'; + public const REQUESTED_LEVEL_NOT_APPLICABLE = 'notApplicable'; + public const VERIFICATION_STATUS_INVALID = 'invalid'; + public const VERIFICATION_STATUS_PENDING = 'pending'; + public const VERIFICATION_STATUS_REJECTED = 'rejected'; + public const VERIFICATION_STATUS_VALID = 'valid'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAllowedLevelAllowableValues() + { + return [ + self::ALLOWED_LEVEL_HIGH, + self::ALLOWED_LEVEL_LOW, + self::ALLOWED_LEVEL_MEDIUM, + self::ALLOWED_LEVEL_NOT_APPLICABLE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRequestedLevelAllowableValues() + { + return [ + self::REQUESTED_LEVEL_HIGH, + self::REQUESTED_LEVEL_LOW, + self::REQUESTED_LEVEL_MEDIUM, + self::REQUESTED_LEVEL_NOT_APPLICABLE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVerificationStatusAllowableValues() + { + return [ + self::VERIFICATION_STATUS_INVALID, + self::VERIFICATION_STATUS_PENDING, + self::VERIFICATION_STATUS_REJECTED, + self::VERIFICATION_STATUS_VALID, + ]; + } + /** + * 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('allowed', $data ?? [], null); + $this->setIfExists('allowedLevel', $data ?? [], null); + $this->setIfExists('allowedSettings', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('problems', $data ?? [], null); + $this->setIfExists('requested', $data ?? [], null); + $this->setIfExists('requestedLevel', $data ?? [], null); + $this->setIfExists('requestedSettings', $data ?? [], null); + $this->setIfExists('transferInstruments', $data ?? [], null); + $this->setIfExists('verificationStatus', $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->getAllowedLevelAllowableValues(); + if (!is_null($this->container['allowedLevel']) && !in_array($this->container['allowedLevel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'allowedLevel', must be one of '%s'", + $this->container['allowedLevel'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getRequestedLevelAllowableValues(); + if (!is_null($this->container['requestedLevel']) && !in_array($this->container['requestedLevel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'requestedLevel', must be one of '%s'", + $this->container['requestedLevel'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!is_null($this->container['verificationStatus']) && !in_array($this->container['verificationStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'verificationStatus', must be one of '%s'", + $this->container['verificationStatus'], + 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 allowed + * + * @return bool|null + */ + public function getAllowed() + { + return $this->container['allowed']; + } + + /** + * Sets allowed + * + * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. + * + * @return self + */ + public function setAllowed($allowed) + { + if (is_null($allowed)) { + throw new \InvalidArgumentException('non-nullable allowed cannot be null'); + } + $this->container['allowed'] = $allowed; + + return $this; + } + + /** + * Gets allowedLevel + * + * @return string|null + */ + public function getAllowedLevel() + { + return $this->container['allowedLevel']; + } + + /** + * Sets allowedLevel + * + * @param string|null $allowedLevel The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. + * + * @return self + */ + public function setAllowedLevel($allowedLevel) + { + if (is_null($allowedLevel)) { + throw new \InvalidArgumentException('non-nullable allowedLevel cannot be null'); + } + $allowedValues = $this->getAllowedLevelAllowableValues(); + if (!in_array($allowedLevel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'allowedLevel', must be one of '%s'", + $allowedLevel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['allowedLevel'] = $allowedLevel; + + return $this; + } + + /** + * Gets allowedSettings + * + * @return \Adyen\Model\ConfigurationWebhook\CapabilitySettings|null + */ + public function getAllowedSettings() + { + return $this->container['allowedSettings']; + } + + /** + * Sets allowedSettings + * + * @param \Adyen\Model\ConfigurationWebhook\CapabilitySettings|null $allowedSettings allowedSettings + * + * @return self + */ + public function setAllowedSettings($allowedSettings) + { + if (is_null($allowedSettings)) { + throw new \InvalidArgumentException('non-nullable allowedSettings cannot be null'); + } + $this->container['allowedSettings'] = $allowedSettings; + + return $this; + } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. + * + * @return self + */ + public function setEnabled($enabled) + { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets problems + * + * @return \Adyen\Model\ConfigurationWebhook\CapabilityProblem[]|null + */ + public function getProblems() + { + return $this->container['problems']; + } + + /** + * Sets problems + * + * @param \Adyen\Model\ConfigurationWebhook\CapabilityProblem[]|null $problems Contains verification errors and the actions that you can take to resolve them. + * + * @return self + */ + public function setProblems($problems) + { + if (is_null($problems)) { + throw new \InvalidArgumentException('non-nullable problems cannot be null'); + } + $this->container['problems'] = $problems; + + return $this; + } + + /** + * Gets requested + * + * @return bool|null + */ + public function getRequested() + { + return $this->container['requested']; + } + + /** + * Sets requested + * + * @param bool|null $requested Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. + * + * @return self + */ + public function setRequested($requested) + { + if (is_null($requested)) { + throw new \InvalidArgumentException('non-nullable requested cannot be null'); + } + $this->container['requested'] = $requested; + + return $this; + } + + /** + * Gets requestedLevel + * + * @return string|null + */ + public function getRequestedLevel() + { + return $this->container['requestedLevel']; + } + + /** + * Sets requestedLevel + * + * @param string|null $requestedLevel The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. + * + * @return self + */ + public function setRequestedLevel($requestedLevel) + { + if (is_null($requestedLevel)) { + throw new \InvalidArgumentException('non-nullable requestedLevel cannot be null'); + } + $allowedValues = $this->getRequestedLevelAllowableValues(); + if (!in_array($requestedLevel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'requestedLevel', must be one of '%s'", + $requestedLevel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['requestedLevel'] = $requestedLevel; + + return $this; + } + + /** + * Gets requestedSettings + * + * @return \Adyen\Model\ConfigurationWebhook\CapabilitySettings|null + */ + public function getRequestedSettings() + { + return $this->container['requestedSettings']; + } + + /** + * Sets requestedSettings + * + * @param \Adyen\Model\ConfigurationWebhook\CapabilitySettings|null $requestedSettings requestedSettings + * + * @return self + */ + public function setRequestedSettings($requestedSettings) + { + if (is_null($requestedSettings)) { + throw new \InvalidArgumentException('non-nullable requestedSettings cannot be null'); + } + $this->container['requestedSettings'] = $requestedSettings; + + return $this; + } + + /** + * Gets transferInstruments + * + * @return \Adyen\Model\ConfigurationWebhook\AccountSupportingEntityCapability[]|null + */ + public function getTransferInstruments() + { + return $this->container['transferInstruments']; + } + + /** + * Sets transferInstruments + * + * @param \Adyen\Model\ConfigurationWebhook\AccountSupportingEntityCapability[]|null $transferInstruments Contains the status of the transfer instruments associated with this capability. + * + * @return self + */ + public function setTransferInstruments($transferInstruments) + { + if (is_null($transferInstruments)) { + throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); + } + $this->container['transferInstruments'] = $transferInstruments; + + return $this; + } + + /** + * Gets verificationStatus + * + * @return string|null + */ + public function getVerificationStatus() + { + return $this->container['verificationStatus']; + } + + /** + * Sets verificationStatus + * + * @param string|null $verificationStatus The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. + * + * @return self + */ + public function setVerificationStatus($verificationStatus) + { + if (is_null($verificationStatus)) { + throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); + } + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!in_array($verificationStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + $verificationStatus, + implode("', '", $allowedValues) + ) + ); + } + $this->container['verificationStatus'] = $verificationStatus; + + 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/ConfigurationWebhook/AccountHolderNotificationData.php b/src/Adyen/Model/ConfigurationWebhook/AccountHolderNotificationData.php new file mode 100644 index 000000000..942d4a5db --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/AccountHolderNotificationData.php @@ -0,0 +1,418 @@ + + */ +class AccountHolderNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountHolderNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\ConfigurationWebhook\AccountHolder', + 'balancePlatform' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'balancePlatform' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'balancePlatform' => 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 = [ + 'accountHolder' => 'accountHolder', + 'balancePlatform' => 'balancePlatform' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'balancePlatform' => 'setBalancePlatform' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'balancePlatform' => 'getBalancePlatform' + ]; + + /** + * 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('accountHolder', $data ?? [], null); + $this->setIfExists('balancePlatform', $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 accountHolder + * + * @return \Adyen\Model\ConfigurationWebhook\AccountHolder|null + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\ConfigurationWebhook\AccountHolder|null $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + if (is_null($accountHolder)) { + throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); + } + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + /** + * 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/ConfigurationWebhook/AccountHolderNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhook/AccountHolderNotificationRequest.php new file mode 100644 index 000000000..a12617306 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/AccountHolderNotificationRequest.php @@ -0,0 +1,494 @@ + + */ +class AccountHolderNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountHolderNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ConfigurationWebhook\AccountHolderNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_UPDATED = 'balancePlatform.accountHolder.updated'; + public const TYPE_CREATED = 'balancePlatform.accountHolder.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_UPDATED, + self::TYPE_CREATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ConfigurationWebhook\AccountHolderNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ConfigurationWebhook\AccountHolderNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/ConfigurationWebhook/AccountSupportingEntityCapability.php b/src/Adyen/Model/ConfigurationWebhook/AccountSupportingEntityCapability.php new file mode 100644 index 000000000..8656a9415 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/AccountSupportingEntityCapability.php @@ -0,0 +1,699 @@ + + */ +class AccountSupportingEntityCapability implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountSupportingEntityCapability'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'allowed' => 'bool', + 'allowedLevel' => 'string', + 'enabled' => 'bool', + 'id' => 'string', + 'requested' => 'bool', + 'requestedLevel' => 'string', + 'verificationStatus' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'allowed' => null, + 'allowedLevel' => null, + 'enabled' => null, + 'id' => null, + 'requested' => null, + 'requestedLevel' => null, + 'verificationStatus' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'allowed' => false, + 'allowedLevel' => false, + 'enabled' => false, + 'id' => false, + 'requested' => false, + 'requestedLevel' => false, + 'verificationStatus' => 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 = [ + 'allowed' => 'allowed', + 'allowedLevel' => 'allowedLevel', + 'enabled' => 'enabled', + 'id' => 'id', + 'requested' => 'requested', + 'requestedLevel' => 'requestedLevel', + 'verificationStatus' => 'verificationStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'allowed' => 'setAllowed', + 'allowedLevel' => 'setAllowedLevel', + 'enabled' => 'setEnabled', + 'id' => 'setId', + 'requested' => 'setRequested', + 'requestedLevel' => 'setRequestedLevel', + 'verificationStatus' => 'setVerificationStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'allowed' => 'getAllowed', + 'allowedLevel' => 'getAllowedLevel', + 'enabled' => 'getEnabled', + 'id' => 'getId', + 'requested' => 'getRequested', + 'requestedLevel' => 'getRequestedLevel', + 'verificationStatus' => 'getVerificationStatus' + ]; + + /** + * 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 ALLOWED_LEVEL_HIGH = 'high'; + public const ALLOWED_LEVEL_LOW = 'low'; + public const ALLOWED_LEVEL_MEDIUM = 'medium'; + public const ALLOWED_LEVEL_NOT_APPLICABLE = 'notApplicable'; + public const REQUESTED_LEVEL_HIGH = 'high'; + public const REQUESTED_LEVEL_LOW = 'low'; + public const REQUESTED_LEVEL_MEDIUM = 'medium'; + public const REQUESTED_LEVEL_NOT_APPLICABLE = 'notApplicable'; + public const VERIFICATION_STATUS_INVALID = 'invalid'; + public const VERIFICATION_STATUS_PENDING = 'pending'; + public const VERIFICATION_STATUS_REJECTED = 'rejected'; + public const VERIFICATION_STATUS_VALID = 'valid'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAllowedLevelAllowableValues() + { + return [ + self::ALLOWED_LEVEL_HIGH, + self::ALLOWED_LEVEL_LOW, + self::ALLOWED_LEVEL_MEDIUM, + self::ALLOWED_LEVEL_NOT_APPLICABLE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRequestedLevelAllowableValues() + { + return [ + self::REQUESTED_LEVEL_HIGH, + self::REQUESTED_LEVEL_LOW, + self::REQUESTED_LEVEL_MEDIUM, + self::REQUESTED_LEVEL_NOT_APPLICABLE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVerificationStatusAllowableValues() + { + return [ + self::VERIFICATION_STATUS_INVALID, + self::VERIFICATION_STATUS_PENDING, + self::VERIFICATION_STATUS_REJECTED, + self::VERIFICATION_STATUS_VALID, + ]; + } + /** + * 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('allowed', $data ?? [], null); + $this->setIfExists('allowedLevel', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('requested', $data ?? [], null); + $this->setIfExists('requestedLevel', $data ?? [], null); + $this->setIfExists('verificationStatus', $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->getAllowedLevelAllowableValues(); + if (!is_null($this->container['allowedLevel']) && !in_array($this->container['allowedLevel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'allowedLevel', must be one of '%s'", + $this->container['allowedLevel'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getRequestedLevelAllowableValues(); + if (!is_null($this->container['requestedLevel']) && !in_array($this->container['requestedLevel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'requestedLevel', must be one of '%s'", + $this->container['requestedLevel'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!is_null($this->container['verificationStatus']) && !in_array($this->container['verificationStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'verificationStatus', must be one of '%s'", + $this->container['verificationStatus'], + 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 allowed + * + * @return bool|null + */ + public function getAllowed() + { + return $this->container['allowed']; + } + + /** + * Sets allowed + * + * @param bool|null $allowed Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. + * + * @return self + */ + public function setAllowed($allowed) + { + if (is_null($allowed)) { + throw new \InvalidArgumentException('non-nullable allowed cannot be null'); + } + $this->container['allowed'] = $allowed; + + return $this; + } + + /** + * Gets allowedLevel + * + * @return string|null + */ + public function getAllowedLevel() + { + return $this->container['allowedLevel']; + } + + /** + * Sets allowedLevel + * + * @param string|null $allowedLevel The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. + * + * @return self + */ + public function setAllowedLevel($allowedLevel) + { + if (is_null($allowedLevel)) { + throw new \InvalidArgumentException('non-nullable allowedLevel cannot be null'); + } + $allowedValues = $this->getAllowedLevelAllowableValues(); + if (!in_array($allowedLevel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'allowedLevel', must be one of '%s'", + $allowedLevel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['allowedLevel'] = $allowedLevel; + + return $this; + } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. + * + * @return self + */ + public function setEnabled($enabled) + { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the supporting entity. + * + * @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 requested + * + * @return bool|null + */ + public function getRequested() + { + return $this->container['requested']; + } + + /** + * Sets requested + * + * @param bool|null $requested Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. + * + * @return self + */ + public function setRequested($requested) + { + if (is_null($requested)) { + throw new \InvalidArgumentException('non-nullable requested cannot be null'); + } + $this->container['requested'] = $requested; + + return $this; + } + + /** + * Gets requestedLevel + * + * @return string|null + */ + public function getRequestedLevel() + { + return $this->container['requestedLevel']; + } + + /** + * Sets requestedLevel + * + * @param string|null $requestedLevel The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. + * + * @return self + */ + public function setRequestedLevel($requestedLevel) + { + if (is_null($requestedLevel)) { + throw new \InvalidArgumentException('non-nullable requestedLevel cannot be null'); + } + $allowedValues = $this->getRequestedLevelAllowableValues(); + if (!in_array($requestedLevel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'requestedLevel', must be one of '%s'", + $requestedLevel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['requestedLevel'] = $requestedLevel; + + return $this; + } + + /** + * Gets verificationStatus + * + * @return string|null + */ + public function getVerificationStatus() + { + return $this->container['verificationStatus']; + } + + /** + * Sets verificationStatus + * + * @param string|null $verificationStatus The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. + * + * @return self + */ + public function setVerificationStatus($verificationStatus) + { + if (is_null($verificationStatus)) { + throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); + } + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!in_array($verificationStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + $verificationStatus, + implode("', '", $allowedValues) + ) + ); + } + $this->container['verificationStatus'] = $verificationStatus; + + 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/ConfigurationWebhook/Address.php b/src/Adyen/Model/ConfigurationWebhook/Address.php new file mode 100644 index 000000000..657cbd884 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Address.php @@ -0,0 +1,569 @@ + + */ +class Address implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'houseNumberOrName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'houseNumberOrName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'houseNumberOrName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => 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 = [ + 'city' => 'city', + 'country' => 'country', + 'houseNumberOrName' => 'houseNumberOrName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * 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('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $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['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' 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 city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * 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`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + 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/ConfigurationWebhook/Amount.php b/src/Adyen/Model/ConfigurationWebhook/Amount.php new file mode 100644 index 000000000..7f81a6a57 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Amount.php @@ -0,0 +1,424 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('value', $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['value'] === null) { + $invalidProperties[] = "'value' 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 value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/ConfigurationWebhook/Authentication.php b/src/Adyen/Model/ConfigurationWebhook/Authentication.php new file mode 100644 index 000000000..625c92208 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Authentication.php @@ -0,0 +1,452 @@ + + */ +class Authentication implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Authentication'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string', + 'password' => 'string', + 'phone' => '\Adyen\Model\ConfigurationWebhook\Phone' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null, + 'password' => null, + 'phone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'email' => false, + 'password' => false, + 'phone' => 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 = [ + 'email' => 'email', + 'password' => 'password', + 'phone' => 'phone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'password' => 'setPassword', + 'phone' => 'setPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'password' => 'getPassword', + 'phone' => 'getPhone' + ]; + + /** + * 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('email', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('phone', $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 email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The email address where the one-time password (OTP) is sent. + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó** + * + * @return self + */ + public function setPassword($password) + { + if (is_null($password)) { + throw new \InvalidArgumentException('non-nullable password cannot be null'); + } + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets phone + * + * @return \Adyen\Model\ConfigurationWebhook\Phone|null + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param \Adyen\Model\ConfigurationWebhook\Phone|null $phone phone + * + * @return self + */ + public function setPhone($phone) + { + if (is_null($phone)) { + throw new \InvalidArgumentException('non-nullable phone cannot be null'); + } + $this->container['phone'] = $phone; + + 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/ConfigurationWebhook/Balance.php b/src/Adyen/Model/ConfigurationWebhook/Balance.php new file mode 100644 index 000000000..d90e8fe4c --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Balance.php @@ -0,0 +1,532 @@ + + */ +class Balance implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Balance'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'available' => 'int', + 'balance' => 'int', + 'currency' => 'string', + 'pending' => 'int', + 'reserved' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'available' => 'int64', + 'balance' => 'int64', + 'currency' => null, + 'pending' => 'int64', + 'reserved' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'available' => false, + 'balance' => false, + 'currency' => false, + 'pending' => false, + 'reserved' => 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 = [ + 'available' => 'available', + 'balance' => 'balance', + 'currency' => 'currency', + 'pending' => 'pending', + 'reserved' => 'reserved' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'available' => 'setAvailable', + 'balance' => 'setBalance', + 'currency' => 'setCurrency', + 'pending' => 'setPending', + 'reserved' => 'setReserved' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'available' => 'getAvailable', + 'balance' => 'getBalance', + 'currency' => 'getCurrency', + 'pending' => 'getPending', + 'reserved' => 'getReserved' + ]; + + /** + * 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('available', $data ?? [], null); + $this->setIfExists('balance', $data ?? [], null); + $this->setIfExists('currency', $data ?? [], null); + $this->setIfExists('pending', $data ?? [], null); + $this->setIfExists('reserved', $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['available'] === null) { + $invalidProperties[] = "'available' can't be null"; + } + if ($this->container['balance'] === null) { + $invalidProperties[] = "'balance' can't be null"; + } + if ($this->container['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['reserved'] === null) { + $invalidProperties[] = "'reserved' 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 available + * + * @return int + */ + public function getAvailable() + { + return $this->container['available']; + } + + /** + * Sets available + * + * @param int $available The remaining amount available for spending. + * + * @return self + */ + public function setAvailable($available) + { + if (is_null($available)) { + throw new \InvalidArgumentException('non-nullable available cannot be null'); + } + $this->container['available'] = $available; + + return $this; + } + + /** + * Gets balance + * + * @return int + */ + public function getBalance() + { + return $this->container['balance']; + } + + /** + * Sets balance + * + * @param int $balance The total amount in the balance. + * + * @return self + */ + public function setBalance($balance) + { + if (is_null($balance)) { + throw new \InvalidArgumentException('non-nullable balance cannot be null'); + } + $this->container['balance'] = $balance; + + return $this; + } + + /** + * 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) of the balance. + * + * @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 pending + * + * @return int|null + */ + public function getPending() + { + return $this->container['pending']; + } + + /** + * Sets pending + * + * @param int|null $pending The amount pending to be paid out but not yet available in the balance. + * + * @return self + */ + public function setPending($pending) + { + if (is_null($pending)) { + throw new \InvalidArgumentException('non-nullable pending cannot be null'); + } + $this->container['pending'] = $pending; + + return $this; + } + + /** + * Gets reserved + * + * @return int + */ + public function getReserved() + { + return $this->container['reserved']; + } + + /** + * Sets reserved + * + * @param int $reserved The amount reserved for payments that have been authorised, but have not been captured yet. + * + * @return self + */ + public function setReserved($reserved) + { + if (is_null($reserved)) { + throw new \InvalidArgumentException('non-nullable reserved cannot be null'); + } + $this->container['reserved'] = $reserved; + + 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/ConfigurationWebhook/BalanceAccount.php b/src/Adyen/Model/ConfigurationWebhook/BalanceAccount.php new file mode 100644 index 000000000..fedefd0a2 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/BalanceAccount.php @@ -0,0 +1,801 @@ + + */ +class BalanceAccount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalanceAccount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolderId' => 'string', + 'balances' => '\Adyen\Model\ConfigurationWebhook\Balance[]', + 'defaultCurrencyCode' => 'string', + 'description' => 'string', + 'id' => 'string', + 'metadata' => 'array', + 'migratedAccountCode' => 'string', + 'paymentInstruments' => '\Adyen\Model\ConfigurationWebhook\PaymentInstrumentReference[]', + 'platformPaymentConfiguration' => '\Adyen\Model\ConfigurationWebhook\PlatformPaymentConfiguration', + 'reference' => 'string', + 'status' => 'string', + 'timeZone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolderId' => null, + 'balances' => null, + 'defaultCurrencyCode' => null, + 'description' => null, + 'id' => null, + 'metadata' => null, + 'migratedAccountCode' => null, + 'paymentInstruments' => null, + 'platformPaymentConfiguration' => null, + 'reference' => null, + 'status' => null, + 'timeZone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolderId' => false, + 'balances' => false, + 'defaultCurrencyCode' => false, + 'description' => false, + 'id' => false, + 'metadata' => false, + 'migratedAccountCode' => false, + 'paymentInstruments' => false, + 'platformPaymentConfiguration' => false, + 'reference' => false, + 'status' => false, + 'timeZone' => 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', + 'balances' => 'balances', + 'defaultCurrencyCode' => 'defaultCurrencyCode', + 'description' => 'description', + 'id' => 'id', + 'metadata' => 'metadata', + 'migratedAccountCode' => 'migratedAccountCode', + 'paymentInstruments' => 'paymentInstruments', + 'platformPaymentConfiguration' => 'platformPaymentConfiguration', + 'reference' => 'reference', + 'status' => 'status', + 'timeZone' => 'timeZone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolderId' => 'setAccountHolderId', + 'balances' => 'setBalances', + 'defaultCurrencyCode' => 'setDefaultCurrencyCode', + 'description' => 'setDescription', + 'id' => 'setId', + 'metadata' => 'setMetadata', + 'migratedAccountCode' => 'setMigratedAccountCode', + 'paymentInstruments' => 'setPaymentInstruments', + 'platformPaymentConfiguration' => 'setPlatformPaymentConfiguration', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'timeZone' => 'setTimeZone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolderId' => 'getAccountHolderId', + 'balances' => 'getBalances', + 'defaultCurrencyCode' => 'getDefaultCurrencyCode', + 'description' => 'getDescription', + 'id' => 'getId', + 'metadata' => 'getMetadata', + 'migratedAccountCode' => 'getMigratedAccountCode', + 'paymentInstruments' => 'getPaymentInstruments', + 'platformPaymentConfiguration' => 'getPlatformPaymentConfiguration', + 'reference' => 'getReference', + 'status' => 'getStatus', + 'timeZone' => 'getTimeZone' + ]; + + /** + * 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_CLOSED = 'Closed'; + public const STATUS_INACTIVE = 'Inactive'; + public const STATUS_SUSPENDED = 'Suspended'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_CLOSED, + self::STATUS_INACTIVE, + self::STATUS_SUSPENDED, + ]; + } + /** + * 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('balances', $data ?? [], null); + $this->setIfExists('defaultCurrencyCode', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('migratedAccountCode', $data ?? [], null); + $this->setIfExists('paymentInstruments', $data ?? [], null); + $this->setIfExists('platformPaymentConfiguration', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('timeZone', $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['accountHolderId'] === null) { + $invalidProperties[] = "'accountHolderId' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' 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 accountHolderId + * + * @return string + */ + public function getAccountHolderId() + { + return $this->container['accountHolderId']; + } + + /** + * Sets accountHolderId + * + * @param string $accountHolderId The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. + * + * @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 balances + * + * @return \Adyen\Model\ConfigurationWebhook\Balance[]|null + */ + public function getBalances() + { + return $this->container['balances']; + } + + /** + * Sets balances + * + * @param \Adyen\Model\ConfigurationWebhook\Balance[]|null $balances List of balances with the amount and currency. + * + * @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 defaultCurrencyCode + * + * @return string|null + */ + public function getDefaultCurrencyCode() + { + return $this->container['defaultCurrencyCode']; + } + + /** + * Sets defaultCurrencyCode + * + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. + * + * @return self + */ + public function setDefaultCurrencyCode($defaultCurrencyCode) + { + if (is_null($defaultCurrencyCode)) { + throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); + } + $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. + * + * @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 id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the balance account. + * + * @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 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. 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 migratedAccountCode + * + * @return string|null + */ + public function getMigratedAccountCode() + { + return $this->container['migratedAccountCode']; + } + + /** + * Sets migratedAccountCode + * + * @param string|null $migratedAccountCode The unique identifier of the account of the migrated account holder in the classic integration. + * + * @return self + */ + public function setMigratedAccountCode($migratedAccountCode) + { + if (is_null($migratedAccountCode)) { + throw new \InvalidArgumentException('non-nullable migratedAccountCode cannot be null'); + } + $this->container['migratedAccountCode'] = $migratedAccountCode; + + return $this; + } + + /** + * Gets paymentInstruments + * + * @return \Adyen\Model\ConfigurationWebhook\PaymentInstrumentReference[]|null + */ + public function getPaymentInstruments() + { + return $this->container['paymentInstruments']; + } + + /** + * Sets paymentInstruments + * + * @param \Adyen\Model\ConfigurationWebhook\PaymentInstrumentReference[]|null $paymentInstruments List of [payment instruments](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments) associated with the balance account. + * + * @return self + */ + public function setPaymentInstruments($paymentInstruments) + { + if (is_null($paymentInstruments)) { + throw new \InvalidArgumentException('non-nullable paymentInstruments cannot be null'); + } + $this->container['paymentInstruments'] = $paymentInstruments; + + return $this; + } + + /** + * Gets platformPaymentConfiguration + * + * @return \Adyen\Model\ConfigurationWebhook\PlatformPaymentConfiguration|null + */ + public function getPlatformPaymentConfiguration() + { + return $this->container['platformPaymentConfiguration']; + } + + /** + * Sets platformPaymentConfiguration + * + * @param \Adyen\Model\ConfigurationWebhook\PlatformPaymentConfiguration|null $platformPaymentConfiguration platformPaymentConfiguration + * + * @return self + */ + public function setPlatformPaymentConfiguration($platformPaymentConfiguration) + { + if (is_null($platformPaymentConfiguration)) { + throw new \InvalidArgumentException('non-nullable platformPaymentConfiguration cannot be null'); + } + $this->container['platformPaymentConfiguration'] = $platformPaymentConfiguration; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the balance account, maximum 150 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the balance account, set to **Active** by default. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets timeZone + * + * @return string|null + */ + public function getTimeZone() + { + return $this->container['timeZone']; + } + + /** + * Sets timeZone + * + * @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 + */ + public function setTimeZone($timeZone) + { + if (is_null($timeZone)) { + throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); + } + $this->container['timeZone'] = $timeZone; + + 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/ConfigurationWebhook/BalanceAccountNotificationData.php b/src/Adyen/Model/ConfigurationWebhook/BalanceAccountNotificationData.php new file mode 100644 index 000000000..7bc0c625f --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/BalanceAccountNotificationData.php @@ -0,0 +1,418 @@ + + */ +class BalanceAccountNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalanceAccountNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balanceAccount' => '\Adyen\Model\ConfigurationWebhook\BalanceAccount', + 'balancePlatform' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balanceAccount' => null, + 'balancePlatform' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balanceAccount' => false, + 'balancePlatform' => 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 = [ + 'balanceAccount' => 'balanceAccount', + 'balancePlatform' => 'balancePlatform' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balanceAccount' => 'setBalanceAccount', + 'balancePlatform' => 'setBalancePlatform' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balanceAccount' => 'getBalanceAccount', + 'balancePlatform' => 'getBalancePlatform' + ]; + + /** + * 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('balanceAccount', $data ?? [], null); + $this->setIfExists('balancePlatform', $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 balanceAccount + * + * @return \Adyen\Model\ConfigurationWebhook\BalanceAccount|null + */ + public function getBalanceAccount() + { + return $this->container['balanceAccount']; + } + + /** + * Sets balanceAccount + * + * @param \Adyen\Model\ConfigurationWebhook\BalanceAccount|null $balanceAccount balanceAccount + * + * @return self + */ + public function setBalanceAccount($balanceAccount) + { + if (is_null($balanceAccount)) { + throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); + } + $this->container['balanceAccount'] = $balanceAccount; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + /** + * 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/ConfigurationWebhook/BalanceAccountNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhook/BalanceAccountNotificationRequest.php new file mode 100644 index 000000000..1fae9b263 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/BalanceAccountNotificationRequest.php @@ -0,0 +1,494 @@ + + */ +class BalanceAccountNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalanceAccountNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ConfigurationWebhook\BalanceAccountNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_UPDATED = 'balancePlatform.balanceAccount.updated'; + public const TYPE_CREATED = 'balancePlatform.balanceAccount.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_UPDATED, + self::TYPE_CREATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ConfigurationWebhook\BalanceAccountNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ConfigurationWebhook\BalanceAccountNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/ConfigurationWebhook/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ConfigurationWebhook/BalancePlatformNotificationResponse.php new file mode 100644 index 000000000..0ac84457f --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/BalancePlatformNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalancePlatformNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/ConfigurationWebhook/BulkAddress.php b/src/Adyen/Model/ConfigurationWebhook/BulkAddress.php new file mode 100644 index 000000000..1f6e60ca8 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/BulkAddress.php @@ -0,0 +1,659 @@ + + */ +class BulkAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BulkAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'company' => 'string', + 'country' => 'string', + 'email' => 'string', + 'houseNumberOrName' => 'string', + 'mobile' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'company' => null, + 'country' => null, + 'email' => null, + 'houseNumberOrName' => null, + 'mobile' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'company' => false, + 'country' => false, + 'email' => false, + 'houseNumberOrName' => false, + 'mobile' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => 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 = [ + 'city' => 'city', + 'company' => 'company', + 'country' => 'country', + 'email' => 'email', + 'houseNumberOrName' => 'houseNumberOrName', + 'mobile' => 'mobile', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'company' => 'setCompany', + 'country' => 'setCountry', + 'email' => 'setEmail', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'mobile' => 'setMobile', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'company' => 'getCompany', + 'country' => 'getCountry', + 'email' => 'getEmail', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'mobile' => 'getMobile', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * 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('city', $data ?? [], null); + $this->setIfExists('company', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('mobile', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $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['country'] === null) { + $invalidProperties[] = "'country' 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 city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The name of the city. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets company + * + * @return string|null + */ + public function getCompany() + { + return $this->container['company']; + } + + /** + * Sets company + * + * @param string|null $company The name of the company. + * + * @return self + */ + public function setCompany($company) + { + if (is_null($company)) { + throw new \InvalidArgumentException('non-nullable company cannot be null'); + } + $this->container['company'] = $company; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The email address. + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string|null + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string|null $houseNumberOrName The house number or name. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets mobile + * + * @return string|null + */ + public function getMobile() + { + return $this->container['mobile']; + } + + /** + * Sets mobile + * + * @param string|null $mobile The full telephone number. + * + * @return self + */ + public function setMobile($mobile) + { + if (is_null($mobile)) { + throw new \InvalidArgumentException('non-nullable mobile cannot be null'); + } + $this->container['mobile'] = $mobile; + + return $this; + } + + /** + * Gets postalCode + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string|null $postalCode The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string|null + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string|null $street The streetname of the house. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + 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/ConfigurationWebhook/CapabilityProblem.php b/src/Adyen/Model/ConfigurationWebhook/CapabilityProblem.php new file mode 100644 index 000000000..16f11e9d1 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CapabilityProblem.php @@ -0,0 +1,418 @@ + + */ +class CapabilityProblem implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilityProblem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'entity' => '\Adyen\Model\ConfigurationWebhook\CapabilityProblemEntity', + 'verificationErrors' => '\Adyen\Model\ConfigurationWebhook\VerificationError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'entity' => null, + 'verificationErrors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'entity' => false, + 'verificationErrors' => 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 = [ + 'entity' => 'entity', + 'verificationErrors' => 'verificationErrors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'entity' => 'setEntity', + 'verificationErrors' => 'setVerificationErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'entity' => 'getEntity', + 'verificationErrors' => 'getVerificationErrors' + ]; + + /** + * 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('entity', $data ?? [], null); + $this->setIfExists('verificationErrors', $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 entity + * + * @return \Adyen\Model\ConfigurationWebhook\CapabilityProblemEntity|null + */ + public function getEntity() + { + return $this->container['entity']; + } + + /** + * Sets entity + * + * @param \Adyen\Model\ConfigurationWebhook\CapabilityProblemEntity|null $entity entity + * + * @return self + */ + public function setEntity($entity) + { + if (is_null($entity)) { + throw new \InvalidArgumentException('non-nullable entity cannot be null'); + } + $this->container['entity'] = $entity; + + return $this; + } + + /** + * Gets verificationErrors + * + * @return \Adyen\Model\ConfigurationWebhook\VerificationError[]|null + */ + public function getVerificationErrors() + { + return $this->container['verificationErrors']; + } + + /** + * Sets verificationErrors + * + * @param \Adyen\Model\ConfigurationWebhook\VerificationError[]|null $verificationErrors Contains information about the verification error. + * + * @return self + */ + public function setVerificationErrors($verificationErrors) + { + if (is_null($verificationErrors)) { + throw new \InvalidArgumentException('non-nullable verificationErrors cannot be null'); + } + $this->container['verificationErrors'] = $verificationErrors; + + 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/ConfigurationWebhook/CapabilityProblemEntity.php b/src/Adyen/Model/ConfigurationWebhook/CapabilityProblemEntity.php new file mode 100644 index 000000000..0cbf3d9f4 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CapabilityProblemEntity.php @@ -0,0 +1,521 @@ + + */ +class CapabilityProblemEntity implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilityProblemEntity'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'documents' => 'string[]', + 'id' => 'string', + 'owner' => '\Adyen\Model\ConfigurationWebhook\CapabilityProblemEntityRecursive', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'documents' => null, + 'id' => null, + 'owner' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'documents' => false, + 'id' => false, + 'owner' => 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 = [ + 'documents' => 'documents', + 'id' => 'id', + 'owner' => 'owner', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'documents' => 'setDocuments', + 'id' => 'setId', + 'owner' => 'setOwner', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'documents' => 'getDocuments', + 'id' => 'getId', + 'owner' => 'getOwner', + '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_BANK_ACCOUNT = 'BankAccount'; + public const TYPE_DOCUMENT = 'Document'; + public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK_ACCOUNT, + self::TYPE_DOCUMENT, + self::TYPE_LEGAL_ENTITY, + ]; + } + /** + * 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('documents', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 documents + * + * @return string[]|null + */ + public function getDocuments() + { + return $this->container['documents']; + } + + /** + * Sets documents + * + * @param string[]|null $documents List of document IDs to which the verification errors related to the capabilities correspond to. + * + * @return self + */ + public function setDocuments($documents) + { + if (is_null($documents)) { + throw new \InvalidArgumentException('non-nullable documents cannot be null'); + } + $this->container['documents'] = $documents; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the entity. + * + * @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 owner + * + * @return \Adyen\Model\ConfigurationWebhook\CapabilityProblemEntityRecursive|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param \Adyen\Model\ConfigurationWebhook\CapabilityProblemEntityRecursive|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. + * + * @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/ConfigurationWebhook/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/ConfigurationWebhook/CapabilityProblemEntityRecursive.php new file mode 100644 index 000000000..44b3afbf0 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CapabilityProblemEntityRecursive.php @@ -0,0 +1,487 @@ + + */ +class CapabilityProblemEntityRecursive implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilityProblemEntity-recursive'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'documents' => 'string[]', + 'id' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'documents' => null, + 'id' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'documents' => false, + 'id' => 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 = [ + 'documents' => 'documents', + 'id' => 'id', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'documents' => 'setDocuments', + 'id' => 'setId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'documents' => 'getDocuments', + 'id' => 'getId', + '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_BANK_ACCOUNT = 'BankAccount'; + public const TYPE_DOCUMENT = 'Document'; + public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK_ACCOUNT, + self::TYPE_DOCUMENT, + self::TYPE_LEGAL_ENTITY, + ]; + } + /** + * 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('documents', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 documents + * + * @return string[]|null + */ + public function getDocuments() + { + return $this->container['documents']; + } + + /** + * Sets documents + * + * @param string[]|null $documents List of document IDs to which the verification errors related to the capabilities correspond to. + * + * @return self + */ + public function setDocuments($documents) + { + if (is_null($documents)) { + throw new \InvalidArgumentException('non-nullable documents cannot be null'); + } + $this->container['documents'] = $documents; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the entity. + * + * @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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. + * + * @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/ConfigurationWebhook/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhook/CapabilitySettings.php new file mode 100644 index 000000000..387a5ffa6 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/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\ConfigurationWebhook\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\ConfigurationWebhook\Amount|null + */ + public function getMaxAmount() + { + return $this->container['maxAmount']; + } + + /** + * Sets maxAmount + * + * @param \Adyen\Model\ConfigurationWebhook\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/ConfigurationWebhook/Card.php b/src/Adyen/Model/ConfigurationWebhook/Card.php new file mode 100644 index 000000000..32bc0d4cd --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Card.php @@ -0,0 +1,842 @@ + + */ +class Card implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Card'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'authentication' => '\Adyen\Model\ConfigurationWebhook\Authentication', + 'bin' => 'string', + 'brand' => 'string', + 'brandVariant' => 'string', + 'cardholderName' => 'string', + 'configuration' => '\Adyen\Model\ConfigurationWebhook\CardConfiguration', + 'cvc' => 'string', + 'deliveryContact' => '\Adyen\Model\ConfigurationWebhook\Contact', + 'expiration' => '\Adyen\Model\ConfigurationWebhook\Expiry', + 'formFactor' => 'string', + 'lastFour' => 'string', + 'number' => 'string', + 'threeDSecure' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'authentication' => null, + 'bin' => null, + 'brand' => null, + 'brandVariant' => null, + 'cardholderName' => null, + 'configuration' => null, + 'cvc' => null, + 'deliveryContact' => null, + 'expiration' => null, + 'formFactor' => null, + 'lastFour' => null, + 'number' => null, + 'threeDSecure' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'authentication' => false, + 'bin' => false, + 'brand' => false, + 'brandVariant' => false, + 'cardholderName' => false, + 'configuration' => false, + 'cvc' => false, + 'deliveryContact' => false, + 'expiration' => false, + 'formFactor' => false, + 'lastFour' => false, + 'number' => false, + 'threeDSecure' => 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 = [ + 'authentication' => 'authentication', + 'bin' => 'bin', + 'brand' => 'brand', + 'brandVariant' => 'brandVariant', + 'cardholderName' => 'cardholderName', + 'configuration' => 'configuration', + 'cvc' => 'cvc', + 'deliveryContact' => 'deliveryContact', + 'expiration' => 'expiration', + 'formFactor' => 'formFactor', + 'lastFour' => 'lastFour', + 'number' => 'number', + 'threeDSecure' => 'threeDSecure' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authentication' => 'setAuthentication', + 'bin' => 'setBin', + 'brand' => 'setBrand', + 'brandVariant' => 'setBrandVariant', + 'cardholderName' => 'setCardholderName', + 'configuration' => 'setConfiguration', + 'cvc' => 'setCvc', + 'deliveryContact' => 'setDeliveryContact', + 'expiration' => 'setExpiration', + 'formFactor' => 'setFormFactor', + 'lastFour' => 'setLastFour', + 'number' => 'setNumber', + 'threeDSecure' => 'setThreeDSecure' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authentication' => 'getAuthentication', + 'bin' => 'getBin', + 'brand' => 'getBrand', + 'brandVariant' => 'getBrandVariant', + 'cardholderName' => 'getCardholderName', + 'configuration' => 'getConfiguration', + 'cvc' => 'getCvc', + 'deliveryContact' => 'getDeliveryContact', + 'expiration' => 'getExpiration', + 'formFactor' => 'getFormFactor', + 'lastFour' => 'getLastFour', + 'number' => 'getNumber', + 'threeDSecure' => 'getThreeDSecure' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FORM_FACTOR_PHYSICAL = 'physical'; + public const FORM_FACTOR_UNKNOWN = 'unknown'; + public const FORM_FACTOR_VIRTUAL = 'virtual'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFormFactorAllowableValues() + { + return [ + self::FORM_FACTOR_PHYSICAL, + self::FORM_FACTOR_UNKNOWN, + self::FORM_FACTOR_VIRTUAL, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('authentication', $data ?? [], null); + $this->setIfExists('bin', $data ?? [], null); + $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('brandVariant', $data ?? [], null); + $this->setIfExists('cardholderName', $data ?? [], null); + $this->setIfExists('configuration', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); + $this->setIfExists('deliveryContact', $data ?? [], null); + $this->setIfExists('expiration', $data ?? [], null); + $this->setIfExists('formFactor', $data ?? [], null); + $this->setIfExists('lastFour', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('threeDSecure', $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['brand'] === null) { + $invalidProperties[] = "'brand' can't be null"; + } + if ($this->container['brandVariant'] === null) { + $invalidProperties[] = "'brandVariant' can't be null"; + } + if ($this->container['cardholderName'] === null) { + $invalidProperties[] = "'cardholderName' can't be null"; + } + if ($this->container['formFactor'] === null) { + $invalidProperties[] = "'formFactor' can't be null"; + } + $allowedValues = $this->getFormFactorAllowableValues(); + if (!is_null($this->container['formFactor']) && !in_array($this->container['formFactor'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'formFactor', must be one of '%s'", + $this->container['formFactor'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['number'] === null) { + $invalidProperties[] = "'number' 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 authentication + * + * @return \Adyen\Model\ConfigurationWebhook\Authentication|null + */ + public function getAuthentication() + { + return $this->container['authentication']; + } + + /** + * Sets authentication + * + * @param \Adyen\Model\ConfigurationWebhook\Authentication|null $authentication authentication + * + * @return self + */ + public function setAuthentication($authentication) + { + if (is_null($authentication)) { + throw new \InvalidArgumentException('non-nullable authentication cannot be null'); + } + $this->container['authentication'] = $authentication; + + return $this; + } + + /** + * Gets bin + * + * @return string|null + */ + public function getBin() + { + return $this->container['bin']; + } + + /** + * Sets bin + * + * @param string|null $bin The bank identification number (BIN) of the card number. + * + * @return self + */ + public function setBin($bin) + { + if (is_null($bin)) { + throw new \InvalidArgumentException('non-nullable bin cannot be null'); + } + $this->container['bin'] = $bin; + + return $this; + } + + /** + * Gets brand + * + * @return string + */ + public function getBrand() + { + return $this->container['brand']; + } + + /** + * Sets brand + * + * @param string $brand The brand of the physical or the virtual card. Possible values: **visa**, **mc**. + * + * @return self + */ + public function setBrand($brand) + { + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); + } + $this->container['brand'] = $brand; + + return $this; + } + + /** + * Gets brandVariant + * + * @return string + */ + public function getBrandVariant() + { + return $this->container['brandVariant']; + } + + /** + * Sets brandVariant + * + * @param string $brandVariant The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. + * + * @return self + */ + public function setBrandVariant($brandVariant) + { + if (is_null($brandVariant)) { + throw new \InvalidArgumentException('non-nullable brandVariant cannot be null'); + } + $this->container['brandVariant'] = $brandVariant; + + return $this; + } + + /** + * Gets cardholderName + * + * @return string + */ + public function getCardholderName() + { + return $this->container['cardholderName']; + } + + /** + * Sets cardholderName + * + * @param string $cardholderName The name of the cardholder. Maximum length: 26 characters. + * + * @return self + */ + public function setCardholderName($cardholderName) + { + if (is_null($cardholderName)) { + throw new \InvalidArgumentException('non-nullable cardholderName cannot be null'); + } + $this->container['cardholderName'] = $cardholderName; + + return $this; + } + + /** + * Gets configuration + * + * @return \Adyen\Model\ConfigurationWebhook\CardConfiguration|null + */ + public function getConfiguration() + { + return $this->container['configuration']; + } + + /** + * Sets configuration + * + * @param \Adyen\Model\ConfigurationWebhook\CardConfiguration|null $configuration configuration + * + * @return self + */ + public function setConfiguration($configuration) + { + if (is_null($configuration)) { + throw new \InvalidArgumentException('non-nullable configuration cannot be null'); + } + $this->container['configuration'] = $configuration; + + return $this; + } + + /** + * Gets cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. + * + * @return self + */ + public function setCvc($cvc) + { + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); + } + $this->container['cvc'] = $cvc; + + return $this; + } + + /** + * Gets deliveryContact + * + * @return \Adyen\Model\ConfigurationWebhook\Contact|null + */ + public function getDeliveryContact() + { + return $this->container['deliveryContact']; + } + + /** + * Sets deliveryContact + * + * @param \Adyen\Model\ConfigurationWebhook\Contact|null $deliveryContact deliveryContact + * + * @return self + */ + public function setDeliveryContact($deliveryContact) + { + if (is_null($deliveryContact)) { + throw new \InvalidArgumentException('non-nullable deliveryContact cannot be null'); + } + $this->container['deliveryContact'] = $deliveryContact; + + return $this; + } + + /** + * Gets expiration + * + * @return \Adyen\Model\ConfigurationWebhook\Expiry|null + */ + public function getExpiration() + { + return $this->container['expiration']; + } + + /** + * Sets expiration + * + * @param \Adyen\Model\ConfigurationWebhook\Expiry|null $expiration expiration + * + * @return self + */ + public function setExpiration($expiration) + { + if (is_null($expiration)) { + throw new \InvalidArgumentException('non-nullable expiration cannot be null'); + } + $this->container['expiration'] = $expiration; + + return $this; + } + + /** + * Gets formFactor + * + * @return string + */ + public function getFormFactor() + { + return $this->container['formFactor']; + } + + /** + * Sets formFactor + * + * @param string $formFactor The form factor of the card. Possible values: **virtual**, **physical**. + * + * @return self + */ + public function setFormFactor($formFactor) + { + if (is_null($formFactor)) { + throw new \InvalidArgumentException('non-nullable formFactor cannot be null'); + } + $allowedValues = $this->getFormFactorAllowableValues(); + if (!in_array($formFactor, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'formFactor', must be one of '%s'", + $formFactor, + implode("', '", $allowedValues) + ) + ); + } + $this->container['formFactor'] = $formFactor; + + return $this; + } + + /** + * Gets lastFour + * + * @return string|null + */ + public function getLastFour() + { + return $this->container['lastFour']; + } + + /** + * Sets lastFour + * + * @param string|null $lastFour Last last four digits of the card number. + * + * @return self + */ + public function setLastFour($lastFour) + { + if (is_null($lastFour)) { + throw new \InvalidArgumentException('non-nullable lastFour cannot be null'); + } + $this->container['lastFour'] = $lastFour; + + return $this; + } + + /** + * Gets number + * + * @return string + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string $number The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets threeDSecure + * + * @return string|null + */ + public function getThreeDSecure() + { + return $this->container['threeDSecure']; + } + + /** + * Sets threeDSecure + * + * @param string|null $threeDSecure Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. + * + * @return self + */ + public function setThreeDSecure($threeDSecure) + { + if (is_null($threeDSecure)) { + throw new \InvalidArgumentException('non-nullable threeDSecure cannot be null'); + } + $this->container['threeDSecure'] = $threeDSecure; + + 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/ConfigurationWebhook/CardConfiguration.php b/src/Adyen/Model/ConfigurationWebhook/CardConfiguration.php new file mode 100644 index 000000000..c8ba033f3 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CardConfiguration.php @@ -0,0 +1,829 @@ + + */ +class CardConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardConfiguration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'activation' => 'string', + 'activationUrl' => 'string', + 'bulkAddress' => '\Adyen\Model\ConfigurationWebhook\BulkAddress', + 'cardImageId' => 'string', + 'carrier' => 'string', + 'carrierImageId' => 'string', + 'configurationProfileId' => 'string', + 'currency' => 'string', + 'envelope' => 'string', + 'insert' => 'string', + 'language' => 'string', + 'logoImageId' => 'string', + 'pinMailer' => 'string', + 'shipmentMethod' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'activation' => null, + 'activationUrl' => null, + 'bulkAddress' => null, + 'cardImageId' => null, + 'carrier' => null, + 'carrierImageId' => null, + 'configurationProfileId' => null, + 'currency' => null, + 'envelope' => null, + 'insert' => null, + 'language' => null, + 'logoImageId' => null, + 'pinMailer' => null, + 'shipmentMethod' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'activation' => false, + 'activationUrl' => false, + 'bulkAddress' => false, + 'cardImageId' => false, + 'carrier' => false, + 'carrierImageId' => false, + 'configurationProfileId' => false, + 'currency' => false, + 'envelope' => false, + 'insert' => false, + 'language' => false, + 'logoImageId' => false, + 'pinMailer' => false, + 'shipmentMethod' => 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 = [ + 'activation' => 'activation', + 'activationUrl' => 'activationUrl', + 'bulkAddress' => 'bulkAddress', + 'cardImageId' => 'cardImageId', + 'carrier' => 'carrier', + 'carrierImageId' => 'carrierImageId', + 'configurationProfileId' => 'configurationProfileId', + 'currency' => 'currency', + 'envelope' => 'envelope', + 'insert' => 'insert', + 'language' => 'language', + 'logoImageId' => 'logoImageId', + 'pinMailer' => 'pinMailer', + 'shipmentMethod' => 'shipmentMethod' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'activation' => 'setActivation', + 'activationUrl' => 'setActivationUrl', + 'bulkAddress' => 'setBulkAddress', + 'cardImageId' => 'setCardImageId', + 'carrier' => 'setCarrier', + 'carrierImageId' => 'setCarrierImageId', + 'configurationProfileId' => 'setConfigurationProfileId', + 'currency' => 'setCurrency', + 'envelope' => 'setEnvelope', + 'insert' => 'setInsert', + 'language' => 'setLanguage', + 'logoImageId' => 'setLogoImageId', + 'pinMailer' => 'setPinMailer', + 'shipmentMethod' => 'setShipmentMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'activation' => 'getActivation', + 'activationUrl' => 'getActivationUrl', + 'bulkAddress' => 'getBulkAddress', + 'cardImageId' => 'getCardImageId', + 'carrier' => 'getCarrier', + 'carrierImageId' => 'getCarrierImageId', + 'configurationProfileId' => 'getConfigurationProfileId', + 'currency' => 'getCurrency', + 'envelope' => 'getEnvelope', + 'insert' => 'getInsert', + 'language' => 'getLanguage', + 'logoImageId' => 'getLogoImageId', + 'pinMailer' => 'getPinMailer', + 'shipmentMethod' => 'getShipmentMethod' + ]; + + /** + * 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('activation', $data ?? [], null); + $this->setIfExists('activationUrl', $data ?? [], null); + $this->setIfExists('bulkAddress', $data ?? [], null); + $this->setIfExists('cardImageId', $data ?? [], null); + $this->setIfExists('carrier', $data ?? [], null); + $this->setIfExists('carrierImageId', $data ?? [], null); + $this->setIfExists('configurationProfileId', $data ?? [], null); + $this->setIfExists('currency', $data ?? [], null); + $this->setIfExists('envelope', $data ?? [], null); + $this->setIfExists('insert', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('logoImageId', $data ?? [], null); + $this->setIfExists('pinMailer', $data ?? [], null); + $this->setIfExists('shipmentMethod', $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['configurationProfileId'] === null) { + $invalidProperties[] = "'configurationProfileId' 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 activation + * + * @return string|null + */ + public function getActivation() + { + return $this->container['activation']; + } + + /** + * Sets activation + * + * @param string|null $activation Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions. + * + * @return self + */ + public function setActivation($activation) + { + if (is_null($activation)) { + throw new \InvalidArgumentException('non-nullable activation cannot be null'); + } + $this->container['activation'] = $activation; + + return $this; + } + + /** + * Gets activationUrl + * + * @return string|null + */ + public function getActivationUrl() + { + return $this->container['activationUrl']; + } + + /** + * Sets activationUrl + * + * @param string|null $activationUrl Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. + * + * @return self + */ + public function setActivationUrl($activationUrl) + { + if (is_null($activationUrl)) { + throw new \InvalidArgumentException('non-nullable activationUrl cannot be null'); + } + $this->container['activationUrl'] = $activationUrl; + + return $this; + } + + /** + * Gets bulkAddress + * + * @return \Adyen\Model\ConfigurationWebhook\BulkAddress|null + */ + public function getBulkAddress() + { + return $this->container['bulkAddress']; + } + + /** + * Sets bulkAddress + * + * @param \Adyen\Model\ConfigurationWebhook\BulkAddress|null $bulkAddress bulkAddress + * + * @return self + */ + public function setBulkAddress($bulkAddress) + { + if (is_null($bulkAddress)) { + throw new \InvalidArgumentException('non-nullable bulkAddress cannot be null'); + } + $this->container['bulkAddress'] = $bulkAddress; + + return $this; + } + + /** + * Gets cardImageId + * + * @return string|null + */ + public function getCardImageId() + { + return $this->container['cardImageId']; + } + + /** + * Sets cardImageId + * + * @param string|null $cardImageId The ID of the card image. This is the image that will be printed on the full front of the card. + * + * @return self + */ + public function setCardImageId($cardImageId) + { + if (is_null($cardImageId)) { + throw new \InvalidArgumentException('non-nullable cardImageId cannot be null'); + } + $this->container['cardImageId'] = $cardImageId; + + return $this; + } + + /** + * Gets carrier + * + * @return string|null + */ + public function getCarrier() + { + return $this->container['carrier']; + } + + /** + * Sets carrier + * + * @param string|null $carrier Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached. + * + * @return self + */ + public function setCarrier($carrier) + { + if (is_null($carrier)) { + throw new \InvalidArgumentException('non-nullable carrier cannot be null'); + } + $this->container['carrier'] = $carrier; + + return $this; + } + + /** + * Gets carrierImageId + * + * @return string|null + */ + public function getCarrierImageId() + { + return $this->container['carrierImageId']; + } + + /** + * Sets carrierImageId + * + * @param string|null $carrierImageId The ID of the carrier image. This is the image that will printed on the letter to which the card is attached. + * + * @return self + */ + public function setCarrierImageId($carrierImageId) + { + if (is_null($carrierImageId)) { + throw new \InvalidArgumentException('non-nullable carrierImageId cannot be null'); + } + $this->container['carrierImageId'] = $carrierImageId; + + return $this; + } + + /** + * Gets configurationProfileId + * + * @return string + */ + public function getConfigurationProfileId() + { + return $this->container['configurationProfileId']; + } + + /** + * Sets configurationProfileId + * + * @param string $configurationProfileId The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. + * + * @return self + */ + public function setConfigurationProfileId($configurationProfileId) + { + if (is_null($configurationProfileId)) { + throw new \InvalidArgumentException('non-nullable configurationProfileId cannot be null'); + } + $this->container['configurationProfileId'] = $configurationProfileId; + + return $this; + } + + /** + * Gets currency + * + * @return string|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**. + * + * @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 envelope + * + * @return string|null + */ + public function getEnvelope() + { + return $this->container['envelope']; + } + + /** + * Sets envelope + * + * @param string|null $envelope Overrides the envelope design ID defined in the `configurationProfileId`. + * + * @return self + */ + public function setEnvelope($envelope) + { + if (is_null($envelope)) { + throw new \InvalidArgumentException('non-nullable envelope cannot be null'); + } + $this->container['envelope'] = $envelope; + + return $this; + } + + /** + * Gets insert + * + * @return string|null + */ + public function getInsert() + { + return $this->container['insert']; + } + + /** + * Sets insert + * + * @param string|null $insert Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card. + * + * @return self + */ + public function setInsert($insert) + { + if (is_null($insert)) { + throw new \InvalidArgumentException('non-nullable insert cannot be null'); + } + $this->container['insert'] = $insert; + + return $this; + } + + /** + * Gets language + * + * @return string|null + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string|null $language The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**. + * + * @return self + */ + public function setLanguage($language) + { + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); + } + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets logoImageId + * + * @return string|null + */ + public function getLogoImageId() + { + return $this->container['logoImageId']; + } + + /** + * Sets logoImageId + * + * @param string|null $logoImageId The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner. + * + * @return self + */ + public function setLogoImageId($logoImageId) + { + if (is_null($logoImageId)) { + throw new \InvalidArgumentException('non-nullable logoImageId cannot be null'); + } + $this->container['logoImageId'] = $logoImageId; + + return $this; + } + + /** + * Gets pinMailer + * + * @return string|null + */ + public function getPinMailer() + { + return $this->container['pinMailer']; + } + + /** + * Sets pinMailer + * + * @param string|null $pinMailer Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed. + * + * @return self + */ + public function setPinMailer($pinMailer) + { + if (is_null($pinMailer)) { + throw new \InvalidArgumentException('non-nullable pinMailer cannot be null'); + } + $this->container['pinMailer'] = $pinMailer; + + return $this; + } + + /** + * Gets shipmentMethod + * + * @return string|null + */ + public function getShipmentMethod() + { + return $this->container['shipmentMethod']; + } + + /** + * Sets shipmentMethod + * + * @param string|null $shipmentMethod Overrides the logistics company defined in the `configurationProfileId`. + * + * @return self + */ + public function setShipmentMethod($shipmentMethod) + { + if (is_null($shipmentMethod)) { + throw new \InvalidArgumentException('non-nullable shipmentMethod cannot be null'); + } + $this->container['shipmentMethod'] = $shipmentMethod; + + 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/ConfigurationWebhook/CardOrderItem.php b/src/Adyen/Model/ConfigurationWebhook/CardOrderItem.php new file mode 100644 index 000000000..d78445885 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CardOrderItem.php @@ -0,0 +1,622 @@ + + */ +class CardOrderItem implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardOrderItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'card' => '\Adyen\Model\ConfigurationWebhook\CardOrderItemDeliveryStatus', + 'cardOrderItemId' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string', + 'paymentInstrumentId' => 'string', + 'pin' => '\Adyen\Model\ConfigurationWebhook\CardOrderItemDeliveryStatus', + 'shippingMethod' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'card' => null, + 'cardOrderItemId' => null, + 'creationDate' => 'date-time', + 'id' => null, + 'paymentInstrumentId' => null, + 'pin' => null, + 'shippingMethod' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'card' => false, + 'cardOrderItemId' => false, + 'creationDate' => false, + 'id' => false, + 'paymentInstrumentId' => false, + 'pin' => false, + 'shippingMethod' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'card' => 'card', + 'cardOrderItemId' => 'cardOrderItemId', + 'creationDate' => 'creationDate', + 'id' => 'id', + 'paymentInstrumentId' => 'paymentInstrumentId', + 'pin' => 'pin', + 'shippingMethod' => 'shippingMethod' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'card' => 'setCard', + 'cardOrderItemId' => 'setCardOrderItemId', + 'creationDate' => 'setCreationDate', + 'id' => 'setId', + 'paymentInstrumentId' => 'setPaymentInstrumentId', + 'pin' => 'setPin', + 'shippingMethod' => 'setShippingMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'card' => 'getCard', + 'cardOrderItemId' => 'getCardOrderItemId', + 'creationDate' => 'getCreationDate', + 'id' => 'getId', + 'paymentInstrumentId' => 'getPaymentInstrumentId', + 'pin' => 'getPin', + 'shippingMethod' => 'getShippingMethod' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); + $this->setIfExists('cardOrderItemId', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentInstrumentId', $data ?? [], null); + $this->setIfExists('pin', $data ?? [], null); + $this->setIfExists('shippingMethod', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets card + * + * @return \Adyen\Model\ConfigurationWebhook\CardOrderItemDeliveryStatus|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \Adyen\Model\ConfigurationWebhook\CardOrderItemDeliveryStatus|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + throw new \InvalidArgumentException('non-nullable card cannot be null'); + } + $this->container['card'] = $card; + + return $this; + } + + /** + * Gets cardOrderItemId + * + * @return string|null + */ + public function getCardOrderItemId() + { + return $this->container['cardOrderItemId']; + } + + /** + * Sets cardOrderItemId + * + * @param string|null $cardOrderItemId The unique identifier of the card order item. + * + * @return self + */ + public function setCardOrderItemId($cardOrderItemId) + { + if (is_null($cardOrderItemId)) { + throw new \InvalidArgumentException('non-nullable cardOrderItemId cannot be null'); + } + $this->container['cardOrderItemId'] = $cardOrderItemId; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets paymentInstrumentId + * + * @return string|null + */ + public function getPaymentInstrumentId() + { + return $this->container['paymentInstrumentId']; + } + + /** + * Sets paymentInstrumentId + * + * @param string|null $paymentInstrumentId The unique identifier of the payment instrument related to the card order item. + * + * @return self + */ + public function setPaymentInstrumentId($paymentInstrumentId) + { + if (is_null($paymentInstrumentId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); + } + $this->container['paymentInstrumentId'] = $paymentInstrumentId; + + return $this; + } + + /** + * Gets pin + * + * @return \Adyen\Model\ConfigurationWebhook\CardOrderItemDeliveryStatus|null + */ + public function getPin() + { + return $this->container['pin']; + } + + /** + * Sets pin + * + * @param \Adyen\Model\ConfigurationWebhook\CardOrderItemDeliveryStatus|null $pin pin + * + * @return self + */ + public function setPin($pin) + { + if (is_null($pin)) { + throw new \InvalidArgumentException('non-nullable pin cannot be null'); + } + $this->container['pin'] = $pin; + + return $this; + } + + /** + * Gets shippingMethod + * + * @return string|null + */ + public function getShippingMethod() + { + return $this->container['shippingMethod']; + } + + /** + * Sets shippingMethod + * + * @param string|null $shippingMethod Shipping method used to deliver the card or the PIN. + * + * @return self + */ + public function setShippingMethod($shippingMethod) + { + if (is_null($shippingMethod)) { + throw new \InvalidArgumentException('non-nullable shippingMethod cannot be null'); + } + $this->container['shippingMethod'] = $shippingMethod; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/ConfigurationWebhook/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/ConfigurationWebhook/CardOrderItemDeliveryStatus.php new file mode 100644 index 000000000..1c05a1c81 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CardOrderItemDeliveryStatus.php @@ -0,0 +1,497 @@ + + */ +class CardOrderItemDeliveryStatus implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardOrderItemDeliveryStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'errorMessage' => 'string', + 'status' => 'string', + 'trackingNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'errorMessage' => null, + 'status' => null, + 'trackingNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'errorMessage' => false, + 'status' => false, + 'trackingNumber' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'errorMessage' => 'errorMessage', + 'status' => 'status', + 'trackingNumber' => 'trackingNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'errorMessage' => 'setErrorMessage', + 'status' => 'setStatus', + 'trackingNumber' => 'setTrackingNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'errorMessage' => 'getErrorMessage', + 'status' => 'getStatus', + 'trackingNumber' => 'getTrackingNumber' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATUS_CREATED = 'created'; + public const STATUS_DELIVERED = 'delivered'; + public const STATUS_NOT_APPLICABLE = 'notApplicable'; + public const STATUS_PROCESSING = 'processing'; + public const STATUS_PRODUCED = 'produced'; + public const STATUS_REJECTED = 'rejected'; + public const STATUS_SHIPPED = 'shipped'; + public const STATUS_UNKNOWN = 'unknown'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_CREATED, + self::STATUS_DELIVERED, + self::STATUS_NOT_APPLICABLE, + self::STATUS_PROCESSING, + self::STATUS_PRODUCED, + self::STATUS_REJECTED, + self::STATUS_SHIPPED, + self::STATUS_UNKNOWN, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('errorMessage', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('trackingNumber', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets errorMessage + * + * @return string|null + */ + public function getErrorMessage() + { + return $this->container['errorMessage']; + } + + /** + * Sets errorMessage + * + * @param string|null $errorMessage Error message. + * + * @return self + */ + public function setErrorMessage($errorMessage) + { + if (is_null($errorMessage)) { + throw new \InvalidArgumentException('non-nullable errorMessage cannot be null'); + } + $this->container['errorMessage'] = $errorMessage; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Status of the delivery. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets trackingNumber + * + * @return string|null + */ + public function getTrackingNumber() + { + return $this->container['trackingNumber']; + } + + /** + * Sets trackingNumber + * + * @param string|null $trackingNumber Tracking number of the delivery. + * + * @return self + */ + public function setTrackingNumber($trackingNumber) + { + if (is_null($trackingNumber)) { + throw new \InvalidArgumentException('non-nullable trackingNumber cannot be null'); + } + $this->container['trackingNumber'] = $trackingNumber; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/ConfigurationWebhook/CardOrderNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhook/CardOrderNotificationRequest.php new file mode 100644 index 000000000..3de54173c --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/CardOrderNotificationRequest.php @@ -0,0 +1,494 @@ + + */ +class CardOrderNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardOrderNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ConfigurationWebhook\CardOrderItem', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_CREATED = 'balancePlatform.cardorder.created'; + public const TYPE_UPDATED = 'balancePlatform.cardorder.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CREATED, + self::TYPE_UPDATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ConfigurationWebhook\CardOrderItem + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ConfigurationWebhook\CardOrderItem $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/ConfigurationWebhook/Contact.php b/src/Adyen/Model/ConfigurationWebhook/Contact.php new file mode 100644 index 000000000..4c619a105 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Contact.php @@ -0,0 +1,588 @@ + + */ +class Contact implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Contact'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'address' => '\Adyen\Model\ConfigurationWebhook\Address', + 'email' => 'string', + 'fullPhoneNumber' => 'string', + 'name' => '\Adyen\Model\ConfigurationWebhook\Name', + 'personalData' => '\Adyen\Model\ConfigurationWebhook\PersonalData', + 'phoneNumber' => '\Adyen\Model\ConfigurationWebhook\PhoneNumber', + 'webAddress' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'address' => null, + 'email' => null, + 'fullPhoneNumber' => null, + 'name' => null, + 'personalData' => null, + 'phoneNumber' => null, + 'webAddress' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'address' => false, + 'email' => false, + 'fullPhoneNumber' => false, + 'name' => false, + 'personalData' => false, + 'phoneNumber' => false, + 'webAddress' => 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', + 'email' => 'email', + 'fullPhoneNumber' => 'fullPhoneNumber', + 'name' => 'name', + 'personalData' => 'personalData', + 'phoneNumber' => 'phoneNumber', + 'webAddress' => 'webAddress' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'email' => 'setEmail', + 'fullPhoneNumber' => 'setFullPhoneNumber', + 'name' => 'setName', + 'personalData' => 'setPersonalData', + 'phoneNumber' => 'setPhoneNumber', + 'webAddress' => 'setWebAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'email' => 'getEmail', + 'fullPhoneNumber' => 'getFullPhoneNumber', + 'name' => 'getName', + 'personalData' => 'getPersonalData', + 'phoneNumber' => 'getPhoneNumber', + 'webAddress' => 'getWebAddress' + ]; + + /** + * 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('email', $data ?? [], null); + $this->setIfExists('fullPhoneNumber', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('personalData', $data ?? [], null); + $this->setIfExists('phoneNumber', $data ?? [], null); + $this->setIfExists('webAddress', $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\ConfigurationWebhook\Address|null + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Adyen\Model\ConfigurationWebhook\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 email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The e-mail address of the contact. + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets fullPhoneNumber + * + * @return string|null + */ + public function getFullPhoneNumber() + { + return $this->container['fullPhoneNumber']; + } + + /** + * Sets fullPhoneNumber + * + * @param string|null $fullPhoneNumber The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" + * + * @return self + */ + public function setFullPhoneNumber($fullPhoneNumber) + { + if (is_null($fullPhoneNumber)) { + throw new \InvalidArgumentException('non-nullable fullPhoneNumber cannot be null'); + } + $this->container['fullPhoneNumber'] = $fullPhoneNumber; + + return $this; + } + + /** + * Gets name + * + * @return \Adyen\Model\ConfigurationWebhook\Name|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \Adyen\Model\ConfigurationWebhook\Name|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 personalData + * + * @return \Adyen\Model\ConfigurationWebhook\PersonalData|null + */ + public function getPersonalData() + { + return $this->container['personalData']; + } + + /** + * Sets personalData + * + * @param \Adyen\Model\ConfigurationWebhook\PersonalData|null $personalData personalData + * + * @return self + */ + public function setPersonalData($personalData) + { + if (is_null($personalData)) { + throw new \InvalidArgumentException('non-nullable personalData cannot be null'); + } + $this->container['personalData'] = $personalData; + + return $this; + } + + /** + * Gets phoneNumber + * + * @return \Adyen\Model\ConfigurationWebhook\PhoneNumber|null + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param \Adyen\Model\ConfigurationWebhook\PhoneNumber|null $phoneNumber phoneNumber + * + * @return self + */ + public function setPhoneNumber($phoneNumber) + { + if (is_null($phoneNumber)) { + throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); + } + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + + /** + * Gets webAddress + * + * @return string|null + */ + public function getWebAddress() + { + return $this->container['webAddress']; + } + + /** + * Sets webAddress + * + * @param string|null $webAddress The URL of the website of the contact. + * + * @return self + */ + public function setWebAddress($webAddress) + { + if (is_null($webAddress)) { + throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); + } + $this->container['webAddress'] = $webAddress; + + 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/ConfigurationWebhook/ContactDetails.php b/src/Adyen/Model/ConfigurationWebhook/ContactDetails.php new file mode 100644 index 000000000..398d24b1b --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/ContactDetails.php @@ -0,0 +1,495 @@ + + */ +class ContactDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ContactDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'address' => '\Adyen\Model\ConfigurationWebhook\Address', + 'email' => 'string', + 'phone' => '\Adyen\Model\ConfigurationWebhook\Phone', + 'webAddress' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'address' => null, + 'email' => null, + 'phone' => null, + 'webAddress' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'address' => false, + 'email' => false, + 'phone' => false, + 'webAddress' => 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', + 'email' => 'email', + 'phone' => 'phone', + 'webAddress' => 'webAddress' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'email' => 'setEmail', + 'phone' => 'setPhone', + 'webAddress' => 'setWebAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'email' => 'getEmail', + 'phone' => 'getPhone', + 'webAddress' => 'getWebAddress' + ]; + + /** + * 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('email', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('webAddress', $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['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['phone'] === null) { + $invalidProperties[] = "'phone' 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 address + * + * @return \Adyen\Model\ConfigurationWebhook\Address + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Adyen\Model\ConfigurationWebhook\Address $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 email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email The email address of the account holder. + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets phone + * + * @return \Adyen\Model\ConfigurationWebhook\Phone + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param \Adyen\Model\ConfigurationWebhook\Phone $phone phone + * + * @return self + */ + public function setPhone($phone) + { + if (is_null($phone)) { + throw new \InvalidArgumentException('non-nullable phone cannot be null'); + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets webAddress + * + * @return string|null + */ + public function getWebAddress() + { + return $this->container['webAddress']; + } + + /** + * Sets webAddress + * + * @param string|null $webAddress The URL of the account holder's website. + * + * @return self + */ + public function setWebAddress($webAddress) + { + if (is_null($webAddress)) { + throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); + } + $this->container['webAddress'] = $webAddress; + + 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/ConfigurationWebhook/Expiry.php b/src/Adyen/Model/ConfigurationWebhook/Expiry.php new file mode 100644 index 000000000..250ff6980 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Expiry.php @@ -0,0 +1,418 @@ + + */ +class Expiry implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Expiry'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'month' => 'string', + 'year' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'month' => null, + 'year' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'month' => false, + 'year' => 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 = [ + 'month' => 'month', + 'year' => 'year' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'month' => 'setMonth', + 'year' => 'setYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'month' => 'getMonth', + 'year' => 'getYear' + ]; + + /** + * 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('month', $data ?? [], null); + $this->setIfExists('year', $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 month + * + * @return string|null + */ + public function getMonth() + { + return $this->container['month']; + } + + /** + * Sets month + * + * @param string|null $month The month in which the card will expire. + * + * @return self + */ + public function setMonth($month) + { + if (is_null($month)) { + throw new \InvalidArgumentException('non-nullable month cannot be null'); + } + $this->container['month'] = $month; + + return $this; + } + + /** + * Gets year + * + * @return string|null + */ + public function getYear() + { + return $this->container['year']; + } + + /** + * Sets year + * + * @param string|null $year The year in which the card will expire. + * + * @return self + */ + public function setYear($year) + { + if (is_null($year)) { + throw new \InvalidArgumentException('non-nullable year cannot be null'); + } + $this->container['year'] = $year; + + 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/ConfigurationWebhook/IbanAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhook/IbanAccountIdentification.php new file mode 100644 index 000000000..369570b41 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/IbanAccountIdentification.php @@ -0,0 +1,455 @@ + + */ +class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'IbanAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'iban' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'iban' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'iban' => 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 = [ + 'iban' => 'iban', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'iban' => 'setIban', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'iban' => 'getIban', + '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_IBAN = 'iban'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_IBAN, + ]; + } + /** + * 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('iban', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'iban'); + } + + /** + * 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['iban'] === null) { + $invalidProperties[] = "'iban' 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 iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **iban** + * + * @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/ConfigurationWebhook/ModelInterface.php b/src/Adyen/Model/ConfigurationWebhook/ModelInterface.php new file mode 100644 index 000000000..2326d1b1e --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/ModelInterface.php @@ -0,0 +1,92 @@ + + */ +class Name implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Name'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'lastName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'lastName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'lastName' => 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 = [ + 'firstName' => 'firstName', + 'lastName' => 'lastName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('lastName', $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['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' 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 firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName The first name. + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName The last name. + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + 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/ConfigurationWebhook/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhook/ObjectSerializer.php new file mode 100644 index 000000000..ae61ecb0c --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/ObjectSerializer.php @@ -0,0 +1,316 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/ConfigurationWebhook/PaymentInstrument.php b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrument.php new file mode 100644 index 000000000..27cca3d9f --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrument.php @@ -0,0 +1,782 @@ + + */ +class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrument'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balanceAccountId' => 'string', + 'bankAccount' => '\Adyen\Model\ConfigurationWebhook\PaymentInstrumentBankAccount', + 'card' => '\Adyen\Model\ConfigurationWebhook\Card', + 'description' => 'string', + 'id' => 'string', + 'issuingCountryCode' => 'string', + 'paymentInstrumentGroupId' => 'string', + 'reference' => 'string', + 'status' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balanceAccountId' => null, + 'bankAccount' => null, + 'card' => null, + 'description' => null, + 'id' => null, + 'issuingCountryCode' => null, + 'paymentInstrumentGroupId' => null, + 'reference' => null, + 'status' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balanceAccountId' => false, + 'bankAccount' => false, + 'card' => false, + 'description' => false, + 'id' => false, + 'issuingCountryCode' => false, + 'paymentInstrumentGroupId' => false, + 'reference' => false, + 'status' => 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 = [ + 'balanceAccountId' => 'balanceAccountId', + 'bankAccount' => 'bankAccount', + 'card' => 'card', + 'description' => 'description', + 'id' => 'id', + 'issuingCountryCode' => 'issuingCountryCode', + 'paymentInstrumentGroupId' => 'paymentInstrumentGroupId', + 'reference' => 'reference', + 'status' => 'status', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balanceAccountId' => 'setBalanceAccountId', + 'bankAccount' => 'setBankAccount', + 'card' => 'setCard', + 'description' => 'setDescription', + 'id' => 'setId', + 'issuingCountryCode' => 'setIssuingCountryCode', + 'paymentInstrumentGroupId' => 'setPaymentInstrumentGroupId', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balanceAccountId' => 'getBalanceAccountId', + 'bankAccount' => 'getBankAccount', + 'card' => 'getCard', + 'description' => 'getDescription', + 'id' => 'getId', + 'issuingCountryCode' => 'getIssuingCountryCode', + 'paymentInstrumentGroupId' => 'getPaymentInstrumentGroupId', + 'reference' => 'getReference', + 'status' => 'getStatus', + '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 STATUS_ACTIVE = 'Active'; + public const STATUS_CLOSED = 'Closed'; + public const STATUS_INACTIVE = 'Inactive'; + public const STATUS_LOST = 'Lost'; + public const STATUS_REQUESTED = 'Requested'; + public const STATUS_STOLEN = 'Stolen'; + public const STATUS_SUSPENDED = 'Suspended'; + public const STATUS_BLOCKED = 'blocked'; + public const STATUS_DISCARDED = 'discarded'; + public const TYPE_BANK_ACCOUNT = 'bankAccount'; + public const TYPE_CARD = 'card'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_CLOSED, + self::STATUS_INACTIVE, + self::STATUS_LOST, + self::STATUS_REQUESTED, + self::STATUS_STOLEN, + self::STATUS_SUSPENDED, + self::STATUS_BLOCKED, + self::STATUS_DISCARDED, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK_ACCOUNT, + self::TYPE_CARD, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balanceAccountId', $data ?? [], null); + $this->setIfExists('bankAccount', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('paymentInstrumentGroupId', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['balanceAccountId'] === null) { + $invalidProperties[] = "'balanceAccountId' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['issuingCountryCode'] === null) { + $invalidProperties[] = "'issuingCountryCode' 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) + ); + } + + 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 balanceAccountId + * + * @return string + */ + public function getBalanceAccountId() + { + return $this->container['balanceAccountId']; + } + + /** + * Sets balanceAccountId + * + * @param string $balanceAccountId The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. + * + * @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 bankAccount + * + * @return \Adyen\Model\ConfigurationWebhook\PaymentInstrumentBankAccount|null + */ + public function getBankAccount() + { + return $this->container['bankAccount']; + } + + /** + * Sets bankAccount + * + * @param \Adyen\Model\ConfigurationWebhook\PaymentInstrumentBankAccount|null $bankAccount bankAccount + * + * @return self + */ + public function setBankAccount($bankAccount) + { + if (is_null($bankAccount)) { + throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); + } + $this->container['bankAccount'] = $bankAccount; + + return $this; + } + + /** + * Gets card + * + * @return \Adyen\Model\ConfigurationWebhook\Card|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \Adyen\Model\ConfigurationWebhook\Card|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + throw new \InvalidArgumentException('non-nullable card cannot be null'); + } + $this->container['card'] = $card; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Your description for the payment instrument, maximum 300 characters. + * + * @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 id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the payment instrument. + * + * @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 issuingCountryCode + * + * @return string + */ + public function getIssuingCountryCode() + { + return $this->container['issuingCountryCode']; + } + + /** + * Sets issuingCountryCode + * + * @param string $issuingCountryCode The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. + * + * @return self + */ + public function setIssuingCountryCode($issuingCountryCode) + { + if (is_null($issuingCountryCode)) { + throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); + } + $this->container['issuingCountryCode'] = $issuingCountryCode; + + return $this; + } + + /** + * Gets paymentInstrumentGroupId + * + * @return string|null + */ + public function getPaymentInstrumentGroupId() + { + return $this->container['paymentInstrumentGroupId']; + } + + /** + * Sets paymentInstrumentGroupId + * + * @param string|null $paymentInstrumentGroupId The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. + * + * @return self + */ + public function setPaymentInstrumentGroupId($paymentInstrumentGroupId) + { + if (is_null($paymentInstrumentGroupId)) { + throw new \InvalidArgumentException('non-nullable paymentInstrumentGroupId cannot be null'); + } + $this->container['paymentInstrumentGroupId'] = $paymentInstrumentGroupId; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment instrument, maximum 150 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **Active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **Requested**. Possible values: * **Active**: The payment instrument is active and can be used to make payments. * **Requested**: The payment instrument has been requested. This state is applicable for physical cards. * **Inactive**: The payment instrument is inactive and cannot be used to make payments. * **Suspended**: The payment instrument is temporarily suspended and cannot be used to make payments. * **Closed**: The payment instrument is permanently closed. This action cannot be undone. * **Stolen** * **Lost** + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of payment instrument. Possible value: **card**, **bankAccount**. + * + * @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/ConfigurationWebhook/PaymentInstrumentBankAccount.php b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentBankAccount.php new file mode 100644 index 000000000..cdcdad043 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentBankAccount.php @@ -0,0 +1,534 @@ + + */ +class PaymentInstrumentBankAccount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrument_bankAccount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'iban' => 'string', + 'type' => 'string', + 'accountNumber' => 'string', + 'accountType' => 'string', + 'routingNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'iban' => null, + 'type' => null, + 'accountNumber' => null, + 'accountType' => null, + 'routingNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'iban' => false, + 'type' => false, + 'accountNumber' => false, + 'accountType' => false, + 'routingNumber' => 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 = [ + 'iban' => 'iban', + 'type' => 'type', + 'accountNumber' => 'accountNumber', + 'accountType' => 'accountType', + 'routingNumber' => 'routingNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'iban' => 'setIban', + 'type' => 'setType', + 'accountNumber' => 'setAccountNumber', + 'accountType' => 'setAccountType', + 'routingNumber' => 'setRoutingNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'iban' => 'getIban', + 'type' => 'getType', + 'accountNumber' => 'getAccountNumber', + 'accountType' => 'getAccountType', + 'routingNumber' => 'getRoutingNumber' + ]; + + /** + * 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('iban', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('routingNumber', $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['iban'] === null) { + $invalidProperties[] = "'iban' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + + if ($this->container['accountNumber'] === null) { + $invalidProperties[] = "'accountNumber' can't be null"; + } + + if ($this->container['routingNumber'] === null) { + $invalidProperties[] = "'routingNumber' 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 iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **usLocal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets accountNumber + * + * @return string + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string $accountNumber The 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 accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets routingNumber + * + * @return string + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string $routingNumber The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + if (is_null($routingNumber)) { + throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); + } + $this->container['routingNumber'] = $routingNumber; + + 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/ConfigurationWebhook/PaymentInstrumentNotificationData.php b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentNotificationData.php new file mode 100644 index 000000000..e4cc3d1ae --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentNotificationData.php @@ -0,0 +1,418 @@ + + */ +class PaymentInstrumentNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrumentNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'paymentInstrument' => '\Adyen\Model\ConfigurationWebhook\PaymentInstrument' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'paymentInstrument' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'paymentInstrument' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'paymentInstrument' => 'paymentInstrument' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'paymentInstrument' => 'setPaymentInstrument' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'paymentInstrument' => 'getPaymentInstrument' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('paymentInstrument', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets paymentInstrument + * + * @return \Adyen\Model\ConfigurationWebhook\PaymentInstrument|null + */ + public function getPaymentInstrument() + { + return $this->container['paymentInstrument']; + } + + /** + * Sets paymentInstrument + * + * @param \Adyen\Model\ConfigurationWebhook\PaymentInstrument|null $paymentInstrument paymentInstrument + * + * @return self + */ + public function setPaymentInstrument($paymentInstrument) + { + if (is_null($paymentInstrument)) { + throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); + } + $this->container['paymentInstrument'] = $paymentInstrument; + + 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/ConfigurationWebhook/PaymentInstrumentReference.php b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentReference.php new file mode 100644 index 000000000..6133ae1ad --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PaymentInstrumentReference.php @@ -0,0 +1,387 @@ + + */ +class PaymentInstrumentReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrumentReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'id' => 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' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * 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('id', $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['id'] === null) { + $invalidProperties[] = "'id' 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 id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the payment instrument. + * + * @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; + } + /** + * 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/ConfigurationWebhook/PaymentNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhook/PaymentNotificationRequest.php new file mode 100644 index 000000000..7b4a13f4a --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PaymentNotificationRequest.php @@ -0,0 +1,494 @@ + + */ +class PaymentNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ConfigurationWebhook\PaymentInstrumentNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_CREATED = 'balancePlatform.paymentInstrument.created'; + public const TYPE_UPDATED = 'balancePlatform.paymentInstrument.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CREATED, + self::TYPE_UPDATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ConfigurationWebhook\PaymentInstrumentNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ConfigurationWebhook\PaymentInstrumentNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/ConfigurationWebhook/PersonalData.php b/src/Adyen/Model/ConfigurationWebhook/PersonalData.php new file mode 100644 index 000000000..9ef4eb63f --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PersonalData.php @@ -0,0 +1,452 @@ + + */ +class PersonalData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PersonalData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'dateOfBirth' => 'string', + 'idNumber' => 'string', + 'nationality' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'dateOfBirth' => null, + 'idNumber' => null, + 'nationality' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'dateOfBirth' => false, + 'idNumber' => false, + 'nationality' => 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 = [ + 'dateOfBirth' => 'dateOfBirth', + 'idNumber' => 'idNumber', + 'nationality' => 'nationality' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'dateOfBirth' => 'setDateOfBirth', + 'idNumber' => 'setIdNumber', + 'nationality' => 'setNationality' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'dateOfBirth' => 'getDateOfBirth', + 'idNumber' => 'getIdNumber', + 'nationality' => 'getNationality' + ]; + + /** + * 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('dateOfBirth', $data ?? [], null); + $this->setIfExists('idNumber', $data ?? [], null); + $this->setIfExists('nationality', $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 dateOfBirth + * + * @return string|null + */ + public function getDateOfBirth() + { + return $this->container['dateOfBirth']; + } + + /** + * Sets dateOfBirth + * + * @param string|null $dateOfBirth The date of birth of the person. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). + * + * @return self + */ + public function setDateOfBirth($dateOfBirth) + { + if (is_null($dateOfBirth)) { + throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets idNumber + * + * @return string|null + */ + public function getIdNumber() + { + return $this->container['idNumber']; + } + + /** + * Sets idNumber + * + * @param string|null $idNumber An ID number of the person. + * + * @return self + */ + public function setIdNumber($idNumber) + { + if (is_null($idNumber)) { + throw new \InvalidArgumentException('non-nullable idNumber cannot be null'); + } + $this->container['idNumber'] = $idNumber; + + return $this; + } + + /** + * Gets nationality + * + * @return string|null + */ + public function getNationality() + { + return $this->container['nationality']; + } + + /** + * Sets nationality + * + * @param string|null $nationality The nationality of the person represented by a two-character country code. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). + * + * @return self + */ + public function setNationality($nationality) + { + if (is_null($nationality)) { + throw new \InvalidArgumentException('non-nullable nationality cannot be null'); + } + $this->container['nationality'] = $nationality; + + 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/ConfigurationWebhook/Phone.php b/src/Adyen/Model/ConfigurationWebhook/Phone.php new file mode 100644 index 000000000..9ce2c42b1 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Phone.php @@ -0,0 +1,457 @@ + + */ +class Phone implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Phone'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'number' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'number' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'number' => 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 = [ + 'number' => 'number', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'number' => 'setNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'number' => 'getNumber', + '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_LANDLINE = 'Landline'; + public const TYPE_MOBILE = 'Mobile'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_LANDLINE, + self::TYPE_MOBILE, + ]; + } + /** + * 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('number', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['number'] === null) { + $invalidProperties[] = "'number' 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 number + * + * @return string + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string $number The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of phone number. Possible values: **Landline**, **Mobile**. + * + * @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/ConfigurationWebhook/PhoneNumber.php b/src/Adyen/Model/ConfigurationWebhook/PhoneNumber.php new file mode 100644 index 000000000..dade25a59 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PhoneNumber.php @@ -0,0 +1,489 @@ + + */ +class PhoneNumber implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PhoneNumber'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'phoneCountryCode' => 'string', + 'phoneNumber' => 'string', + 'phoneType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'phoneCountryCode' => null, + 'phoneNumber' => null, + 'phoneType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'phoneCountryCode' => false, + 'phoneNumber' => false, + 'phoneType' => 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 = [ + 'phoneCountryCode' => 'phoneCountryCode', + 'phoneNumber' => 'phoneNumber', + 'phoneType' => 'phoneType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'phoneCountryCode' => 'setPhoneCountryCode', + 'phoneNumber' => 'setPhoneNumber', + 'phoneType' => 'setPhoneType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'phoneCountryCode' => 'getPhoneCountryCode', + 'phoneNumber' => 'getPhoneNumber', + 'phoneType' => 'getPhoneType' + ]; + + /** + * 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 PHONE_TYPE_FAX = 'Fax'; + public const PHONE_TYPE_LANDLINE = 'Landline'; + public const PHONE_TYPE_MOBILE = 'Mobile'; + public const PHONE_TYPE_SIP = 'SIP'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPhoneTypeAllowableValues() + { + return [ + self::PHONE_TYPE_FAX, + self::PHONE_TYPE_LANDLINE, + self::PHONE_TYPE_MOBILE, + self::PHONE_TYPE_SIP, + ]; + } + /** + * 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('phoneCountryCode', $data ?? [], null); + $this->setIfExists('phoneNumber', $data ?? [], null); + $this->setIfExists('phoneType', $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->getPhoneTypeAllowableValues(); + if (!is_null($this->container['phoneType']) && !in_array($this->container['phoneType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'phoneType', must be one of '%s'", + $this->container['phoneType'], + 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 phoneCountryCode + * + * @return string|null + */ + public function getPhoneCountryCode() + { + return $this->container['phoneCountryCode']; + } + + /** + * Sets phoneCountryCode + * + * @param string|null $phoneCountryCode The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**. + * + * @return self + */ + public function setPhoneCountryCode($phoneCountryCode) + { + if (is_null($phoneCountryCode)) { + throw new \InvalidArgumentException('non-nullable phoneCountryCode cannot be null'); + } + $this->container['phoneCountryCode'] = $phoneCountryCode; + + return $this; + } + + /** + * Gets phoneNumber + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param string|null $phoneNumber The phone number. The inclusion of the phone number country code is not necessary. + * + * @return self + */ + public function setPhoneNumber($phoneNumber) + { + if (is_null($phoneNumber)) { + throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); + } + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + + /** + * Gets phoneType + * + * @return string|null + */ + public function getPhoneType() + { + return $this->container['phoneType']; + } + + /** + * Sets phoneType + * + * @param string|null $phoneType The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. + * + * @return self + */ + public function setPhoneType($phoneType) + { + if (is_null($phoneType)) { + throw new \InvalidArgumentException('non-nullable phoneType cannot be null'); + } + $allowedValues = $this->getPhoneTypeAllowableValues(); + if (!in_array($phoneType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'phoneType', must be one of '%s'", + $phoneType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['phoneType'] = $phoneType; + + 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/ConfigurationWebhook/PlatformPaymentConfiguration.php b/src/Adyen/Model/ConfigurationWebhook/PlatformPaymentConfiguration.php new file mode 100644 index 000000000..835611684 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/PlatformPaymentConfiguration.php @@ -0,0 +1,416 @@ + + */ +class PlatformPaymentConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PlatformPaymentConfiguration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'salesDayClosingTime' => 'string', + 'settlementDelayDays' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'salesDayClosingTime' => 'time', + 'settlementDelayDays' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'salesDayClosingTime' => false, + 'settlementDelayDays' => 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 = [ + 'salesDayClosingTime' => 'salesDayClosingTime', + 'settlementDelayDays' => 'settlementDelayDays' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'salesDayClosingTime' => 'setSalesDayClosingTime', + 'settlementDelayDays' => 'setSettlementDelayDays' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'salesDayClosingTime' => 'getSalesDayClosingTime', + 'settlementDelayDays' => 'getSettlementDelayDays' + ]; + + /** + * 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('salesDayClosingTime', $data ?? [], null); + $this->setIfExists('settlementDelayDays', $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 salesDayClosingTime + * + * @return string|null + */ + public function getSalesDayClosingTime() + { + return $this->container['salesDayClosingTime']; + } + + /** + * Sets salesDayClosingTime + * + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * + * @return self + */ + public function setSalesDayClosingTime($salesDayClosingTime) + { + if (is_null($salesDayClosingTime)) { + throw new \InvalidArgumentException('non-nullable salesDayClosingTime cannot be null'); + } + $this->container['salesDayClosingTime'] = $salesDayClosingTime; + + return $this; + } + + /** + * Gets settlementDelayDays + * + * @return int|null + */ + public function getSettlementDelayDays() + { + return $this->container['settlementDelayDays']; + } + + /** + * Sets settlementDelayDays + * + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. + * + * @return self + */ + public function setSettlementDelayDays($settlementDelayDays) + { + // Do nothing for nullable integers + $this->container['settlementDelayDays'] = $settlementDelayDays; + + 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/ConfigurationWebhook/RemediatingAction.php b/src/Adyen/Model/ConfigurationWebhook/RemediatingAction.php new file mode 100644 index 000000000..ad9f2df94 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/RemediatingAction.php @@ -0,0 +1,418 @@ + + */ +class RemediatingAction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RemediatingAction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'code' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The remediating action code. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A description of how you can resolve the verification error. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * 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/ConfigurationWebhook/Resource.php b/src/Adyen/Model/ConfigurationWebhook/Resource.php new file mode 100644 index 000000000..7bc6f6d90 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/Resource.php @@ -0,0 +1,452 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** + * 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/ConfigurationWebhook/SweepConfigurationNotificationData.php b/src/Adyen/Model/ConfigurationWebhook/SweepConfigurationNotificationData.php new file mode 100644 index 000000000..d7a80e9af --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/SweepConfigurationNotificationData.php @@ -0,0 +1,452 @@ + + */ +class SweepConfigurationNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SweepConfigurationNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountId' => 'string', + 'balancePlatform' => 'string', + 'sweep' => '\Adyen\Model\ConfigurationWebhook\SweepConfigurationV2' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountId' => null, + 'balancePlatform' => null, + 'sweep' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountId' => false, + 'balancePlatform' => false, + 'sweep' => 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 = [ + 'accountId' => 'accountId', + 'balancePlatform' => 'balancePlatform', + 'sweep' => 'sweep' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountId' => 'setAccountId', + 'balancePlatform' => 'setBalancePlatform', + 'sweep' => 'setSweep' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountId' => 'getAccountId', + 'balancePlatform' => 'getBalancePlatform', + 'sweep' => 'getSweep' + ]; + + /** + * 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('accountId', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('sweep', $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 accountId + * + * @return string|null + */ + public function getAccountId() + { + return $this->container['accountId']; + } + + /** + * Sets accountId + * + * @param string|null $accountId The unique identifier of the balance account for which the sweep was configured. + * + * @return self + */ + public function setAccountId($accountId) + { + if (is_null($accountId)) { + throw new \InvalidArgumentException('non-nullable accountId cannot be null'); + } + $this->container['accountId'] = $accountId; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets sweep + * + * @return \Adyen\Model\ConfigurationWebhook\SweepConfigurationV2|null + */ + public function getSweep() + { + return $this->container['sweep']; + } + + /** + * Sets sweep + * + * @param \Adyen\Model\ConfigurationWebhook\SweepConfigurationV2|null $sweep sweep + * + * @return self + */ + public function setSweep($sweep) + { + if (is_null($sweep)) { + throw new \InvalidArgumentException('non-nullable sweep cannot be null'); + } + $this->container['sweep'] = $sweep; + + 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/ConfigurationWebhook/SweepConfigurationNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhook/SweepConfigurationNotificationRequest.php new file mode 100644 index 000000000..d82d833e7 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/SweepConfigurationNotificationRequest.php @@ -0,0 +1,496 @@ + + */ +class SweepConfigurationNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SweepConfigurationNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ConfigurationWebhook\SweepConfigurationNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_CREATED = 'balancePlatform.balanceAccountSweep.created'; + public const TYPE_UPDATED = 'balancePlatform.balanceAccountSweep.updated'; + public const TYPE_DELETED = 'balancePlatform.balanceAccountSweep.deleted'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CREATED, + self::TYPE_UPDATED, + self::TYPE_DELETED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ConfigurationWebhook\SweepConfigurationNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ConfigurationWebhook\SweepConfigurationNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/ConfigurationWebhook/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhook/SweepConfigurationV2.php new file mode 100644 index 000000000..544798836 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/SweepConfigurationV2.php @@ -0,0 +1,863 @@ + + */ +class SweepConfigurationV2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SweepConfigurationV2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'counterparty' => '\Adyen\Model\ConfigurationWebhook\SweepCounterparty', + 'currency' => 'string', + 'description' => 'string', + 'id' => 'string', + 'reason' => 'string', + 'schedule' => '\Adyen\Model\ConfigurationWebhook\SweepSchedule', + 'status' => 'string', + 'sweepAmount' => '\Adyen\Model\ConfigurationWebhook\Amount', + 'targetAmount' => '\Adyen\Model\ConfigurationWebhook\Amount', + 'triggerAmount' => '\Adyen\Model\ConfigurationWebhook\Amount', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'counterparty' => null, + 'currency' => null, + 'description' => null, + 'id' => null, + 'reason' => null, + 'schedule' => null, + 'status' => null, + 'sweepAmount' => null, + 'targetAmount' => null, + 'triggerAmount' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'counterparty' => false, + 'currency' => false, + 'description' => false, + 'id' => false, + 'reason' => false, + 'schedule' => false, + 'status' => false, + 'sweepAmount' => false, + 'targetAmount' => false, + 'triggerAmount' => 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 = [ + 'counterparty' => 'counterparty', + 'currency' => 'currency', + 'description' => 'description', + 'id' => 'id', + 'reason' => 'reason', + 'schedule' => 'schedule', + 'status' => 'status', + 'sweepAmount' => 'sweepAmount', + 'targetAmount' => 'targetAmount', + 'triggerAmount' => 'triggerAmount', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'counterparty' => 'setCounterparty', + 'currency' => 'setCurrency', + 'description' => 'setDescription', + 'id' => 'setId', + 'reason' => 'setReason', + 'schedule' => 'setSchedule', + 'status' => 'setStatus', + 'sweepAmount' => 'setSweepAmount', + 'targetAmount' => 'setTargetAmount', + 'triggerAmount' => 'setTriggerAmount', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'counterparty' => 'getCounterparty', + 'currency' => 'getCurrency', + 'description' => 'getDescription', + 'id' => 'getId', + 'reason' => 'getReason', + 'schedule' => 'getSchedule', + 'status' => 'getStatus', + 'sweepAmount' => 'getSweepAmount', + 'targetAmount' => 'getTargetAmount', + 'triggerAmount' => 'getTriggerAmount', + '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 REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; + public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; + public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; + public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; + public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; + public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; + public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; + public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; + public const REASON_ERROR = 'error'; + public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; + public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; + public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; + public const REASON_UNKNOWN = 'unknown'; + public const STATUS_ACTIVE = 'active'; + public const STATUS_INACTIVE = 'inactive'; + public const TYPE_PULL = 'pull'; + public const TYPE_PUSH = 'push'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getReasonAllowableValues() + { + return [ + self::REASON_AMOUNT_LIMIT_EXCEEDED, + self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, + self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, + self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, + self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, + self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, + self::REASON_COUNTERPARTY_BANK_TIMED_OUT, + self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, + self::REASON_ERROR, + self::REASON_NOT_ENOUGH_BALANCE, + self::REASON_REFUSED_BY_COUNTERPARTY_BANK, + self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, + self::REASON_UNKNOWN, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACTIVE, + self::STATUS_INACTIVE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PULL, + self::TYPE_PUSH, + ]; + } + /** + * 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('currency', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('schedule', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('sweepAmount', $data ?? [], null); + $this->setIfExists('targetAmount', $data ?? [], null); + $this->setIfExists('triggerAmount', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'push'); + } + + /** + * 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['counterparty'] === null) { + $invalidProperties[] = "'counterparty' can't be null"; + } + if ($this->container['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + $allowedValues = $this->getReasonAllowableValues(); + if (!is_null($this->container['reason']) && !in_array($this->container['reason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'reason', must be one of '%s'", + $this->container['reason'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['schedule'] === null) { + $invalidProperties[] = "'schedule' 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) + ); + } + + $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 counterparty + * + * @return \Adyen\Model\ConfigurationWebhook\SweepCounterparty + */ + public function getCounterparty() + { + return $this->container['counterparty']; + } + + /** + * Sets counterparty + * + * @param \Adyen\Model\ConfigurationWebhook\SweepCounterparty $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 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) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). + * + * @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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. + * + * @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 id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the sweep. + * + * @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 reason + * + * @return string|null + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason The reason for disabling the sweep. + * + * @return self + */ + public function setReason($reason) + { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } + $allowedValues = $this->getReasonAllowableValues(); + if (!in_array($reason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'reason', must be one of '%s'", + $reason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets schedule + * + * @return \Adyen\Model\ConfigurationWebhook\SweepSchedule + */ + public function getSchedule() + { + return $this->container['schedule']; + } + + /** + * Sets schedule + * + * @param \Adyen\Model\ConfigurationWebhook\SweepSchedule $schedule schedule + * + * @return self + */ + public function setSchedule($schedule) + { + if (is_null($schedule)) { + throw new \InvalidArgumentException('non-nullable schedule cannot be null'); + } + $this->container['schedule'] = $schedule; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets sweepAmount + * + * @return \Adyen\Model\ConfigurationWebhook\Amount|null + */ + public function getSweepAmount() + { + return $this->container['sweepAmount']; + } + + /** + * Sets sweepAmount + * + * @param \Adyen\Model\ConfigurationWebhook\Amount|null $sweepAmount sweepAmount + * + * @return self + */ + public function setSweepAmount($sweepAmount) + { + if (is_null($sweepAmount)) { + throw new \InvalidArgumentException('non-nullable sweepAmount cannot be null'); + } + $this->container['sweepAmount'] = $sweepAmount; + + return $this; + } + + /** + * Gets targetAmount + * + * @return \Adyen\Model\ConfigurationWebhook\Amount|null + */ + public function getTargetAmount() + { + return $this->container['targetAmount']; + } + + /** + * Sets targetAmount + * + * @param \Adyen\Model\ConfigurationWebhook\Amount|null $targetAmount targetAmount + * + * @return self + */ + public function setTargetAmount($targetAmount) + { + if (is_null($targetAmount)) { + throw new \InvalidArgumentException('non-nullable targetAmount cannot be null'); + } + $this->container['targetAmount'] = $targetAmount; + + return $this; + } + + /** + * Gets triggerAmount + * + * @return \Adyen\Model\ConfigurationWebhook\Amount|null + */ + public function getTriggerAmount() + { + return $this->container['triggerAmount']; + } + + /** + * Sets triggerAmount + * + * @param \Adyen\Model\ConfigurationWebhook\Amount|null $triggerAmount triggerAmount + * + * @return self + */ + public function setTriggerAmount($triggerAmount) + { + if (is_null($triggerAmount)) { + throw new \InvalidArgumentException('non-nullable triggerAmount cannot be null'); + } + $this->container['triggerAmount'] = $triggerAmount; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. + * + * @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/ConfigurationWebhook/SweepCounterparty.php b/src/Adyen/Model/ConfigurationWebhook/SweepCounterparty.php new file mode 100644 index 000000000..a2f97ecb2 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/SweepCounterparty.php @@ -0,0 +1,452 @@ + + */ +class SweepCounterparty implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SweepCounterparty'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balanceAccountId' => 'string', + 'merchantAccount' => 'string', + 'transferInstrumentId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balanceAccountId' => null, + 'merchantAccount' => null, + 'transferInstrumentId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balanceAccountId' => false, + 'merchantAccount' => 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 = [ + 'balanceAccountId' => 'balanceAccountId', + 'merchantAccount' => 'merchantAccount', + 'transferInstrumentId' => 'transferInstrumentId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balanceAccountId' => 'setBalanceAccountId', + 'merchantAccount' => 'setMerchantAccount', + 'transferInstrumentId' => 'setTransferInstrumentId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balanceAccountId' => 'getBalanceAccountId', + 'merchantAccount' => 'getMerchantAccount', + '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('balanceAccountId', $data ?? [], null); + $this->setIfExists('merchantAccount', $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 balanceAccountId + * + * @return string|null + */ + public function getBalanceAccountId() + { + return $this->container['balanceAccountId']; + } + + /** + * Sets balanceAccountId + * + * @param string|null $balanceAccountId The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). You can only use this for periodic sweep schedules such as `schedule.type` **daily** or **monthly**. + * + * @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 merchantAccount + * + * @return string|null + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string|null $merchantAccount The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and `schedule.type` **balance**, and if you are processing payments with Adyen. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets transferInstrumentId + * + * @return string|null + */ + public function getTransferInstrumentId() + { + return $this->container['transferInstrumentId']; + } + + /** + * Sets transferInstrumentId + * + * @param string|null $transferInstrumentId The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To [set up automated top-up sweeps to balance accounts](https://docs.adyen.com/marketplaces-and-platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature. + * + * @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/ConfigurationWebhook/SweepSchedule.php b/src/Adyen/Model/ConfigurationWebhook/SweepSchedule.php new file mode 100644 index 000000000..374d2030a --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/SweepSchedule.php @@ -0,0 +1,460 @@ + + */ +class SweepSchedule implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SweepSchedule'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cronExpression' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cronExpression' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cronExpression' => 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 = [ + 'cronExpression' => 'cronExpression', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cronExpression' => 'setCronExpression', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cronExpression' => 'getCronExpression', + '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_DAILY = 'daily'; + public const TYPE_WEEKLY = 'weekly'; + public const TYPE_MONTHLY = 'monthly'; + public const TYPE_BALANCE = 'balance'; + public const TYPE_CRON = 'cron'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DAILY, + self::TYPE_WEEKLY, + self::TYPE_MONTHLY, + self::TYPE_BALANCE, + self::TYPE_CRON, + ]; + } + /** + * 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('cronExpression', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['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 cronExpression + * + * @return string|null + */ + public function getCronExpression() + { + return $this->container['cronExpression']; + } + + /** + * Sets cronExpression + * + * @param string|null $cronExpression A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: *****, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. + * + * @return self + */ + public function setCronExpression($cronExpression) + { + if (is_null($cronExpression)) { + throw new \InvalidArgumentException('non-nullable cronExpression cannot be null'); + } + $this->container['cronExpression'] = $cronExpression; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **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 + */ + 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/ConfigurationWebhook/USLocalAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhook/USLocalAccountIdentification.php new file mode 100644 index 000000000..f77d12bbb --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/USLocalAccountIdentification.php @@ -0,0 +1,559 @@ + + */ +class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'USLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'accountType' => 'string', + 'routingNumber' => '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, + 'accountType' => null, + 'routingNumber' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'accountType' => false, + 'routingNumber' => 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', + 'accountType' => 'accountType', + 'routingNumber' => 'routingNumber', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'accountType' => 'setAccountType', + 'routingNumber' => 'setRoutingNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'accountType' => 'getAccountType', + 'routingNumber' => 'getRoutingNumber', + '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 ACCOUNT_TYPE_CHECKING = 'checking'; + public const ACCOUNT_TYPE_SAVINGS = 'savings'; + public const TYPE_US_LOCAL = 'usLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountTypeAllowableValues() + { + return [ + self::ACCOUNT_TYPE_CHECKING, + self::ACCOUNT_TYPE_SAVINGS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_US_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('accountType', $data ?? [], 'checking'); + $this->setIfExists('routingNumber', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'usLocal'); + } + + /** + * 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"; + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!is_null($this->container['accountType']) && !in_array($this->container['accountType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountType', must be one of '%s'", + $this->container['accountType'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['routingNumber'] === null) { + $invalidProperties[] = "'routingNumber' 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 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 accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!in_array($accountType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountType', must be one of '%s'", + $accountType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets routingNumber + * + * @return string + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string $routingNumber The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + if (is_null($routingNumber)) { + throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); + } + $this->container['routingNumber'] = $routingNumber; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **usLocal** + * + * @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/ConfigurationWebhook/VerificationDeadline.php b/src/Adyen/Model/ConfigurationWebhook/VerificationDeadline.php new file mode 100644 index 000000000..99bf7ecdb --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/VerificationDeadline.php @@ -0,0 +1,577 @@ + + */ +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[]', + 'entityIds' => '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, + 'entityIds' => null, + 'expiresAt' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'entityIds' => 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', + 'entityIds' => 'entityIds', + 'expiresAt' => 'expiresAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'entityIds' => 'setEntityIds', + 'expiresAt' => 'setExpiresAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'entityIds' => 'getEntityIds', + '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('entityIds', $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 entityIds + * + * @return string[]|null + */ + public function getEntityIds() + { + return $this->container['entityIds']; + } + + /** + * Sets entityIds + * + * @param string[]|null $entityIds The unique identifiers of the bank account(s) that the deadline applies to + * + * @return self + */ + public function setEntityIds($entityIds) + { + if (is_null($entityIds)) { + throw new \InvalidArgumentException('non-nullable entityIds cannot be null'); + } + $this->container['entityIds'] = $entityIds; + + 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/ConfigurationWebhook/VerificationError.php b/src/Adyen/Model/ConfigurationWebhook/VerificationError.php new file mode 100644 index 000000000..e7d1c62f3 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/VerificationError.php @@ -0,0 +1,708 @@ + + */ +class VerificationError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VerificationError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'capabilities' => 'string[]', + 'code' => 'string', + 'message' => 'string', + 'remediatingActions' => '\Adyen\Model\ConfigurationWebhook\RemediatingAction[]', + 'subErrors' => '\Adyen\Model\ConfigurationWebhook\VerificationErrorRecursive[]', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'capabilities' => null, + 'code' => null, + 'message' => null, + 'remediatingActions' => null, + 'subErrors' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'code' => false, + 'message' => false, + 'remediatingActions' => false, + 'subErrors' => 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 = [ + 'capabilities' => 'capabilities', + 'code' => 'code', + 'message' => 'message', + 'remediatingActions' => 'remediatingActions', + 'subErrors' => 'subErrors', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'code' => 'setCode', + 'message' => 'setMessage', + 'remediatingActions' => 'setRemediatingActions', + 'subErrors' => 'setSubErrors', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'code' => 'getCode', + 'message' => 'getMessage', + 'remediatingActions' => 'getRemediatingActions', + 'subErrors' => 'getSubErrors', + '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 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'; + public const TYPE_DATA_MISSING = 'dataMissing'; + public const TYPE_INVALID_INPUT = 'invalidInput'; + public const TYPE_PENDING_STATUS = 'pendingStatus'; + + /** + * 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, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DATA_MISSING, + self::TYPE_INVALID_INPUT, + self::TYPE_PENDING_STATUS, + ]; + } + /** + * 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('code', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('remediatingActions', $data ?? [], null); + $this->setIfExists('subErrors', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 capabilities + * + * @return string[]|null + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param string[]|null $capabilities Contains the capabilities that the verification error applies to. + * + * @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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The verification error code. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A description of the error. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets remediatingActions + * + * @return \Adyen\Model\ConfigurationWebhook\RemediatingAction[]|null + */ + public function getRemediatingActions() + { + return $this->container['remediatingActions']; + } + + /** + * Sets remediatingActions + * + * @param \Adyen\Model\ConfigurationWebhook\RemediatingAction[]|null $remediatingActions Contains the actions that you can take to resolve the verification error. + * + * @return self + */ + public function setRemediatingActions($remediatingActions) + { + if (is_null($remediatingActions)) { + throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); + } + $this->container['remediatingActions'] = $remediatingActions; + + return $this; + } + + /** + * Gets subErrors + * + * @return \Adyen\Model\ConfigurationWebhook\VerificationErrorRecursive[]|null + */ + public function getSubErrors() + { + return $this->container['subErrors']; + } + + /** + * Sets subErrors + * + * @param \Adyen\Model\ConfigurationWebhook\VerificationErrorRecursive[]|null $subErrors Contains more granular information about the verification error. + * + * @return self + */ + public function setSubErrors($subErrors) + { + if (is_null($subErrors)) { + throw new \InvalidArgumentException('non-nullable subErrors cannot be null'); + } + $this->container['subErrors'] = $subErrors; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of error. Possible values: **invalidInput**, **dataMissing**. + * + * @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/ConfigurationWebhook/VerificationErrorRecursive.php b/src/Adyen/Model/ConfigurationWebhook/VerificationErrorRecursive.php new file mode 100644 index 000000000..f0d7221b7 --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhook/VerificationErrorRecursive.php @@ -0,0 +1,674 @@ + + */ +class VerificationErrorRecursive implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VerificationError-recursive'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'capabilities' => 'string[]', + 'code' => 'string', + 'message' => 'string', + 'type' => 'string', + 'remediatingActions' => '\Adyen\Model\ConfigurationWebhook\RemediatingAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'capabilities' => null, + 'code' => null, + 'message' => null, + 'type' => null, + 'remediatingActions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'code' => false, + 'message' => false, + 'type' => false, + 'remediatingActions' => 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', + 'code' => 'code', + 'message' => 'message', + 'type' => 'type', + 'remediatingActions' => 'remediatingActions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'code' => 'setCode', + 'message' => 'setMessage', + 'type' => 'setType', + 'remediatingActions' => 'setRemediatingActions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'code' => 'getCode', + 'message' => 'getMessage', + 'type' => 'getType', + 'remediatingActions' => 'getRemediatingActions' + ]; + + /** + * 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'; + public const TYPE_DATA_MISSING = 'dataMissing'; + public const TYPE_INVALID_INPUT = 'invalidInput'; + public const TYPE_PENDING_STATUS = 'pendingStatus'; + + /** + * 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, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DATA_MISSING, + self::TYPE_INVALID_INPUT, + self::TYPE_PENDING_STATUS, + ]; + } + /** + * 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('code', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('remediatingActions', $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->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 capabilities + * + * @return string[]|null + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param string[]|null $capabilities Contains the capabilities that the verification error applies to. + * + * @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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The verification error code. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A description of the error. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of error. Possible values: **invalidInput**, **dataMissing**. + * + * @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 remediatingActions + * + * @return \Adyen\Model\ConfigurationWebhook\RemediatingAction[]|null + */ + public function getRemediatingActions() + { + return $this->container['remediatingActions']; + } + + /** + * Sets remediatingActions + * + * @param \Adyen\Model\ConfigurationWebhook\RemediatingAction[]|null $remediatingActions Contains the actions that you can take to resolve the verification error. + * + * @return self + */ + public function setRemediatingActions($remediatingActions) + { + if (is_null($remediatingActions)) { + throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); + } + $this->container['remediatingActions'] = $remediatingActions; + + 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/DataProtection/ModelInterface.php b/src/Adyen/Model/DataProtection/ModelInterface.php index 5f444796c..585d5a411 100644 --- a/src/Adyen/Model/DataProtection/ModelInterface.php +++ b/src/Adyen/Model/DataProtection/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 62fa3f0b0..fe8491817 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/DataProtection/ServiceError.php b/src/Adyen/Model/DataProtection/ServiceError.php index d6b6e9e1a..27dd410e6 100644 --- a/src/Adyen/Model/DataProtection/ServiceError.php +++ b/src/Adyen/Model/DataProtection/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php b/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php index 3151ab10c..6d7032426 100644 --- a/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php +++ b/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/DataProtection/SubjectErasureResponse.php b/src/Adyen/Model/DataProtection/SubjectErasureResponse.php index a89f12b2b..628ef2260 100644 --- a/src/Adyen/Model/DataProtection/SubjectErasureResponse.php +++ b/src/Adyen/Model/DataProtection/SubjectErasureResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php index bc5d3107b..5fef23b76 100644 --- a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php index 0c27341fe..94a7ec489 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php index 94f105aaf..080605537 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php b/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php index e3e4d3bb4..676c8a433 100644 --- a/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/Address.php b/src/Adyen/Model/LegalEntityManagement/Address.php index f08cb68ee..d4cefb518 100644 --- a/src/Adyen/Model/LegalEntityManagement/Address.php +++ b/src/Adyen/Model/LegalEntityManagement/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/Amount.php b/src/Adyen/Model/LegalEntityManagement/Amount.php index 23faf9e1f..b071d39a5 100644 --- a/src/Adyen/Model/LegalEntityManagement/Amount.php +++ b/src/Adyen/Model/LegalEntityManagement/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/Attachment.php b/src/Adyen/Model/LegalEntityManagement/Attachment.php index b2d763bee..02bec2207 100644 --- a/src/Adyen/Model/LegalEntityManagement/Attachment.php +++ b/src/Adyen/Model/LegalEntityManagement/Attachment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 571557ec0..2333f2037 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -44,7 +44,7 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'accountIdentification' => '\Adyen\Model\LegalEntityManagement\BankAccount', + 'accountIdentification' => '\Adyen\Model\LegalEntityManagement\BankAccountInfoAccountIdentification', 'accountType' => 'string', 'bankName' => 'string', 'countryCode' => 'string', @@ -307,7 +307,7 @@ public function valid() /** * Gets accountIdentification * - * @return \Adyen\Model\LegalEntityManagement\BankAccount|null + * @return \Adyen\Model\LegalEntityManagement\BankAccountInfoAccountIdentification|null */ public function getAccountIdentification() { @@ -317,7 +317,7 @@ public function getAccountIdentification() /** * Sets accountIdentification * - * @param \Adyen\Model\LegalEntityManagement\BankAccount|null $accountIdentification accountIdentification + * @param \Adyen\Model\LegalEntityManagement\BankAccountInfoAccountIdentification|null $accountIdentification accountIdentification * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php new file mode 100644 index 000000000..bf43d76e3 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php @@ -0,0 +1,864 @@ + + */ +class BankAccountInfoAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankAccountInfo_accountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'bsbCode' => 'string', + 'type' => 'string', + 'accountType' => 'string', + 'institutionNumber' => 'string', + 'transitNumber' => 'string', + 'bankCode' => 'string', + 'clearingCode' => 'string', + 'iban' => 'string', + 'additionalBankIdentification' => '\Adyen\Model\LegalEntityManagement\AdditionalBankIdentification', + 'bic' => 'string', + 'clearingNumber' => 'string', + 'sortCode' => 'string', + 'routingNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountNumber' => null, + 'bsbCode' => null, + 'type' => null, + 'accountType' => null, + 'institutionNumber' => null, + 'transitNumber' => null, + 'bankCode' => null, + 'clearingCode' => null, + 'iban' => null, + 'additionalBankIdentification' => null, + 'bic' => null, + 'clearingNumber' => null, + 'sortCode' => null, + 'routingNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'bsbCode' => false, + 'type' => false, + 'accountType' => false, + 'institutionNumber' => false, + 'transitNumber' => false, + 'bankCode' => false, + 'clearingCode' => false, + 'iban' => false, + 'additionalBankIdentification' => false, + 'bic' => false, + 'clearingNumber' => false, + 'sortCode' => false, + 'routingNumber' => 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', + 'bsbCode' => 'bsbCode', + 'type' => 'type', + 'accountType' => 'accountType', + 'institutionNumber' => 'institutionNumber', + 'transitNumber' => 'transitNumber', + 'bankCode' => 'bankCode', + 'clearingCode' => 'clearingCode', + 'iban' => 'iban', + 'additionalBankIdentification' => 'additionalBankIdentification', + 'bic' => 'bic', + 'clearingNumber' => 'clearingNumber', + 'sortCode' => 'sortCode', + 'routingNumber' => 'routingNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bsbCode' => 'setBsbCode', + 'type' => 'setType', + 'accountType' => 'setAccountType', + 'institutionNumber' => 'setInstitutionNumber', + 'transitNumber' => 'setTransitNumber', + 'bankCode' => 'setBankCode', + 'clearingCode' => 'setClearingCode', + 'iban' => 'setIban', + 'additionalBankIdentification' => 'setAdditionalBankIdentification', + 'bic' => 'setBic', + 'clearingNumber' => 'setClearingNumber', + 'sortCode' => 'setSortCode', + 'routingNumber' => 'setRoutingNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'bsbCode' => 'getBsbCode', + 'type' => 'getType', + 'accountType' => 'getAccountType', + 'institutionNumber' => 'getInstitutionNumber', + 'transitNumber' => 'getTransitNumber', + 'bankCode' => 'getBankCode', + 'clearingCode' => 'getClearingCode', + 'iban' => 'getIban', + 'additionalBankIdentification' => 'getAdditionalBankIdentification', + 'bic' => 'getBic', + 'clearingNumber' => 'getClearingNumber', + 'sortCode' => 'getSortCode', + 'routingNumber' => 'getRoutingNumber' + ]; + + /** + * 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('accountNumber', $data ?? [], null); + $this->setIfExists('bsbCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('institutionNumber', $data ?? [], null); + $this->setIfExists('transitNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); + $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('additionalBankIdentification', $data ?? [], null); + $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('clearingNumber', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); + $this->setIfExists('routingNumber', $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['accountNumber'] === null) { + $invalidProperties[] = "'accountNumber' can't be null"; + } + if ($this->container['bsbCode'] === null) { + $invalidProperties[] = "'bsbCode' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + + + if ($this->container['institutionNumber'] === null) { + $invalidProperties[] = "'institutionNumber' can't be null"; + } + if ($this->container['transitNumber'] === null) { + $invalidProperties[] = "'transitNumber' can't be null"; + } + if ($this->container['bankCode'] === null) { + $invalidProperties[] = "'bankCode' can't be null"; + } + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; + } + if ($this->container['iban'] === null) { + $invalidProperties[] = "'iban' can't be null"; + } + if ($this->container['bic'] === null) { + $invalidProperties[] = "'bic' can't be null"; + } + if ($this->container['clearingNumber'] === null) { + $invalidProperties[] = "'clearingNumber' can't be null"; + } + if ($this->container['sortCode'] === null) { + $invalidProperties[] = "'sortCode' can't be null"; + } + if ($this->container['routingNumber'] === null) { + $invalidProperties[] = "'routingNumber' 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 accountNumber + * + * @return string + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string $accountNumber The 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 bsbCode + * + * @return string + */ + public function getBsbCode() + { + return $this->container['bsbCode']; + } + + /** + * Sets bsbCode + * + * @param string $bsbCode The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + * + * @return self + */ + public function setBsbCode($bsbCode) + { + if (is_null($bsbCode)) { + throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); + } + $this->container['bsbCode'] = $bsbCode; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **usLocal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets institutionNumber + * + * @return string + */ + public function getInstitutionNumber() + { + return $this->container['institutionNumber']; + } + + /** + * Sets institutionNumber + * + * @param string $institutionNumber The 3-digit institution number, without separators or whitespace. + * + * @return self + */ + public function setInstitutionNumber($institutionNumber) + { + if (is_null($institutionNumber)) { + throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); + } + $this->container['institutionNumber'] = $institutionNumber; + + return $this; + } + + /** + * Gets transitNumber + * + * @return string + */ + public function getTransitNumber() + { + return $this->container['transitNumber']; + } + + /** + * Sets transitNumber + * + * @param string $transitNumber The 5-digit transit number, without separators or whitespace. + * + * @return self + */ + public function setTransitNumber($transitNumber) + { + if (is_null($transitNumber)) { + throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); + } + $this->container['transitNumber'] = $transitNumber; + + return $this; + } + + /** + * Gets bankCode + * + * @return string + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (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 clearingCode + * + * @return string + */ + public function getClearingCode() + { + return $this->container['clearingCode']; + } + + /** + * Sets clearingCode + * + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. + * + * @return self + */ + public function setClearingCode($clearingCode) + { + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); + } + $this->container['clearingCode'] = $clearingCode; + + return $this; + } + + /** + * Gets iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets additionalBankIdentification + * + * @return \Adyen\Model\LegalEntityManagement\AdditionalBankIdentification|null + */ + public function getAdditionalBankIdentification() + { + return $this->container['additionalBankIdentification']; + } + + /** + * Sets additionalBankIdentification + * + * @param \Adyen\Model\LegalEntityManagement\AdditionalBankIdentification|null $additionalBankIdentification additionalBankIdentification + * + * @return self + */ + public function setAdditionalBankIdentification($additionalBankIdentification) + { + if (is_null($additionalBankIdentification)) { + throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); + } + $this->container['additionalBankIdentification'] = $additionalBankIdentification; + + 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 clearingNumber + * + * @return string + */ + public function getClearingNumber() + { + return $this->container['clearingNumber']; + } + + /** + * Sets clearingNumber + * + * @param string $clearingNumber The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + * + * @return self + */ + public function setClearingNumber($clearingNumber) + { + if (is_null($clearingNumber)) { + throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); + } + $this->container['clearingNumber'] = $clearingNumber; + + return $this; + } + + /** + * Gets sortCode + * + * @return string + */ + public function getSortCode() + { + return $this->container['sortCode']; + } + + /** + * Sets sortCode + * + * @param string $sortCode The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + * + * @return self + */ + public function setSortCode($sortCode) + { + if (is_null($sortCode)) { + throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); + } + $this->container['sortCode'] = $sortCode; + + return $this; + } + + /** + * Gets routingNumber + * + * @return string + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string $routingNumber The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + if (is_null($routingNumber)) { + throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); + } + $this->container['routingNumber'] = $routingNumber; + + 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/BirthData.php b/src/Adyen/Model/LegalEntityManagement/BirthData.php index 876d681c2..6adbfe991 100644 --- a/src/Adyen/Model/LegalEntityManagement/BirthData.php +++ b/src/Adyen/Model/LegalEntityManagement/BirthData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index b48c4c4dd..bd1b31125 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -273,7 +273,6 @@ public function getModelName() 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'; /** @@ -298,7 +297,6 @@ public function getServiceAllowableValues() { return [ self::SERVICE_PAYMENT_PROCESSING, - self::SERVICE_ISSUING, self::SERVICE_BANKING, ]; } @@ -588,7 +586,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** * **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index e1fef84c8..f1deee5ff 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -261,7 +261,6 @@ public function getModelName() 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'; /** @@ -286,7 +285,6 @@ public function getServiceAllowableValues() { return [ self::SERVICE_PAYMENT_PROCESSING, - self::SERVICE_ISSUING, self::SERVICE_BANKING, ]; } @@ -517,7 +515,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** * **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php index 97c615c03..29bcef54d 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -261,7 +261,6 @@ public function getModelName() 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'; /** @@ -286,7 +285,6 @@ public function getServiceAllowableValues() { return [ self::SERVICE_PAYMENT_PROCESSING, - self::SERVICE_ISSUING, self::SERVICE_BANKING, ]; } @@ -508,7 +506,7 @@ public function getService() /** * Sets service * - * @param string|null $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** + * @param string|null $service The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLines.php b/src/Adyen/Model/LegalEntityManagement/BusinessLines.php index 2a9fe05c4..d45f532d7 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLines.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLines.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php index 6b06d1b7b..47e87773d 100644 --- a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php index 71ff8217d..c2a258ae5 100644 --- a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php index 29fe6bdf3..0c10246a1 100644 --- a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php index 573de8b36..d2a681c1c 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php index ae97db0fd..b3c3d08c2 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php index f8ddbbc68..82a4924b4 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php b/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php index fa68a01b3..bf867e805 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php index 60cb9a7cd..a0f4f18a9 100644 --- a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php new file mode 100644 index 000000000..a3190a287 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php @@ -0,0 +1,384 @@ + + */ +class DataReviewConfirmationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DataReviewConfirmationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'dataReviewedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'dataReviewedAt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'dataReviewedAt' => 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 = [ + 'dataReviewedAt' => 'dataReviewedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'dataReviewedAt' => 'setDataReviewedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'dataReviewedAt' => 'getDataReviewedAt' + ]; + + /** + * 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('dataReviewedAt', $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 dataReviewedAt + * + * @return string|null + */ + public function getDataReviewedAt() + { + return $this->container['dataReviewedAt']; + } + + /** + * Sets dataReviewedAt + * + * @param string|null $dataReviewedAt Date when data review was confirmed. + * + * @return self + */ + public function setDataReviewedAt($dataReviewedAt) + { + if (is_null($dataReviewedAt)) { + throw new \InvalidArgumentException('non-nullable dataReviewedAt cannot be null'); + } + $this->container['dataReviewedAt'] = $dataReviewedAt; + + 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/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 68d4de712..e2e5ec13c 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentPage.php b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php index bffbfc865..8c95e946f 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentPage.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php index 5a71d1d70..d24052b90 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/EntityReference.php b/src/Adyen/Model/LegalEntityManagement/EntityReference.php index 64b04544a..50012c626 100644 --- a/src/Adyen/Model/LegalEntityManagement/EntityReference.php +++ b/src/Adyen/Model/LegalEntityManagement/EntityReference.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php index 8312bd6c0..310815ec2 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php index 0be96043a..9bda141f6 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php index 195331e8e..3b04bf07f 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php index bfd974f30..a978ccb83 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php index ff96f614a..3fba7582d 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index e9900e12e..6056932dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index d7093db76..280f3b304 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index d668b0830..f8495e9f4 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php index 22a383d7d..f73557bd0 100644 --- a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php index 269379def..e587937e1 100644 --- a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index a236975f3..bab2a7281 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/Individual.php b/src/Adyen/Model/LegalEntityManagement/Individual.php index bab28a4fe..8feba1db5 100644 --- a/src/Adyen/Model/LegalEntityManagement/Individual.php +++ b/src/Adyen/Model/LegalEntityManagement/Individual.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 910c517b6..1dfb0f322 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', - 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]' + 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]', + 'verificationPlan' => 'string' ]; /** @@ -83,7 +84,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'trust' => null, 'type' => null, 'unincorporatedPartnership' => null, - 'verificationDeadlines' => null + 'verificationDeadlines' => null, + 'verificationPlan' => null ]; /** @@ -106,7 +108,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'trust' => false, 'type' => false, 'unincorporatedPartnership' => false, - 'verificationDeadlines' => false + 'verificationDeadlines' => false, + 'verificationPlan' => false ]; /** @@ -209,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'trust' => 'trust', 'type' => 'type', 'unincorporatedPartnership' => 'unincorporatedPartnership', - 'verificationDeadlines' => 'verificationDeadlines' + 'verificationDeadlines' => 'verificationDeadlines', + 'verificationPlan' => 'verificationPlan' ]; /** @@ -232,7 +236,8 @@ public function isNullableSetToNull(string $property): bool 'trust' => 'setTrust', 'type' => 'setType', 'unincorporatedPartnership' => 'setUnincorporatedPartnership', - 'verificationDeadlines' => 'setVerificationDeadlines' + 'verificationDeadlines' => 'setVerificationDeadlines', + 'verificationPlan' => 'setVerificationPlan' ]; /** @@ -255,7 +260,8 @@ public function isNullableSetToNull(string $property): bool 'trust' => 'getTrust', 'type' => 'getType', 'unincorporatedPartnership' => 'getUnincorporatedPartnership', - 'verificationDeadlines' => 'getVerificationDeadlines' + 'verificationDeadlines' => 'getVerificationDeadlines', + 'verificationPlan' => 'getVerificationPlan' ]; /** @@ -350,6 +356,7 @@ public function __construct(array $data = null) $this->setIfExists('type', $data ?? [], null); $this->setIfExists('unincorporatedPartnership', $data ?? [], null); $this->setIfExists('verificationDeadlines', $data ?? [], null); + $this->setIfExists('verificationPlan', $data ?? [], null); } /** @@ -822,6 +829,33 @@ public function setVerificationDeadlines($verificationDeadlines) return $this; } + + /** + * Gets verificationPlan + * + * @return string|null + */ + public function getVerificationPlan() + { + return $this->container['verificationPlan']; + } + + /** + * Sets verificationPlan + * + * @param string|null $verificationPlan A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). + * + * @return self + */ + public function setVerificationPlan($verificationPlan) + { + if (is_null($verificationPlan)) { + throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); + } + $this->container['verificationPlan'] = $verificationPlan; + + 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 1c9031d18..35992e935 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php index 7eec424fd..7ba6346ba 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 53a1ab342..7ea2abf94 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -52,7 +52,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', - 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership' + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', + 'verificationPlan' => 'string' ]; /** @@ -71,7 +72,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'soleProprietorship' => null, 'trust' => null, 'type' => null, - 'unincorporatedPartnership' => null + 'unincorporatedPartnership' => null, + 'verificationPlan' => null ]; /** @@ -88,7 +90,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'soleProprietorship' => false, 'trust' => false, 'type' => false, - 'unincorporatedPartnership' => false + 'unincorporatedPartnership' => false, + 'verificationPlan' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'soleProprietorship', 'trust' => 'trust', 'type' => 'type', - 'unincorporatedPartnership' => 'unincorporatedPartnership' + 'unincorporatedPartnership' => 'unincorporatedPartnership', + 'verificationPlan' => 'verificationPlan' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'setSoleProprietorship', 'trust' => 'setTrust', 'type' => 'setType', - 'unincorporatedPartnership' => 'setUnincorporatedPartnership' + 'unincorporatedPartnership' => 'setUnincorporatedPartnership', + 'verificationPlan' => 'setVerificationPlan' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'getSoleProprietorship', 'trust' => 'getTrust', 'type' => 'getType', - 'unincorporatedPartnership' => 'getUnincorporatedPartnership' + 'unincorporatedPartnership' => 'getUnincorporatedPartnership', + 'verificationPlan' => 'getVerificationPlan' ]; /** @@ -308,6 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('unincorporatedPartnership', $data ?? [], null); + $this->setIfExists('verificationPlan', $data ?? [], null); } /** @@ -613,6 +620,33 @@ public function setUnincorporatedPartnership($unincorporatedPartnership) return $this; } + + /** + * Gets verificationPlan + * + * @return string|null + */ + public function getVerificationPlan() + { + return $this->container['verificationPlan']; + } + + /** + * Sets verificationPlan + * + * @param string|null $verificationPlan A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). + * + * @return self + */ + public function setVerificationPlan($verificationPlan) + { + if (is_null($verificationPlan)) { + throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); + } + $this->container['verificationPlan'] = $verificationPlan; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 88bb7e77d..21af57d0b 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -52,7 +52,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', - 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership' + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', + 'verificationPlan' => 'string' ]; /** @@ -71,7 +72,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'soleProprietorship' => null, 'trust' => null, 'type' => null, - 'unincorporatedPartnership' => null + 'unincorporatedPartnership' => null, + 'verificationPlan' => null ]; /** @@ -88,7 +90,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'soleProprietorship' => false, 'trust' => false, 'type' => false, - 'unincorporatedPartnership' => false + 'unincorporatedPartnership' => false, + 'verificationPlan' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'soleProprietorship', 'trust' => 'trust', 'type' => 'type', - 'unincorporatedPartnership' => 'unincorporatedPartnership' + 'unincorporatedPartnership' => 'unincorporatedPartnership', + 'verificationPlan' => 'verificationPlan' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'setSoleProprietorship', 'trust' => 'setTrust', 'type' => 'setType', - 'unincorporatedPartnership' => 'setUnincorporatedPartnership' + 'unincorporatedPartnership' => 'setUnincorporatedPartnership', + 'verificationPlan' => 'setVerificationPlan' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'getSoleProprietorship', 'trust' => 'getTrust', 'type' => 'getType', - 'unincorporatedPartnership' => 'getUnincorporatedPartnership' + 'unincorporatedPartnership' => 'getUnincorporatedPartnership', + 'verificationPlan' => 'getVerificationPlan' ]; /** @@ -308,6 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('unincorporatedPartnership', $data ?? [], null); + $this->setIfExists('verificationPlan', $data ?? [], null); } /** @@ -616,6 +623,33 @@ public function setUnincorporatedPartnership($unincorporatedPartnership) return $this; } + + /** + * Gets verificationPlan + * + * @return string|null + */ + public function getVerificationPlan() + { + return $this->container['verificationPlan']; + } + + /** + * Sets verificationPlan + * + * @param string|null $verificationPlan A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). + * + * @return self + */ + public function setVerificationPlan($verificationPlan) + { + if (is_null($verificationPlan)) { + throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); + } + $this->container['verificationPlan'] = $verificationPlan; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/ModelInterface.php b/src/Adyen/Model/LegalEntityManagement/ModelInterface.php index f9a3ba95b..452a98309 100644 --- a/src/Adyen/Model/LegalEntityManagement/ModelInterface.php +++ b/src/Adyen/Model/LegalEntityManagement/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php index 0ab854013..a75f052a7 100644 --- a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php index 337ee1585..4753cd0dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/Name.php b/src/Adyen/Model/LegalEntityManagement/Name.php index 8f6922a2d..c0a3bc849 100644 --- a/src/Adyen/Model/LegalEntityManagement/Name.php +++ b/src/Adyen/Model/LegalEntityManagement/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php index 2c43aafba..ce9519143 100644 --- a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index ec2b7909f..66642b915 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php index c6cc6b891..10b241e94 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index 250e8a786..909ccc343 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php b/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php index fe281e365..3072104b7 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php b/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php index e717b9b5b..38d5c58cb 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index 329d5ba48..f0616c5f2 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php b/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php index 5411c0f48..f45606a92 100644 --- a/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php index bea8ad6db..3871a6b94 100644 --- a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php b/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php index b25e235f4..6e200137e 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php b/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php index 9a5dd9acc..8f460058f 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php b/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php index 17d94a0a0..d2aecfca8 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php b/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php index 8c424a803..7b81931a7 100644 --- a/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php +++ b/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php b/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php index a1001671d..13829c620 100644 --- a/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php +++ b/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php index b92052510..0b3c8079c 100644 --- a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php index bf7536380..6e5e53def 100644 --- a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/ServiceError.php b/src/Adyen/Model/LegalEntityManagement/ServiceError.php index ea685ce35..665c8f9a6 100644 --- a/src/Adyen/Model/LegalEntityManagement/ServiceError.php +++ b/src/Adyen/Model/LegalEntityManagement/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 0e8c25fa9..c3bb83849 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -46,6 +46,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPITypes = [ 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', + 'description' => 'string', 'doingBusinessAs' => 'string', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -66,6 +67,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPIFormats = [ 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, + 'description' => null, 'doingBusinessAs' => null, 'name' => null, 'principalPlaceOfBusiness' => null, @@ -84,6 +86,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPINullables = [ 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, + 'description' => false, 'doingBusinessAs' => false, 'name' => false, 'principalPlaceOfBusiness' => false, @@ -182,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', + 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -200,6 +204,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', + 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -218,6 +223,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', + 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -301,6 +307,7 @@ public function __construct(array $data = null) { $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -425,6 +432,33 @@ public function setDateOfIncorporation($dateOfIncorporation) return $this; } + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Short description about the Legal Arrangement. + * + * @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 doingBusinessAs * diff --git a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php index 23b43dee6..0d148cc16 100644 --- a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php +++ b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/StockData.php b/src/Adyen/Model/LegalEntityManagement/StockData.php index 61c7172fa..9a5f157c3 100644 --- a/src/Adyen/Model/LegalEntityManagement/StockData.php +++ b/src/Adyen/Model/LegalEntityManagement/StockData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php index e9f9d7e55..a48b4269e 100644 --- a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/TaxInformation.php b/src/Adyen/Model/LegalEntityManagement/TaxInformation.php index 82d9e4c16..e661f8637 100644 --- a/src/Adyen/Model/LegalEntityManagement/TaxInformation.php +++ b/src/Adyen/Model/LegalEntityManagement/TaxInformation.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php b/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php index fec5b48ea..786efd19e 100644 --- a/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php +++ b/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php index d0290d076..0a1c5c0d5 100644 --- a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php index f5e75f6c2..4fa7d1c74 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php index a8938c7da..466793228 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php index 45c3b7437..f6f43352a 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -370,7 +370,7 @@ public function getRealLastFour() /** * Sets realLastFour * - * @param string|null $realLastFour Four last digits of the bank account number. + * @param string|null $realLastFour Four last digits of the bank account number. If the transfer instrument is created using [instant bank account verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding), and it is a virtual bank account, these digits may be different from the last four digits of the masked account number. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Trust.php b/src/Adyen/Model/LegalEntityManagement/Trust.php index 4bcac8bfe..38293579d 100644 --- a/src/Adyen/Model/LegalEntityManagement/Trust.php +++ b/src/Adyen/Model/LegalEntityManagement/Trust.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -46,6 +46,7 @@ class Trust implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', + 'description' => 'string', 'doingBusinessAs' => 'string', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -68,6 +69,7 @@ class Trust implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, + 'description' => null, 'doingBusinessAs' => null, 'name' => null, 'principalPlaceOfBusiness' => null, @@ -88,6 +90,7 @@ class Trust implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, + 'description' => false, 'doingBusinessAs' => false, 'name' => false, 'principalPlaceOfBusiness' => false, @@ -188,6 +191,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', + 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -208,6 +212,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', + 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -228,6 +233,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', + 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -353,6 +359,7 @@ public function __construct(array $data = null) { $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -491,6 +498,33 @@ public function setDateOfIncorporation($dateOfIncorporation) return $this; } + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Short description about the trust. + * + * @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 doingBusinessAs * diff --git a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php index 33de7b796..a7af9a848 100644 --- a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php index 80eda7b60..239cd5ad9 100644 --- a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php index b3811bbdc..ef290e6ca 100644 --- a/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php +++ b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php index ddbd6c8ce..66ba57ef5 100644 --- a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php +++ b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -46,6 +46,7 @@ class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPITypes = [ 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', + 'description' => 'string', 'doingBusinessAs' => 'string', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -67,6 +68,7 @@ class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPIFormats = [ 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, + 'description' => null, 'doingBusinessAs' => null, 'name' => null, 'principalPlaceOfBusiness' => null, @@ -86,6 +88,7 @@ class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPINullables = [ 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, + 'description' => false, 'doingBusinessAs' => false, 'name' => false, 'principalPlaceOfBusiness' => false, @@ -185,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', + 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -204,6 +208,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', + 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -223,6 +228,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', + 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -347,6 +353,7 @@ public function __construct(array $data = null) { $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -484,6 +491,33 @@ public function setDateOfIncorporation($dateOfIncorporation) return $this; } + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Short description about the Legal Arrangement. + * + * @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 doingBusinessAs * diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php index d56f2546f..5e6ef5eea 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -419,7 +419,7 @@ public function getCapabilities() /** * Sets capabilities * - * @param string[] $capabilities The names of the capabilities to be disallowed. + * @param string[] $capabilities The list of capabilities that will be disallowed if information is not reviewed by the time of the deadline * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationError.php b/src/Adyen/Model/LegalEntityManagement/VerificationError.php index 886494472..e58f91b95 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationError.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php index 2029f9c9d..74af27830 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php index eb48afddd..96dda6e49 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/WebData.php b/src/Adyen/Model/LegalEntityManagement/WebData.php index 0e7a4b132..ce592265c 100644 --- a/src/Adyen/Model/LegalEntityManagement/WebData.php +++ b/src/Adyen/Model/LegalEntityManagement/WebData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php b/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php index 205d2bc5e..e2d27d8b5 100644 --- a/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php +++ b/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AdditionalCommission.php b/src/Adyen/Model/Management/AdditionalCommission.php index c3ab38dcb..f777f9a43 100644 --- a/src/Adyen/Model/Management/AdditionalCommission.php +++ b/src/Adyen/Model/Management/AdditionalCommission.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AdditionalSettings.php b/src/Adyen/Model/Management/AdditionalSettings.php index 47798f47d..4b380b1be 100644 --- a/src/Adyen/Model/Management/AdditionalSettings.php +++ b/src/Adyen/Model/Management/AdditionalSettings.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AdditionalSettingsResponse.php b/src/Adyen/Model/Management/AdditionalSettingsResponse.php index 3286dbac0..59eae83b9 100644 --- a/src/Adyen/Model/Management/AdditionalSettingsResponse.php +++ b/src/Adyen/Model/Management/AdditionalSettingsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Address.php b/src/Adyen/Model/Management/Address.php index 9667a431a..c67bf9062 100644 --- a/src/Adyen/Model/Management/Address.php +++ b/src/Adyen/Model/Management/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AfterpayTouchInfo.php b/src/Adyen/Model/Management/AfterpayTouchInfo.php index 13665c965..60d9a2c65 100644 --- a/src/Adyen/Model/Management/AfterpayTouchInfo.php +++ b/src/Adyen/Model/Management/AfterpayTouchInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AllowedOrigin.php b/src/Adyen/Model/Management/AllowedOrigin.php index 8aeafda94..549d67dbd 100644 --- a/src/Adyen/Model/Management/AllowedOrigin.php +++ b/src/Adyen/Model/Management/AllowedOrigin.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AllowedOriginsResponse.php b/src/Adyen/Model/Management/AllowedOriginsResponse.php index c060b88d5..40f263181 100644 --- a/src/Adyen/Model/Management/AllowedOriginsResponse.php +++ b/src/Adyen/Model/Management/AllowedOriginsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Amount.php b/src/Adyen/Model/Management/Amount.php index 1efe8c1ac..ccaf8f2ff 100644 --- a/src/Adyen/Model/Management/Amount.php +++ b/src/Adyen/Model/Management/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index 625240ac6..a557147a2 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AndroidAppsResponse.php b/src/Adyen/Model/Management/AndroidAppsResponse.php index 5478fc992..967ceb43a 100644 --- a/src/Adyen/Model/Management/AndroidAppsResponse.php +++ b/src/Adyen/Model/Management/AndroidAppsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AndroidCertificate.php b/src/Adyen/Model/Management/AndroidCertificate.php index 43e9f968d..f7fc70286 100644 --- a/src/Adyen/Model/Management/AndroidCertificate.php +++ b/src/Adyen/Model/Management/AndroidCertificate.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/AndroidCertificatesResponse.php b/src/Adyen/Model/Management/AndroidCertificatesResponse.php index e4fcb1b1a..3cba386a8 100644 --- a/src/Adyen/Model/Management/AndroidCertificatesResponse.php +++ b/src/Adyen/Model/Management/AndroidCertificatesResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ApiCredential.php b/src/Adyen/Model/Management/ApiCredential.php index d00bd848c..6c107e472 100644 --- a/src/Adyen/Model/Management/ApiCredential.php +++ b/src/Adyen/Model/Management/ApiCredential.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ApiCredentialLinks.php b/src/Adyen/Model/Management/ApiCredentialLinks.php index 97bd6c90c..29b9e8728 100644 --- a/src/Adyen/Model/Management/ApiCredentialLinks.php +++ b/src/Adyen/Model/Management/ApiCredentialLinks.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ApplePayInfo.php b/src/Adyen/Model/Management/ApplePayInfo.php index 89e050797..221f57f5a 100644 --- a/src/Adyen/Model/Management/ApplePayInfo.php +++ b/src/Adyen/Model/Management/ApplePayInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/BcmcInfo.php b/src/Adyen/Model/Management/BcmcInfo.php index 22d4afb2c..03fbff963 100644 --- a/src/Adyen/Model/Management/BcmcInfo.php +++ b/src/Adyen/Model/Management/BcmcInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/BillingEntitiesResponse.php b/src/Adyen/Model/Management/BillingEntitiesResponse.php index f2fe05eb8..5d1bda016 100644 --- a/src/Adyen/Model/Management/BillingEntitiesResponse.php +++ b/src/Adyen/Model/Management/BillingEntitiesResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/BillingEntity.php b/src/Adyen/Model/Management/BillingEntity.php index 04563c70b..8604d13d9 100644 --- a/src/Adyen/Model/Management/BillingEntity.php +++ b/src/Adyen/Model/Management/BillingEntity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CardholderReceipt.php b/src/Adyen/Model/Management/CardholderReceipt.php index 2f0169f22..9d8362799 100644 --- a/src/Adyen/Model/Management/CardholderReceipt.php +++ b/src/Adyen/Model/Management/CardholderReceipt.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CartesBancairesInfo.php b/src/Adyen/Model/Management/CartesBancairesInfo.php index 7b32bc631..b5af56633 100644 --- a/src/Adyen/Model/Management/CartesBancairesInfo.php +++ b/src/Adyen/Model/Management/CartesBancairesInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ClearpayInfo.php b/src/Adyen/Model/Management/ClearpayInfo.php index 3a1b288e3..0e7337f25 100644 --- a/src/Adyen/Model/Management/ClearpayInfo.php +++ b/src/Adyen/Model/Management/ClearpayInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Commission.php b/src/Adyen/Model/Management/Commission.php index c03362fb3..32cc56e29 100644 --- a/src/Adyen/Model/Management/Commission.php +++ b/src/Adyen/Model/Management/Commission.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Company.php b/src/Adyen/Model/Management/Company.php index e75560d78..25186fa47 100644 --- a/src/Adyen/Model/Management/Company.php +++ b/src/Adyen/Model/Management/Company.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CompanyApiCredential.php b/src/Adyen/Model/Management/CompanyApiCredential.php index 018befc58..680183f77 100644 --- a/src/Adyen/Model/Management/CompanyApiCredential.php +++ b/src/Adyen/Model/Management/CompanyApiCredential.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CompanyLinks.php b/src/Adyen/Model/Management/CompanyLinks.php index a99ab70d2..dfc42652a 100644 --- a/src/Adyen/Model/Management/CompanyLinks.php +++ b/src/Adyen/Model/Management/CompanyLinks.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CompanyUser.php b/src/Adyen/Model/Management/CompanyUser.php index 14d88267a..f3e5a6da7 100644 --- a/src/Adyen/Model/Management/CompanyUser.php +++ b/src/Adyen/Model/Management/CompanyUser.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Configuration.php b/src/Adyen/Model/Management/Configuration.php index 22ce96bcb..a9f382eda 100644 --- a/src/Adyen/Model/Management/Configuration.php +++ b/src/Adyen/Model/Management/Configuration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -45,6 +45,7 @@ class Configuration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'brand' => 'string', + 'country' => 'string[]', 'currencies' => '\Adyen\Model\Management\Currency[]', 'sources' => 'string[]' ]; @@ -58,6 +59,7 @@ class Configuration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'brand' => null, + 'country' => null, 'currencies' => null, 'sources' => null ]; @@ -69,6 +71,7 @@ class Configuration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'brand' => false, + 'country' => false, 'currencies' => false, 'sources' => false ]; @@ -160,6 +163,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'brand' => 'brand', + 'country' => 'country', 'currencies' => 'currencies', 'sources' => 'sources' ]; @@ -171,6 +175,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'brand' => 'setBrand', + 'country' => 'setCountry', 'currencies' => 'setCurrencies', 'sources' => 'setSources' ]; @@ -182,6 +187,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'brand' => 'getBrand', + 'country' => 'getCountry', 'currencies' => 'getCurrencies', 'sources' => 'getSources' ]; @@ -244,6 +250,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); $this->setIfExists('sources', $data ?? [], null); } @@ -323,6 +330,33 @@ public function setBrand($brand) return $this; } + /** + * Gets country + * + * @return string[]|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string[]|null $country Countries, to filter different surcharge amounts for domestic or international cards. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + /** * Gets currencies * diff --git a/src/Adyen/Model/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index 4f65bdceb..0ee7039eb 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Contact.php b/src/Adyen/Model/Management/Contact.php index 13dfd2184..746511b93 100644 --- a/src/Adyen/Model/Management/Contact.php +++ b/src/Adyen/Model/Management/Contact.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateAllowedOriginRequest.php b/src/Adyen/Model/Management/CreateAllowedOriginRequest.php index 5a5867677..3925f020d 100644 --- a/src/Adyen/Model/Management/CreateAllowedOriginRequest.php +++ b/src/Adyen/Model/Management/CreateAllowedOriginRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateApiCredentialResponse.php b/src/Adyen/Model/Management/CreateApiCredentialResponse.php index dd437cd4a..d562b5462 100644 --- a/src/Adyen/Model/Management/CreateApiCredentialResponse.php +++ b/src/Adyen/Model/Management/CreateApiCredentialResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php index 4d1263420..eb2e65b2a 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php index a67a9863e..a4327385d 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateCompanyUserRequest.php b/src/Adyen/Model/Management/CreateCompanyUserRequest.php index e44907b39..4195c1cab 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyUserRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateCompanyUserResponse.php b/src/Adyen/Model/Management/CreateCompanyUserResponse.php index a03ae92f8..70a59f175 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyUserResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index f20974c10..6e8b6e1f0 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php index c6f5fa67f..5db13d1cb 100644 --- a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateMerchantRequest.php b/src/Adyen/Model/Management/CreateMerchantRequest.php index bbbbc21cd..8a6874c2b 100644 --- a/src/Adyen/Model/Management/CreateMerchantRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateMerchantResponse.php b/src/Adyen/Model/Management/CreateMerchantResponse.php index 0db65f7c5..ce91cce3c 100644 --- a/src/Adyen/Model/Management/CreateMerchantResponse.php +++ b/src/Adyen/Model/Management/CreateMerchantResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateMerchantUserRequest.php b/src/Adyen/Model/Management/CreateMerchantUserRequest.php index 665967ff4..25fa87c08 100644 --- a/src/Adyen/Model/Management/CreateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantUserRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index 7a7b9d101..0fb742f5f 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/CreateUserResponse.php b/src/Adyen/Model/Management/CreateUserResponse.php index a22a68b9e..618975e12 100644 --- a/src/Adyen/Model/Management/CreateUserResponse.php +++ b/src/Adyen/Model/Management/CreateUserResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Currency.php b/src/Adyen/Model/Management/Currency.php index ef6151fa8..239103943 100644 --- a/src/Adyen/Model/Management/Currency.php +++ b/src/Adyen/Model/Management/Currency.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -46,7 +46,7 @@ class Currency implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'amount' => 'int', 'currencyCode' => 'string', - 'percentage' => 'float' + 'percentage' => 'double' ]; /** @@ -348,7 +348,7 @@ public function setCurrencyCode($currencyCode) /** * Gets percentage * - * @return float|null + * @return double|null */ public function getPercentage() { @@ -358,7 +358,7 @@ public function getPercentage() /** * Sets percentage * - * @param float|null $percentage Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. + * @param double|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/CustomNotification.php b/src/Adyen/Model/Management/CustomNotification.php index 55e7de259..a68c335be 100644 --- a/src/Adyen/Model/Management/CustomNotification.php +++ b/src/Adyen/Model/Management/CustomNotification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/DataCenter.php b/src/Adyen/Model/Management/DataCenter.php index 1dd99c944..9294d77e9 100644 --- a/src/Adyen/Model/Management/DataCenter.php +++ b/src/Adyen/Model/Management/DataCenter.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/EventUrl.php b/src/Adyen/Model/Management/EventUrl.php index cc6161974..02830bf2a 100644 --- a/src/Adyen/Model/Management/EventUrl.php +++ b/src/Adyen/Model/Management/EventUrl.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ExternalTerminalAction.php b/src/Adyen/Model/Management/ExternalTerminalAction.php index 9b611cd21..9a30500a3 100644 --- a/src/Adyen/Model/Management/ExternalTerminalAction.php +++ b/src/Adyen/Model/Management/ExternalTerminalAction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/File.php b/src/Adyen/Model/Management/File.php index 135d29e56..159c18e57 100644 --- a/src/Adyen/Model/Management/File.php +++ b/src/Adyen/Model/Management/File.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/GenerateApiKeyResponse.php b/src/Adyen/Model/Management/GenerateApiKeyResponse.php index fbf55e35a..652966884 100644 --- a/src/Adyen/Model/Management/GenerateApiKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateApiKeyResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/GenerateClientKeyResponse.php b/src/Adyen/Model/Management/GenerateClientKeyResponse.php index 71ca951a0..a19db1457 100644 --- a/src/Adyen/Model/Management/GenerateClientKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateClientKeyResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/GenerateHmacKeyResponse.php b/src/Adyen/Model/Management/GenerateHmacKeyResponse.php index 3d2a8ba6b..e8b980e0f 100644 --- a/src/Adyen/Model/Management/GenerateHmacKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateHmacKeyResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/GenericPmWithTdiInfo.php b/src/Adyen/Model/Management/GenericPmWithTdiInfo.php index 3450f2520..d5f5a6f2d 100644 --- a/src/Adyen/Model/Management/GenericPmWithTdiInfo.php +++ b/src/Adyen/Model/Management/GenericPmWithTdiInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/GiroPayInfo.php b/src/Adyen/Model/Management/GiroPayInfo.php index 35b341c7b..43df4ee27 100644 --- a/src/Adyen/Model/Management/GiroPayInfo.php +++ b/src/Adyen/Model/Management/GiroPayInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/GooglePayInfo.php b/src/Adyen/Model/Management/GooglePayInfo.php index 461dc678a..2f81200a8 100644 --- a/src/Adyen/Model/Management/GooglePayInfo.php +++ b/src/Adyen/Model/Management/GooglePayInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Gratuity.php b/src/Adyen/Model/Management/Gratuity.php index e193247f8..4651d8b9e 100644 --- a/src/Adyen/Model/Management/Gratuity.php +++ b/src/Adyen/Model/Management/Gratuity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Hardware.php b/src/Adyen/Model/Management/Hardware.php index acb9adaae..b2ffce054 100644 --- a/src/Adyen/Model/Management/Hardware.php +++ b/src/Adyen/Model/Management/Hardware.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/IdName.php b/src/Adyen/Model/Management/IdName.php index 03dfa7f83..07e382ee6 100644 --- a/src/Adyen/Model/Management/IdName.php +++ b/src/Adyen/Model/Management/IdName.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index 8bc552812..d1095a557 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index 4ccd0ca9d..da8673226 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/InvalidField.php b/src/Adyen/Model/Management/InvalidField.php index 5455714ff..81eefb4ff 100644 --- a/src/Adyen/Model/Management/InvalidField.php +++ b/src/Adyen/Model/Management/InvalidField.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Key.php b/src/Adyen/Model/Management/Key.php index 1329ca2b1..c6dc80547 100644 --- a/src/Adyen/Model/Management/Key.php +++ b/src/Adyen/Model/Management/Key.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/KlarnaInfo.php b/src/Adyen/Model/Management/KlarnaInfo.php index ce9db7dd8..f90ef76af 100644 --- a/src/Adyen/Model/Management/KlarnaInfo.php +++ b/src/Adyen/Model/Management/KlarnaInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Links.php b/src/Adyen/Model/Management/Links.php index 2c2d7af84..50b9d0ff0 100644 --- a/src/Adyen/Model/Management/Links.php +++ b/src/Adyen/Model/Management/Links.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/LinksElement.php b/src/Adyen/Model/Management/LinksElement.php index f72d85263..80e6ec99d 100644 --- a/src/Adyen/Model/Management/LinksElement.php +++ b/src/Adyen/Model/Management/LinksElement.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php b/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php index 7608a2e53..f62020a54 100644 --- a/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php +++ b/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListCompanyResponse.php b/src/Adyen/Model/Management/ListCompanyResponse.php index 5db09c8c7..3454c1308 100644 --- a/src/Adyen/Model/Management/ListCompanyResponse.php +++ b/src/Adyen/Model/Management/ListCompanyResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListCompanyUsersResponse.php b/src/Adyen/Model/Management/ListCompanyUsersResponse.php index 70bcf75c9..300bfe255 100644 --- a/src/Adyen/Model/Management/ListCompanyUsersResponse.php +++ b/src/Adyen/Model/Management/ListCompanyUsersResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php b/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php index 0c4c656c4..299299c0c 100644 --- a/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php +++ b/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php b/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php index 8c430b099..48407c22f 100644 --- a/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php +++ b/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListMerchantResponse.php b/src/Adyen/Model/Management/ListMerchantResponse.php index 004870f55..e7acdef6e 100644 --- a/src/Adyen/Model/Management/ListMerchantResponse.php +++ b/src/Adyen/Model/Management/ListMerchantResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListMerchantUsersResponse.php b/src/Adyen/Model/Management/ListMerchantUsersResponse.php index f1f7e11e2..245953425 100644 --- a/src/Adyen/Model/Management/ListMerchantUsersResponse.php +++ b/src/Adyen/Model/Management/ListMerchantUsersResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListStoresResponse.php b/src/Adyen/Model/Management/ListStoresResponse.php index 6db01f801..14ec68870 100644 --- a/src/Adyen/Model/Management/ListStoresResponse.php +++ b/src/Adyen/Model/Management/ListStoresResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListTerminalsResponse.php b/src/Adyen/Model/Management/ListTerminalsResponse.php index 7e7669871..79f3acef8 100644 --- a/src/Adyen/Model/Management/ListTerminalsResponse.php +++ b/src/Adyen/Model/Management/ListTerminalsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ListWebhooksResponse.php b/src/Adyen/Model/Management/ListWebhooksResponse.php index 8804fed47..3d6626eb8 100644 --- a/src/Adyen/Model/Management/ListWebhooksResponse.php +++ b/src/Adyen/Model/Management/ListWebhooksResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Localization.php b/src/Adyen/Model/Management/Localization.php index c0ea126ff..916a8c13b 100644 --- a/src/Adyen/Model/Management/Localization.php +++ b/src/Adyen/Model/Management/Localization.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Logo.php b/src/Adyen/Model/Management/Logo.php index 5983dae2a..5ccea1755 100644 --- a/src/Adyen/Model/Management/Logo.php +++ b/src/Adyen/Model/Management/Logo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/MeApiCredential.php b/src/Adyen/Model/Management/MeApiCredential.php index db5c096f9..82ba25a7b 100644 --- a/src/Adyen/Model/Management/MeApiCredential.php +++ b/src/Adyen/Model/Management/MeApiCredential.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/MealVoucherFRInfo.php b/src/Adyen/Model/Management/MealVoucherFRInfo.php index 779346fbe..1437fcee4 100644 --- a/src/Adyen/Model/Management/MealVoucherFRInfo.php +++ b/src/Adyen/Model/Management/MealVoucherFRInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Merchant.php b/src/Adyen/Model/Management/Merchant.php index 10cee45b5..fdf06523b 100644 --- a/src/Adyen/Model/Management/Merchant.php +++ b/src/Adyen/Model/Management/Merchant.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/MerchantLinks.php b/src/Adyen/Model/Management/MerchantLinks.php index 80893c6f9..b3ebaf4f9 100644 --- a/src/Adyen/Model/Management/MerchantLinks.php +++ b/src/Adyen/Model/Management/MerchantLinks.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php b/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php index cbb0e25ad..c5e326218 100644 --- a/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php +++ b/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ModelInterface.php b/src/Adyen/Model/Management/ModelInterface.php index dccbb2236..1c25729a7 100644 --- a/src/Adyen/Model/Management/ModelInterface.php +++ b/src/Adyen/Model/Management/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Name.php b/src/Adyen/Model/Management/Name.php index 7528660dc..aafda604c 100644 --- a/src/Adyen/Model/Management/Name.php +++ b/src/Adyen/Model/Management/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Name2.php b/src/Adyen/Model/Management/Name2.php index c1cc9d2eb..c7c122d18 100644 --- a/src/Adyen/Model/Management/Name2.php +++ b/src/Adyen/Model/Management/Name2.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Nexo.php b/src/Adyen/Model/Management/Nexo.php index 9a8f413b1..f856444fb 100644 --- a/src/Adyen/Model/Management/Nexo.php +++ b/src/Adyen/Model/Management/Nexo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php index fd020bfe0..d9bcb85cb 100644 --- a/src/Adyen/Model/Management/Notification.php +++ b/src/Adyen/Model/Management/Notification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/NotificationUrl.php b/src/Adyen/Model/Management/NotificationUrl.php index 795fa0b3b..7fa39a79b 100644 --- a/src/Adyen/Model/Management/NotificationUrl.php +++ b/src/Adyen/Model/Management/NotificationUrl.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index 8fbf9a509..2ff0b7ef6 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/Management/OfflineProcessing.php b/src/Adyen/Model/Management/OfflineProcessing.php index fc2fe4d5f..652891f30 100644 --- a/src/Adyen/Model/Management/OfflineProcessing.php +++ b/src/Adyen/Model/Management/OfflineProcessing.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Opi.php b/src/Adyen/Model/Management/Opi.php index 3e2965a03..ba851a408 100644 --- a/src/Adyen/Model/Management/Opi.php +++ b/src/Adyen/Model/Management/Opi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/OrderItem.php b/src/Adyen/Model/Management/OrderItem.php index d5b70abc9..91032b94a 100644 --- a/src/Adyen/Model/Management/OrderItem.php +++ b/src/Adyen/Model/Management/OrderItem.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PaginationLinks.php b/src/Adyen/Model/Management/PaginationLinks.php index ecbe22d68..720a70231 100644 --- a/src/Adyen/Model/Management/PaginationLinks.php +++ b/src/Adyen/Model/Management/PaginationLinks.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Passcodes.php b/src/Adyen/Model/Management/Passcodes.php index 91d98fa7d..776082659 100644 --- a/src/Adyen/Model/Management/Passcodes.php +++ b/src/Adyen/Model/Management/Passcodes.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PayAtTable.php b/src/Adyen/Model/Management/PayAtTable.php index c0c64a9ca..04401a383 100644 --- a/src/Adyen/Model/Management/PayAtTable.php +++ b/src/Adyen/Model/Management/PayAtTable.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PayPalInfo.php b/src/Adyen/Model/Management/PayPalInfo.php index 2a5439c3a..c512005d7 100644 --- a/src/Adyen/Model/Management/PayPalInfo.php +++ b/src/Adyen/Model/Management/PayPalInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Payment.php b/src/Adyen/Model/Management/Payment.php index bc7b484e9..d7afd7ff6 100644 --- a/src/Adyen/Model/Management/Payment.php +++ b/src/Adyen/Model/Management/Payment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index af80f7ec9..3f4ce0a3b 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index 52dfae898..bd5b4cf61 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 68b073d3a..25f0a09d8 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PayoutSettings.php b/src/Adyen/Model/Management/PayoutSettings.php index 76c2fbe30..061c8ed94 100644 --- a/src/Adyen/Model/Management/PayoutSettings.php +++ b/src/Adyen/Model/Management/PayoutSettings.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PayoutSettingsRequest.php b/src/Adyen/Model/Management/PayoutSettingsRequest.php index 095ab476b..b402193fb 100644 --- a/src/Adyen/Model/Management/PayoutSettingsRequest.php +++ b/src/Adyen/Model/Management/PayoutSettingsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/PayoutSettingsResponse.php b/src/Adyen/Model/Management/PayoutSettingsResponse.php index d975c150e..dffc62e40 100644 --- a/src/Adyen/Model/Management/PayoutSettingsResponse.php +++ b/src/Adyen/Model/Management/PayoutSettingsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Profile.php b/src/Adyen/Model/Management/Profile.php index e75e3065b..49bc164f1 100644 --- a/src/Adyen/Model/Management/Profile.php +++ b/src/Adyen/Model/Management/Profile.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ReceiptOptions.php b/src/Adyen/Model/Management/ReceiptOptions.php index a660ec647..6c6dbde3c 100644 --- a/src/Adyen/Model/Management/ReceiptOptions.php +++ b/src/Adyen/Model/Management/ReceiptOptions.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ReceiptPrinting.php b/src/Adyen/Model/Management/ReceiptPrinting.php index 3b5375c9e..b455d0478 100644 --- a/src/Adyen/Model/Management/ReceiptPrinting.php +++ b/src/Adyen/Model/Management/ReceiptPrinting.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index 00585540e..2d4b7574e 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/RequestActivationResponse.php b/src/Adyen/Model/Management/RequestActivationResponse.php index f6c6ad290..dbf593c41 100644 --- a/src/Adyen/Model/Management/RequestActivationResponse.php +++ b/src/Adyen/Model/Management/RequestActivationResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index 8cb282d53..1018e90fa 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php index 7753121ac..b260b14dd 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php index d63f1eb25..936dcdba9 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php b/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php index 5e441e97a..e7eafb082 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Settings.php b/src/Adyen/Model/Management/Settings.php index 77e481e50..458814bb5 100644 --- a/src/Adyen/Model/Management/Settings.php +++ b/src/Adyen/Model/Management/Settings.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ShippingLocation.php b/src/Adyen/Model/Management/ShippingLocation.php index 83bfc2edf..1e0bdf95f 100644 --- a/src/Adyen/Model/Management/ShippingLocation.php +++ b/src/Adyen/Model/Management/ShippingLocation.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/ShippingLocationsResponse.php b/src/Adyen/Model/Management/ShippingLocationsResponse.php index 3623665a2..44b31efdf 100644 --- a/src/Adyen/Model/Management/ShippingLocationsResponse.php +++ b/src/Adyen/Model/Management/ShippingLocationsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Signature.php b/src/Adyen/Model/Management/Signature.php index aedbb38cf..f9945bf4b 100644 --- a/src/Adyen/Model/Management/Signature.php +++ b/src/Adyen/Model/Management/Signature.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/SofortInfo.php b/src/Adyen/Model/Management/SofortInfo.php index 29c999731..8ed1fd3e4 100644 --- a/src/Adyen/Model/Management/SofortInfo.php +++ b/src/Adyen/Model/Management/SofortInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/SplitConfiguration.php b/src/Adyen/Model/Management/SplitConfiguration.php index 81fbd07f8..05f591df9 100644 --- a/src/Adyen/Model/Management/SplitConfiguration.php +++ b/src/Adyen/Model/Management/SplitConfiguration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/SplitConfigurationList.php b/src/Adyen/Model/Management/SplitConfigurationList.php index 4793c0692..87e816436 100644 --- a/src/Adyen/Model/Management/SplitConfigurationList.php +++ b/src/Adyen/Model/Management/SplitConfigurationList.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php index 37bfcbee7..cb15c2d24 100644 --- a/src/Adyen/Model/Management/SplitConfigurationLogic.php +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index 85bf748e1..c8141915c 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Standalone.php b/src/Adyen/Model/Management/Standalone.php index 4e91ce682..8213c43e7 100644 --- a/src/Adyen/Model/Management/Standalone.php +++ b/src/Adyen/Model/Management/Standalone.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Store.php b/src/Adyen/Model/Management/Store.php index e8db32b84..64aa41d6f 100644 --- a/src/Adyen/Model/Management/Store.php +++ b/src/Adyen/Model/Management/Store.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/StoreCreationRequest.php b/src/Adyen/Model/Management/StoreCreationRequest.php index 65df870b6..45ab630ba 100644 --- a/src/Adyen/Model/Management/StoreCreationRequest.php +++ b/src/Adyen/Model/Management/StoreCreationRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php index 518e0702e..c95213ef2 100644 --- a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php +++ b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/StoreLocation.php b/src/Adyen/Model/Management/StoreLocation.php index 4c8f6f840..4d1d2a0a0 100644 --- a/src/Adyen/Model/Management/StoreLocation.php +++ b/src/Adyen/Model/Management/StoreLocation.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/StoreSplitConfiguration.php b/src/Adyen/Model/Management/StoreSplitConfiguration.php index 2553ca53d..614f87cc5 100644 --- a/src/Adyen/Model/Management/StoreSplitConfiguration.php +++ b/src/Adyen/Model/Management/StoreSplitConfiguration.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -296,7 +296,7 @@ public function getBalanceAccountId() /** * Sets balanceAccountId * - * @param string|null $balanceAccountId The [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) linked to the account holder. + * @param string|null $balanceAccountId The [unique identifier of the balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) to which the split amount must be booked, depending on the defined [split logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/splitConfigurations#request-rules-splitLogic). * * @return self */ @@ -323,7 +323,7 @@ public function getSplitConfigurationId() /** * Sets splitConfigurationId * - * @param string|null $splitConfigurationId The UUID of the [split configuration](https://docs.adyen.com/marketplaces-and-platforms/classic/split-configuration-for-stores) from the Customer Area. + * @param string|null $splitConfigurationId The unique identifier of the [split configuration profile](https://docs.adyen.com/marketplaces-and-platforms/automatic-split-configuration/create-split-configuration/). * * @return self */ diff --git a/src/Adyen/Model/Management/Surcharge.php b/src/Adyen/Model/Management/Surcharge.php index 2e1f0cb1a..dc2112560 100644 --- a/src/Adyen/Model/Management/Surcharge.php +++ b/src/Adyen/Model/Management/Surcharge.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/SwishInfo.php b/src/Adyen/Model/Management/SwishInfo.php index 6eb0a61d7..50f234095 100644 --- a/src/Adyen/Model/Management/SwishInfo.php +++ b/src/Adyen/Model/Management/SwishInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TapToPay.php b/src/Adyen/Model/Management/TapToPay.php new file mode 100644 index 000000000..1b25916f1 --- /dev/null +++ b/src/Adyen/Model/Management/TapToPay.php @@ -0,0 +1,384 @@ + + */ +class TapToPay implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TapToPay'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantDisplayName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantDisplayName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantDisplayName' => 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 = [ + 'merchantDisplayName' => 'merchantDisplayName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantDisplayName' => 'setMerchantDisplayName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantDisplayName' => 'getMerchantDisplayName' + ]; + + /** + * 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('merchantDisplayName', $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 merchantDisplayName + * + * @return string|null + */ + public function getMerchantDisplayName() + { + return $this->container['merchantDisplayName']; + } + + /** + * Sets merchantDisplayName + * + * @param string|null $merchantDisplayName Platform merchants can customize the text that appears on the TapToPay screen during a transaction + * + * @return self + */ + public function setMerchantDisplayName($merchantDisplayName) + { + if (is_null($merchantDisplayName)) { + throw new \InvalidArgumentException('non-nullable merchantDisplayName cannot be null'); + } + $this->container['merchantDisplayName'] = $merchantDisplayName; + + 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/Terminal.php b/src/Adyen/Model/Management/Terminal.php index 5d5bc198d..219cc8daa 100644 --- a/src/Adyen/Model/Management/Terminal.php +++ b/src/Adyen/Model/Management/Terminal.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalActionScheduleDetail.php b/src/Adyen/Model/Management/TerminalActionScheduleDetail.php index 808673b72..1055125e6 100644 --- a/src/Adyen/Model/Management/TerminalActionScheduleDetail.php +++ b/src/Adyen/Model/Management/TerminalActionScheduleDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index 649a9cc1d..860176e40 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalConnectivity.php b/src/Adyen/Model/Management/TerminalConnectivity.php index c3c22b33a..cbc8cab54 100644 --- a/src/Adyen/Model/Management/TerminalConnectivity.php +++ b/src/Adyen/Model/Management/TerminalConnectivity.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php b/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php index 005ae7e44..9b687f887 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php +++ b/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalConnectivityCellular.php b/src/Adyen/Model/Management/TerminalConnectivityCellular.php index daa3c3019..429f44043 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityCellular.php +++ b/src/Adyen/Model/Management/TerminalConnectivityCellular.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalConnectivityEthernet.php b/src/Adyen/Model/Management/TerminalConnectivityEthernet.php index 2d6674bd7..b70de5fcd 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityEthernet.php +++ b/src/Adyen/Model/Management/TerminalConnectivityEthernet.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalConnectivityWifi.php b/src/Adyen/Model/Management/TerminalConnectivityWifi.php index 4a60f67bb..5d82e3678 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityWifi.php +++ b/src/Adyen/Model/Management/TerminalConnectivityWifi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalModelsResponse.php b/src/Adyen/Model/Management/TerminalModelsResponse.php index 0f062491b..9e0149aa3 100644 --- a/src/Adyen/Model/Management/TerminalModelsResponse.php +++ b/src/Adyen/Model/Management/TerminalModelsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalOrder.php b/src/Adyen/Model/Management/TerminalOrder.php index 22b611c5a..a3c5c71e8 100644 --- a/src/Adyen/Model/Management/TerminalOrder.php +++ b/src/Adyen/Model/Management/TerminalOrder.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalOrderRequest.php b/src/Adyen/Model/Management/TerminalOrderRequest.php index 1765ebb50..f291e8ec0 100644 --- a/src/Adyen/Model/Management/TerminalOrderRequest.php +++ b/src/Adyen/Model/Management/TerminalOrderRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalOrdersResponse.php b/src/Adyen/Model/Management/TerminalOrdersResponse.php index 3ce90bf47..a5f4ac74a 100644 --- a/src/Adyen/Model/Management/TerminalOrdersResponse.php +++ b/src/Adyen/Model/Management/TerminalOrdersResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalProduct.php b/src/Adyen/Model/Management/TerminalProduct.php index 64e97ef76..e204d6f0f 100644 --- a/src/Adyen/Model/Management/TerminalProduct.php +++ b/src/Adyen/Model/Management/TerminalProduct.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalProductPrice.php b/src/Adyen/Model/Management/TerminalProductPrice.php index 6b4a3bd23..f39fa4b27 100644 --- a/src/Adyen/Model/Management/TerminalProductPrice.php +++ b/src/Adyen/Model/Management/TerminalProductPrice.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -45,7 +45,7 @@ class TerminalProductPrice implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPITypes = [ 'currency' => 'string', - 'value' => 'float' + 'value' => 'double' ]; /** @@ -313,7 +313,7 @@ public function setCurrency($currency) /** * Gets value * - * @return float|null + * @return double|null */ public function getValue() { @@ -323,7 +323,7 @@ public function getValue() /** * Sets value * - * @param float|null $value The price of the item. + * @param double|null $value The price of the item. * * @return self */ diff --git a/src/Adyen/Model/Management/TerminalProductsResponse.php b/src/Adyen/Model/Management/TerminalProductsResponse.php index a2154ee75..440934e54 100644 --- a/src/Adyen/Model/Management/TerminalProductsResponse.php +++ b/src/Adyen/Model/Management/TerminalProductsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalReassignmentRequest.php b/src/Adyen/Model/Management/TerminalReassignmentRequest.php index 7a7c01644..4f43be0b5 100644 --- a/src/Adyen/Model/Management/TerminalReassignmentRequest.php +++ b/src/Adyen/Model/Management/TerminalReassignmentRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalReassignmentTarget.php b/src/Adyen/Model/Management/TerminalReassignmentTarget.php index 60675ae64..dbe4108e0 100644 --- a/src/Adyen/Model/Management/TerminalReassignmentTarget.php +++ b/src/Adyen/Model/Management/TerminalReassignmentTarget.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index ca1aaa2a2..576da5977 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -60,6 +60,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'signature' => '\Adyen\Model\Management\Signature', 'standalone' => '\Adyen\Model\Management\Standalone', 'surcharge' => '\Adyen\Model\Management\Surcharge', + 'tapToPay' => '\Adyen\Model\Management\TapToPay', 'timeouts' => '\Adyen\Model\Management\Timeouts', 'wifiProfiles' => '\Adyen\Model\Management\WifiProfiles' ]; @@ -88,6 +89,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'signature' => null, 'standalone' => null, 'surcharge' => null, + 'tapToPay' => null, 'timeouts' => null, 'wifiProfiles' => null ]; @@ -114,6 +116,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'signature' => false, 'standalone' => false, 'surcharge' => false, + 'tapToPay' => false, 'timeouts' => false, 'wifiProfiles' => false ]; @@ -220,6 +223,7 @@ public function isNullableSetToNull(string $property): bool 'signature' => 'signature', 'standalone' => 'standalone', 'surcharge' => 'surcharge', + 'tapToPay' => 'tapToPay', 'timeouts' => 'timeouts', 'wifiProfiles' => 'wifiProfiles' ]; @@ -246,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'signature' => 'setSignature', 'standalone' => 'setStandalone', 'surcharge' => 'setSurcharge', + 'tapToPay' => 'setTapToPay', 'timeouts' => 'setTimeouts', 'wifiProfiles' => 'setWifiProfiles' ]; @@ -272,6 +277,7 @@ public function isNullableSetToNull(string $property): bool 'signature' => 'getSignature', 'standalone' => 'getStandalone', 'surcharge' => 'getSurcharge', + 'tapToPay' => 'getTapToPay', 'timeouts' => 'getTimeouts', 'wifiProfiles' => 'getWifiProfiles' ]; @@ -349,6 +355,7 @@ public function __construct(array $data = null) $this->setIfExists('signature', $data ?? [], null); $this->setIfExists('standalone', $data ?? [], null); $this->setIfExists('surcharge', $data ?? [], null); + $this->setIfExists('tapToPay', $data ?? [], null); $this->setIfExists('timeouts', $data ?? [], null); $this->setIfExists('wifiProfiles', $data ?? [], null); } @@ -827,6 +834,33 @@ public function setSurcharge($surcharge) return $this; } + /** + * Gets tapToPay + * + * @return \Adyen\Model\Management\TapToPay|null + */ + public function getTapToPay() + { + return $this->container['tapToPay']; + } + + /** + * Sets tapToPay + * + * @param \Adyen\Model\Management\TapToPay|null $tapToPay tapToPay + * + * @return self + */ + public function setTapToPay($tapToPay) + { + if (is_null($tapToPay)) { + throw new \InvalidArgumentException('non-nullable tapToPay cannot be null'); + } + $this->container['tapToPay'] = $tapToPay; + + return $this; + } + /** * Gets timeouts * diff --git a/src/Adyen/Model/Management/TestCompanyWebhookRequest.php b/src/Adyen/Model/Management/TestCompanyWebhookRequest.php index 499b6edaa..0d7d2ce4d 100644 --- a/src/Adyen/Model/Management/TestCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/TestCompanyWebhookRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TestOutput.php b/src/Adyen/Model/Management/TestOutput.php index ebb8767ec..e27895498 100644 --- a/src/Adyen/Model/Management/TestOutput.php +++ b/src/Adyen/Model/Management/TestOutput.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TestWebhookRequest.php b/src/Adyen/Model/Management/TestWebhookRequest.php index 5077cc412..92d40835f 100644 --- a/src/Adyen/Model/Management/TestWebhookRequest.php +++ b/src/Adyen/Model/Management/TestWebhookRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TestWebhookResponse.php b/src/Adyen/Model/Management/TestWebhookResponse.php index 77a9a6290..f7644e272 100644 --- a/src/Adyen/Model/Management/TestWebhookResponse.php +++ b/src/Adyen/Model/Management/TestWebhookResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Timeouts.php b/src/Adyen/Model/Management/Timeouts.php index ebfad1f35..0832484eb 100644 --- a/src/Adyen/Model/Management/Timeouts.php +++ b/src/Adyen/Model/Management/Timeouts.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index 8f2db8d8c..d33f2e53b 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/TwintInfo.php b/src/Adyen/Model/Management/TwintInfo.php index 82ab4439a..de32eac06 100644 --- a/src/Adyen/Model/Management/TwintInfo.php +++ b/src/Adyen/Model/Management/TwintInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index 57637be89..e7c943959 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index 5624dc3a4..3675c6f45 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdatableAddress.php b/src/Adyen/Model/Management/UpdatableAddress.php index 7dec99a88..7a06f6c75 100644 --- a/src/Adyen/Model/Management/UpdatableAddress.php +++ b/src/Adyen/Model/Management/UpdatableAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php index 900a45431..d8f7e930c 100644 --- a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php index d62f6d5e2..4dc6d7af0 100644 --- a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php index 1d2e774fe..f0f181706 100644 --- a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php index 88908e8c4..a81c32556 100644 --- a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php index 3737e0e05..9dbd93bd8 100644 --- a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php index c99dd6cca..196304e1f 100644 --- a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index f83c0b480..eea8a8efc 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php b/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php index 55e3eb8bb..91312a376 100644 --- a/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php +++ b/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php index 3517adce0..6eea3c1ce 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php index 34a1747c2..e971bbba9 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index 51abca78f..b1b868f80 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index b86f124c4..1d34f2111 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -48,6 +48,7 @@ class UpdateStoreRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'businessLineIds' => 'string[]', 'description' => 'string', 'externalReferenceId' => 'string', + 'phoneNumber' => 'string', 'splitConfiguration' => '\Adyen\Model\Management\StoreSplitConfiguration', 'status' => 'string' ]; @@ -64,6 +65,7 @@ class UpdateStoreRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'businessLineIds' => null, 'description' => null, 'externalReferenceId' => null, + 'phoneNumber' => null, 'splitConfiguration' => null, 'status' => null ]; @@ -78,6 +80,7 @@ class UpdateStoreRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'businessLineIds' => false, 'description' => false, 'externalReferenceId' => false, + 'phoneNumber' => false, 'splitConfiguration' => false, 'status' => false ]; @@ -172,6 +175,7 @@ public function isNullableSetToNull(string $property): bool 'businessLineIds' => 'businessLineIds', 'description' => 'description', 'externalReferenceId' => 'externalReferenceId', + 'phoneNumber' => 'phoneNumber', 'splitConfiguration' => 'splitConfiguration', 'status' => 'status' ]; @@ -186,6 +190,7 @@ public function isNullableSetToNull(string $property): bool 'businessLineIds' => 'setBusinessLineIds', 'description' => 'setDescription', 'externalReferenceId' => 'setExternalReferenceId', + 'phoneNumber' => 'setPhoneNumber', 'splitConfiguration' => 'setSplitConfiguration', 'status' => 'setStatus' ]; @@ -200,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'businessLineIds' => 'getBusinessLineIds', 'description' => 'getDescription', 'externalReferenceId' => 'getExternalReferenceId', + 'phoneNumber' => 'getPhoneNumber', 'splitConfiguration' => 'getSplitConfiguration', 'status' => 'getStatus' ]; @@ -281,6 +287,7 @@ public function __construct(array $data = null) $this->setIfExists('businessLineIds', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('externalReferenceId', $data ?? [], null); + $this->setIfExists('phoneNumber', $data ?? [], null); $this->setIfExists('splitConfiguration', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -444,6 +451,33 @@ public function setExternalReferenceId($externalReferenceId) return $this; } + /** + * Gets phoneNumber + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param string|null $phoneNumber The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. + * + * @return self + */ + public function setPhoneNumber($phoneNumber) + { + if (is_null($phoneNumber)) { + throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); + } + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + /** * Gets splitConfiguration * diff --git a/src/Adyen/Model/Management/UploadAndroidAppResponse.php b/src/Adyen/Model/Management/UploadAndroidAppResponse.php index da80a3da1..1c3671df0 100644 --- a/src/Adyen/Model/Management/UploadAndroidAppResponse.php +++ b/src/Adyen/Model/Management/UploadAndroidAppResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Url.php b/src/Adyen/Model/Management/Url.php index 9735a46d1..487831a9d 100644 --- a/src/Adyen/Model/Management/Url.php +++ b/src/Adyen/Model/Management/Url.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/User.php b/src/Adyen/Model/Management/User.php index 0b284ec7d..caa563402 100644 --- a/src/Adyen/Model/Management/User.php +++ b/src/Adyen/Model/Management/User.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/VippsInfo.php b/src/Adyen/Model/Management/VippsInfo.php index e9460564e..1584715f4 100644 --- a/src/Adyen/Model/Management/VippsInfo.php +++ b/src/Adyen/Model/Management/VippsInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index 2764b60fa..6006b702e 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/WebhookLinks.php b/src/Adyen/Model/Management/WebhookLinks.php index 38c7f5af3..9e636532a 100644 --- a/src/Adyen/Model/Management/WebhookLinks.php +++ b/src/Adyen/Model/Management/WebhookLinks.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Management/WifiProfiles.php b/src/Adyen/Model/Management/WifiProfiles.php index bce475c9e..7834a37f2 100644 --- a/src/Adyen/Model/Management/WifiProfiles.php +++ b/src/Adyen/Model/Management/WifiProfiles.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/ManagementWebhook/AccountCapabilityData.php b/src/Adyen/Model/ManagementWebhook/AccountCapabilityData.php new file mode 100644 index 000000000..8fb6b6de1 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/AccountCapabilityData.php @@ -0,0 +1,594 @@ + + */ +class AccountCapabilityData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountCapabilityData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'allowed' => 'bool', + 'allowedLevel' => 'string', + 'capability' => 'string', + 'problems' => '\Adyen\Model\ManagementWebhook\CapabilityProblem[]', + 'requested' => 'bool', + 'requestedLevel' => 'string', + 'verificationStatus' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'allowed' => null, + 'allowedLevel' => null, + 'capability' => null, + 'problems' => null, + 'requested' => null, + 'requestedLevel' => null, + 'verificationStatus' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'allowed' => false, + 'allowedLevel' => false, + 'capability' => false, + 'problems' => false, + 'requested' => false, + 'requestedLevel' => false, + 'verificationStatus' => 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 = [ + 'allowed' => 'allowed', + 'allowedLevel' => 'allowedLevel', + 'capability' => 'capability', + 'problems' => 'problems', + 'requested' => 'requested', + 'requestedLevel' => 'requestedLevel', + 'verificationStatus' => 'verificationStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'allowed' => 'setAllowed', + 'allowedLevel' => 'setAllowedLevel', + 'capability' => 'setCapability', + 'problems' => 'setProblems', + 'requested' => 'setRequested', + 'requestedLevel' => 'setRequestedLevel', + 'verificationStatus' => 'setVerificationStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'allowed' => 'getAllowed', + 'allowedLevel' => 'getAllowedLevel', + 'capability' => 'getCapability', + 'problems' => 'getProblems', + 'requested' => 'getRequested', + 'requestedLevel' => 'getRequestedLevel', + 'verificationStatus' => 'getVerificationStatus' + ]; + + /** + * 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('allowed', $data ?? [], null); + $this->setIfExists('allowedLevel', $data ?? [], null); + $this->setIfExists('capability', $data ?? [], null); + $this->setIfExists('problems', $data ?? [], null); + $this->setIfExists('requested', $data ?? [], null); + $this->setIfExists('requestedLevel', $data ?? [], null); + $this->setIfExists('verificationStatus', $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['requested'] === null) { + $invalidProperties[] = "'requested' can't be null"; + } + if ($this->container['requestedLevel'] === null) { + $invalidProperties[] = "'requestedLevel' 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 allowed + * + * @return bool|null + */ + public function getAllowed() + { + return $this->container['allowed']; + } + + /** + * Sets allowed + * + * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. + * + * @return self + */ + public function setAllowed($allowed) + { + if (is_null($allowed)) { + throw new \InvalidArgumentException('non-nullable allowed cannot be null'); + } + $this->container['allowed'] = $allowed; + + return $this; + } + + /** + * Gets allowedLevel + * + * @return string|null + */ + public function getAllowedLevel() + { + return $this->container['allowedLevel']; + } + + /** + * Sets allowedLevel + * + * @param string|null $allowedLevel The allowed level of the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. + * + * @return self + */ + public function setAllowedLevel($allowedLevel) + { + if (is_null($allowedLevel)) { + throw new \InvalidArgumentException('non-nullable allowedLevel cannot be null'); + } + $this->container['allowedLevel'] = $allowedLevel; + + return $this; + } + + /** + * Gets capability + * + * @return string|null + */ + public function getCapability() + { + return $this->container['capability']; + } + + /** + * Sets capability + * + * @param string|null $capability The name of the capability. For example, **sendToTransferInstrument**. + * + * @return self + */ + public function setCapability($capability) + { + if (is_null($capability)) { + throw new \InvalidArgumentException('non-nullable capability cannot be null'); + } + $this->container['capability'] = $capability; + + return $this; + } + + /** + * Gets problems + * + * @return \Adyen\Model\ManagementWebhook\CapabilityProblem[]|null + */ + public function getProblems() + { + return $this->container['problems']; + } + + /** + * Sets problems + * + * @param \Adyen\Model\ManagementWebhook\CapabilityProblem[]|null $problems List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them. + * + * @return self + */ + public function setProblems($problems) + { + if (is_null($problems)) { + throw new \InvalidArgumentException('non-nullable problems cannot be null'); + } + $this->container['problems'] = $problems; + + return $this; + } + + /** + * Gets requested + * + * @return bool + */ + public function getRequested() + { + return $this->container['requested']; + } + + /** + * Sets requested + * + * @param bool $requested Indicates whether you requested the capability. + * + * @return self + */ + public function setRequested($requested) + { + if (is_null($requested)) { + throw new \InvalidArgumentException('non-nullable requested cannot be null'); + } + $this->container['requested'] = $requested; + + return $this; + } + + /** + * Gets requestedLevel + * + * @return string + */ + public function getRequestedLevel() + { + return $this->container['requestedLevel']; + } + + /** + * Sets requestedLevel + * + * @param string $requestedLevel The level that you requested for the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. + * + * @return self + */ + public function setRequestedLevel($requestedLevel) + { + if (is_null($requestedLevel)) { + throw new \InvalidArgumentException('non-nullable requestedLevel cannot be null'); + } + $this->container['requestedLevel'] = $requestedLevel; + + return $this; + } + + /** + * Gets verificationStatus + * + * @return string|null + */ + public function getVerificationStatus() + { + return $this->container['verificationStatus']; + } + + /** + * Sets verificationStatus + * + * @param string|null $verificationStatus The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification was successful. * **rejected**: Adyen checked the information and found reasons to not allow the capability. + * + * @return self + */ + public function setVerificationStatus($verificationStatus) + { + if (is_null($verificationStatus)) { + throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); + } + $this->container['verificationStatus'] = $verificationStatus; + + 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/ManagementWebhook/AccountCreateNotificationData.php b/src/Adyen/Model/ManagementWebhook/AccountCreateNotificationData.php new file mode 100644 index 000000000..3690b6b65 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/AccountCreateNotificationData.php @@ -0,0 +1,532 @@ + + */ +class AccountCreateNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountCreateNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'capabilities' => 'array', + 'companyId' => 'string', + 'legalEntityId' => 'string', + 'merchantId' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'capabilities' => null, + 'companyId' => null, + 'legalEntityId' => null, + 'merchantId' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'companyId' => false, + 'legalEntityId' => false, + 'merchantId' => 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 = [ + 'capabilities' => 'capabilities', + 'companyId' => 'companyId', + 'legalEntityId' => 'legalEntityId', + 'merchantId' => 'merchantId', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'companyId' => 'setCompanyId', + 'legalEntityId' => 'setLegalEntityId', + 'merchantId' => 'setMerchantId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'companyId' => 'getCompanyId', + 'legalEntityId' => 'getLegalEntityId', + 'merchantId' => 'getMerchantId', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('capabilities', $data ?? [], null); + $this->setIfExists('companyId', $data ?? [], null); + $this->setIfExists('legalEntityId', $data ?? [], null); + $this->setIfExists('merchantId', $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['capabilities'] === null) { + $invalidProperties[] = "'capabilities' can't be null"; + } + if ($this->container['companyId'] === null) { + $invalidProperties[] = "'companyId' can't be null"; + } + if ($this->container['merchantId'] === null) { + $invalidProperties[] = "'merchantId' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets capabilities + * + * @return array + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param array $capabilities Key-value pairs that specify the actions that the merchant account can do and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out funds to the bank account. The value is an object containing the settings for the capability. + * + * @return self + */ + public function setCapabilities($capabilities) + { + if (is_null($capabilities)) { + throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); + } + $this->container['capabilities'] = $capabilities; + + return $this; + } + + /** + * Gets companyId + * + * @return string + */ + public function getCompanyId() + { + return $this->container['companyId']; + } + + /** + * Sets companyId + * + * @param string $companyId The unique identifier of the company account. + * + * @return self + */ + public function setCompanyId($companyId) + { + if (is_null($companyId)) { + throw new \InvalidArgumentException('non-nullable companyId cannot be null'); + } + $this->container['companyId'] = $companyId; + + return $this; + } + + /** + * Gets legalEntityId + * + * @return string|null + */ + public function getLegalEntityId() + { + return $this->container['legalEntityId']; + } + + /** + * Sets legalEntityId + * + * @param string|null $legalEntityId The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). + * + * @return self + */ + public function setLegalEntityId($legalEntityId) + { + if (is_null($legalEntityId)) { + throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); + } + $this->container['legalEntityId'] = $legalEntityId; + + return $this; + } + + /** + * Gets merchantId + * + * @return string + */ + public function getMerchantId() + { + return $this->container['merchantId']; + } + + /** + * Sets merchantId + * + * @param string $merchantId The unique identifier of the merchant account. + * + * @return self + */ + public function setMerchantId($merchantId) + { + if (is_null($merchantId)) { + throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); + } + $this->container['merchantId'] = $merchantId; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $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/ManagementWebhook/AccountNotificationResponse.php b/src/Adyen/Model/ManagementWebhook/AccountNotificationResponse.php new file mode 100644 index 000000000..78e810cfe --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/AccountNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class AccountNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/ManagementWebhook/AccountUpdateNotificationData.php b/src/Adyen/Model/ManagementWebhook/AccountUpdateNotificationData.php new file mode 100644 index 000000000..5fb0009bc --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/AccountUpdateNotificationData.php @@ -0,0 +1,495 @@ + + */ +class AccountUpdateNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountUpdateNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'capabilities' => 'array', + 'legalEntityId' => 'string', + 'merchantId' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'capabilities' => null, + 'legalEntityId' => null, + 'merchantId' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'legalEntityId' => false, + 'merchantId' => 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 = [ + 'capabilities' => 'capabilities', + 'legalEntityId' => 'legalEntityId', + 'merchantId' => 'merchantId', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'legalEntityId' => 'setLegalEntityId', + 'merchantId' => 'setMerchantId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'legalEntityId' => 'getLegalEntityId', + 'merchantId' => 'getMerchantId', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('capabilities', $data ?? [], null); + $this->setIfExists('legalEntityId', $data ?? [], null); + $this->setIfExists('merchantId', $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['capabilities'] === null) { + $invalidProperties[] = "'capabilities' can't be null"; + } + if ($this->container['merchantId'] === null) { + $invalidProperties[] = "'merchantId' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets capabilities + * + * @return array + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param array $capabilities Key-value pairs that specify what you can do with the merchant account and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out the funds of a merchant account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). The value is an object containing the settings for the capability. + * + * @return self + */ + public function setCapabilities($capabilities) + { + if (is_null($capabilities)) { + throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); + } + $this->container['capabilities'] = $capabilities; + + return $this; + } + + /** + * Gets legalEntityId + * + * @return string|null + */ + public function getLegalEntityId() + { + return $this->container['legalEntityId']; + } + + /** + * Sets legalEntityId + * + * @param string|null $legalEntityId The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). + * + * @return self + */ + public function setLegalEntityId($legalEntityId) + { + if (is_null($legalEntityId)) { + throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); + } + $this->container['legalEntityId'] = $legalEntityId; + + return $this; + } + + /** + * Gets merchantId + * + * @return string + */ + public function getMerchantId() + { + return $this->container['merchantId']; + } + + /** + * Sets merchantId + * + * @param string $merchantId The unique identifier of the merchant account. + * + * @return self + */ + public function setMerchantId($merchantId) + { + if (is_null($merchantId)) { + throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); + } + $this->container['merchantId'] = $merchantId; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $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/ManagementWebhook/CapabilityProblem.php b/src/Adyen/Model/ManagementWebhook/CapabilityProblem.php new file mode 100644 index 000000000..ba5aa3a17 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/CapabilityProblem.php @@ -0,0 +1,418 @@ + + */ +class CapabilityProblem implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilityProblem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'entity' => '\Adyen\Model\ManagementWebhook\CapabilityProblemEntity', + 'verificationErrors' => '\Adyen\Model\ManagementWebhook\VerificationError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'entity' => null, + 'verificationErrors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'entity' => false, + 'verificationErrors' => 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 = [ + 'entity' => 'entity', + 'verificationErrors' => 'verificationErrors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'entity' => 'setEntity', + 'verificationErrors' => 'setVerificationErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'entity' => 'getEntity', + 'verificationErrors' => 'getVerificationErrors' + ]; + + /** + * 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('entity', $data ?? [], null); + $this->setIfExists('verificationErrors', $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 entity + * + * @return \Adyen\Model\ManagementWebhook\CapabilityProblemEntity|null + */ + public function getEntity() + { + return $this->container['entity']; + } + + /** + * Sets entity + * + * @param \Adyen\Model\ManagementWebhook\CapabilityProblemEntity|null $entity entity + * + * @return self + */ + public function setEntity($entity) + { + if (is_null($entity)) { + throw new \InvalidArgumentException('non-nullable entity cannot be null'); + } + $this->container['entity'] = $entity; + + return $this; + } + + /** + * Gets verificationErrors + * + * @return \Adyen\Model\ManagementWebhook\VerificationError[]|null + */ + public function getVerificationErrors() + { + return $this->container['verificationErrors']; + } + + /** + * Sets verificationErrors + * + * @param \Adyen\Model\ManagementWebhook\VerificationError[]|null $verificationErrors List of verification errors. + * + * @return self + */ + public function setVerificationErrors($verificationErrors) + { + if (is_null($verificationErrors)) { + throw new \InvalidArgumentException('non-nullable verificationErrors cannot be null'); + } + $this->container['verificationErrors'] = $verificationErrors; + + 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/ManagementWebhook/CapabilityProblemEntity.php b/src/Adyen/Model/ManagementWebhook/CapabilityProblemEntity.php new file mode 100644 index 000000000..cb46a087b --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/CapabilityProblemEntity.php @@ -0,0 +1,521 @@ + + */ +class CapabilityProblemEntity implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilityProblemEntity'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'documents' => 'string[]', + 'id' => 'string', + 'owner' => '\Adyen\Model\ManagementWebhook\CapabilityProblemEntityRecursive', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'documents' => null, + 'id' => null, + 'owner' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'documents' => false, + 'id' => false, + 'owner' => 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 = [ + 'documents' => 'documents', + 'id' => 'id', + 'owner' => 'owner', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'documents' => 'setDocuments', + 'id' => 'setId', + 'owner' => 'setOwner', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'documents' => 'getDocuments', + 'id' => 'getId', + 'owner' => 'getOwner', + '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_BANK_ACCOUNT = 'BankAccount'; + public const TYPE_DOCUMENT = 'Document'; + public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK_ACCOUNT, + self::TYPE_DOCUMENT, + self::TYPE_LEGAL_ENTITY, + ]; + } + /** + * 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('documents', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 documents + * + * @return string[]|null + */ + public function getDocuments() + { + return $this->container['documents']; + } + + /** + * Sets documents + * + * @param string[]|null $documents List of document IDs to which the verification errors related to the capabilities correspond to. + * + * @return self + */ + public function setDocuments($documents) + { + if (is_null($documents)) { + throw new \InvalidArgumentException('non-nullable documents cannot be null'); + } + $this->container['documents'] = $documents; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the entity. + * + * @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 owner + * + * @return \Adyen\Model\ManagementWebhook\CapabilityProblemEntityRecursive|null + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param \Adyen\Model\ManagementWebhook\CapabilityProblemEntityRecursive|null $owner owner + * + * @return self + */ + public function setOwner($owner) + { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. + * + * @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/ManagementWebhook/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/ManagementWebhook/CapabilityProblemEntityRecursive.php new file mode 100644 index 000000000..94ab5cddc --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/CapabilityProblemEntityRecursive.php @@ -0,0 +1,487 @@ + + */ +class CapabilityProblemEntityRecursive implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CapabilityProblemEntity-recursive'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'documents' => 'string[]', + 'id' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'documents' => null, + 'id' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'documents' => false, + 'id' => 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 = [ + 'documents' => 'documents', + 'id' => 'id', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'documents' => 'setDocuments', + 'id' => 'setId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'documents' => 'getDocuments', + 'id' => 'getId', + '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_BANK_ACCOUNT = 'BankAccount'; + public const TYPE_DOCUMENT = 'Document'; + public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK_ACCOUNT, + self::TYPE_DOCUMENT, + self::TYPE_LEGAL_ENTITY, + ]; + } + /** + * 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('documents', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 documents + * + * @return string[]|null + */ + public function getDocuments() + { + return $this->container['documents']; + } + + /** + * Sets documents + * + * @param string[]|null $documents List of document IDs to which the verification errors related to the capabilities correspond to. + * + * @return self + */ + public function setDocuments($documents) + { + if (is_null($documents)) { + throw new \InvalidArgumentException('non-nullable documents cannot be null'); + } + $this->container['documents'] = $documents; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the entity. + * + * @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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. + * + * @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/ManagementWebhook/MerchantCreatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhook/MerchantCreatedNotificationRequest.php new file mode 100644 index 000000000..acb7cd16b --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/MerchantCreatedNotificationRequest.php @@ -0,0 +1,529 @@ + + */ +class MerchantCreatedNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MerchantCreatedNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'createdAt' => '\DateTime', + 'data' => '\Adyen\Model\ManagementWebhook\AccountCreateNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'createdAt' => 'date-time', + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'createdAt' => false, + 'data' => false, + 'environment' => 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 = [ + 'createdAt' => 'createdAt', + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdAt' => 'setCreatedAt', + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdAt' => 'getCreatedAt', + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_MERCHANT_CREATED = 'merchant.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_MERCHANT_CREATED, + ]; + } + /** + * 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('createdAt', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Timestamp for when the webhook was created. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets data + * + * @return \Adyen\Model\ManagementWebhook\AccountCreateNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ManagementWebhook\AccountCreateNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @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/ManagementWebhook/MerchantUpdatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhook/MerchantUpdatedNotificationRequest.php new file mode 100644 index 000000000..1cc1e867d --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/MerchantUpdatedNotificationRequest.php @@ -0,0 +1,529 @@ + + */ +class MerchantUpdatedNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MerchantUpdatedNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'createdAt' => '\DateTime', + 'data' => '\Adyen\Model\ManagementWebhook\AccountUpdateNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'createdAt' => 'date-time', + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'createdAt' => false, + 'data' => false, + 'environment' => 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 = [ + 'createdAt' => 'createdAt', + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdAt' => 'setCreatedAt', + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdAt' => 'getCreatedAt', + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_MERCHANT_UPDATED = 'merchant.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_MERCHANT_UPDATED, + ]; + } + /** + * 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('createdAt', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Timestamp for when the webhook was created. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets data + * + * @return \Adyen\Model\ManagementWebhook\AccountUpdateNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ManagementWebhook\AccountUpdateNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @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/ManagementWebhook/MidServiceNotificationData.php b/src/Adyen/Model/ManagementWebhook/MidServiceNotificationData.php new file mode 100644 index 000000000..847837598 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/MidServiceNotificationData.php @@ -0,0 +1,744 @@ + + */ +class MidServiceNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MidServiceNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'allowed' => 'bool', + 'enabled' => 'bool', + 'id' => 'string', + 'merchantId' => 'string', + 'reference' => 'string', + 'status' => 'string', + 'storeId' => 'string', + 'type' => 'string', + 'verificationStatus' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'allowed' => null, + 'enabled' => null, + 'id' => null, + 'merchantId' => null, + 'reference' => null, + 'status' => null, + 'storeId' => null, + 'type' => null, + 'verificationStatus' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'allowed' => false, + 'enabled' => false, + 'id' => false, + 'merchantId' => false, + 'reference' => false, + 'status' => false, + 'storeId' => false, + 'type' => false, + 'verificationStatus' => 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 = [ + 'allowed' => 'allowed', + 'enabled' => 'enabled', + 'id' => 'id', + 'merchantId' => 'merchantId', + 'reference' => 'reference', + 'status' => 'status', + 'storeId' => 'storeId', + 'type' => 'type', + 'verificationStatus' => 'verificationStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'allowed' => 'setAllowed', + 'enabled' => 'setEnabled', + 'id' => 'setId', + 'merchantId' => 'setMerchantId', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'storeId' => 'setStoreId', + 'type' => 'setType', + 'verificationStatus' => 'setVerificationStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'allowed' => 'getAllowed', + 'enabled' => 'getEnabled', + 'id' => 'getId', + 'merchantId' => 'getMerchantId', + 'reference' => 'getReference', + 'status' => 'getStatus', + 'storeId' => 'getStoreId', + 'type' => 'getType', + 'verificationStatus' => 'getVerificationStatus' + ]; + + /** + * 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_SUCCESS = 'success'; + public const STATUS_FAILURE = 'failure'; + public const STATUS_CAPABILITY_PENDING = 'capabilityPending'; + public const STATUS_DATA_REQUIRED = 'dataRequired'; + public const STATUS_UPDATES_EXPECTED = 'updatesExpected'; + public const VERIFICATION_STATUS_VALID = 'valid'; + public const VERIFICATION_STATUS_PENDING = 'pending'; + public const VERIFICATION_STATUS_INVALID = 'invalid'; + public const VERIFICATION_STATUS_REJECTED = 'rejected'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_SUCCESS, + self::STATUS_FAILURE, + self::STATUS_CAPABILITY_PENDING, + self::STATUS_DATA_REQUIRED, + self::STATUS_UPDATES_EXPECTED, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVerificationStatusAllowableValues() + { + return [ + self::VERIFICATION_STATUS_VALID, + self::VERIFICATION_STATUS_PENDING, + self::VERIFICATION_STATUS_INVALID, + self::VERIFICATION_STATUS_REJECTED, + ]; + } + /** + * 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('allowed', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('merchantId', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('storeId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('verificationStatus', $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['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['merchantId'] === null) { + $invalidProperties[] = "'merchantId' 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) + ); + } + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!is_null($this->container['verificationStatus']) && !in_array($this->container['verificationStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'verificationStatus', must be one of '%s'", + $this->container['verificationStatus'], + 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 allowed + * + * @return bool|null + */ + public function getAllowed() + { + return $this->container['allowed']; + } + + /** + * Sets allowed + * + * @param bool|null $allowed Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. + * + * @return self + */ + public function setAllowed($allowed) + { + if (is_null($allowed)) { + throw new \InvalidArgumentException('non-nullable allowed cannot be null'); + } + $this->container['allowed'] = $allowed; + + return $this; + } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**). + * + * @return self + */ + public function setEnabled($enabled) + { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets merchantId + * + * @return string + */ + public function getMerchantId() + { + return $this->container['merchantId']; + } + + /** + * Sets merchantId + * + * @param string $merchantId The unique identifier of the merchant account. + * + * @return self + */ + public function setMerchantId($merchantId) + { + if (is_null($merchantId)) { + throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); + } + $this->container['merchantId'] = $merchantId; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment method. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets storeId + * + * @return string|null + */ + public function getStoreId() + { + return $this->container['storeId']; + } + + /** + * Sets storeId + * + * @param string|null $storeId The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. + * + * @return self + */ + public function setStoreId($storeId) + { + if (is_null($storeId)) { + throw new \InvalidArgumentException('non-nullable storeId cannot be null'); + } + $this->container['storeId'] = $storeId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets verificationStatus + * + * @return string|null + */ + public function getVerificationStatus() + { + return $this->container['verificationStatus']; + } + + /** + * Sets verificationStatus + * + * @param string|null $verificationStatus Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** + * + * @return self + */ + public function setVerificationStatus($verificationStatus) + { + if (is_null($verificationStatus)) { + throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); + } + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!in_array($verificationStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + $verificationStatus, + implode("', '", $allowedValues) + ) + ); + } + $this->container['verificationStatus'] = $verificationStatus; + + 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/ManagementWebhook/ModelInterface.php b/src/Adyen/Model/ManagementWebhook/ModelInterface.php new file mode 100644 index 000000000..c9e4db68e --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/ModelInterface.php @@ -0,0 +1,92 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/ManagementWebhook/PaymentMethodCreatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhook/PaymentMethodCreatedNotificationRequest.php new file mode 100644 index 000000000..f289450ae --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/PaymentMethodCreatedNotificationRequest.php @@ -0,0 +1,529 @@ + + */ +class PaymentMethodCreatedNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodCreatedNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'createdAt' => '\DateTime', + 'data' => '\Adyen\Model\ManagementWebhook\MidServiceNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'createdAt' => 'date-time', + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'createdAt' => false, + 'data' => false, + 'environment' => 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 = [ + 'createdAt' => 'createdAt', + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdAt' => 'setCreatedAt', + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdAt' => 'getCreatedAt', + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_PAYMENT_METHOD_CREATED = 'paymentMethod.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_METHOD_CREATED, + ]; + } + /** + * 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('createdAt', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Timestamp for when the webhook was created. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets data + * + * @return \Adyen\Model\ManagementWebhook\MidServiceNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ManagementWebhook\MidServiceNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @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/ManagementWebhook/PaymentMethodNotificationResponse.php b/src/Adyen/Model/ManagementWebhook/PaymentMethodNotificationResponse.php new file mode 100644 index 000000000..0a15abbfb --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/PaymentMethodNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class PaymentMethodNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/ManagementWebhook/PaymentMethodRequestRemovedNotificationRequest.php b/src/Adyen/Model/ManagementWebhook/PaymentMethodRequestRemovedNotificationRequest.php new file mode 100644 index 000000000..66a6a8b27 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/PaymentMethodRequestRemovedNotificationRequest.php @@ -0,0 +1,529 @@ + + */ +class PaymentMethodRequestRemovedNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodRequestRemovedNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'createdAt' => '\DateTime', + 'data' => '\Adyen\Model\ManagementWebhook\MidServiceNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'createdAt' => 'date-time', + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'createdAt' => false, + 'data' => false, + 'environment' => 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 = [ + 'createdAt' => 'createdAt', + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdAt' => 'setCreatedAt', + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdAt' => 'getCreatedAt', + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_PAYMENT_METHOD_REQUEST_REMOVED = 'paymentMethod.requestRemoved'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_METHOD_REQUEST_REMOVED, + ]; + } + /** + * 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('createdAt', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Timestamp for when the webhook was created. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets data + * + * @return \Adyen\Model\ManagementWebhook\MidServiceNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ManagementWebhook\MidServiceNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @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/ManagementWebhook/PaymentMethodScheduledForRemovalNotificationRequest.php b/src/Adyen/Model/ManagementWebhook/PaymentMethodScheduledForRemovalNotificationRequest.php new file mode 100644 index 000000000..912a8e878 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/PaymentMethodScheduledForRemovalNotificationRequest.php @@ -0,0 +1,529 @@ + + */ +class PaymentMethodScheduledForRemovalNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodScheduledForRemovalNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'createdAt' => '\DateTime', + 'data' => '\Adyen\Model\ManagementWebhook\MidServiceNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'createdAt' => 'date-time', + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'createdAt' => false, + 'data' => false, + 'environment' => 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 = [ + 'createdAt' => 'createdAt', + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdAt' => 'setCreatedAt', + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdAt' => 'getCreatedAt', + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL = 'paymentMethod.requestScheduledForRemoval'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL, + ]; + } + /** + * 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('createdAt', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Timestamp for when the webhook was created. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets data + * + * @return \Adyen\Model\ManagementWebhook\MidServiceNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ManagementWebhook\MidServiceNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @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/ManagementWebhook/RemediatingAction.php b/src/Adyen/Model/ManagementWebhook/RemediatingAction.php new file mode 100644 index 000000000..eeb0c4bfa --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/RemediatingAction.php @@ -0,0 +1,418 @@ + + */ +class RemediatingAction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RemediatingAction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'code' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The remediating action code. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A description of how you can resolve the verification error. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * 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/ManagementWebhook/VerificationError.php b/src/Adyen/Model/ManagementWebhook/VerificationError.php new file mode 100644 index 000000000..e4bdfa628 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/VerificationError.php @@ -0,0 +1,555 @@ + + */ +class VerificationError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VerificationError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'code' => 'string', + 'message' => 'string', + 'remediatingActions' => '\Adyen\Model\ManagementWebhook\RemediatingAction[]', + 'subErrors' => '\Adyen\Model\ManagementWebhook\VerificationErrorRecursive[]', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'code' => null, + 'message' => null, + 'remediatingActions' => null, + 'subErrors' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'code' => false, + 'message' => false, + 'remediatingActions' => false, + 'subErrors' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'remediatingActions' => 'remediatingActions', + 'subErrors' => 'subErrors', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'remediatingActions' => 'setRemediatingActions', + 'subErrors' => 'setSubErrors', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'remediatingActions' => 'getRemediatingActions', + 'subErrors' => 'getSubErrors', + '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_DATA_MISSING = 'dataMissing'; + public const TYPE_INVALID_INPUT = 'invalidInput'; + public const TYPE_PENDING_STATUS = 'pendingStatus'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DATA_MISSING, + self::TYPE_INVALID_INPUT, + self::TYPE_PENDING_STATUS, + ]; + } + /** + * 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('code', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('remediatingActions', $data ?? [], null); + $this->setIfExists('subErrors', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The verification error code. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message The verification error message. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets remediatingActions + * + * @return \Adyen\Model\ManagementWebhook\RemediatingAction[]|null + */ + public function getRemediatingActions() + { + return $this->container['remediatingActions']; + } + + /** + * Sets remediatingActions + * + * @param \Adyen\Model\ManagementWebhook\RemediatingAction[]|null $remediatingActions The actions that you can take to resolve the verification error. + * + * @return self + */ + public function setRemediatingActions($remediatingActions) + { + if (is_null($remediatingActions)) { + throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); + } + $this->container['remediatingActions'] = $remediatingActions; + + return $this; + } + + /** + * Gets subErrors + * + * @return \Adyen\Model\ManagementWebhook\VerificationErrorRecursive[]|null + */ + public function getSubErrors() + { + return $this->container['subErrors']; + } + + /** + * Sets subErrors + * + * @param \Adyen\Model\ManagementWebhook\VerificationErrorRecursive[]|null $subErrors More granular information about the verification error. + * + * @return self + */ + public function setSubErrors($subErrors) + { + if (is_null($subErrors)) { + throw new \InvalidArgumentException('non-nullable subErrors cannot be null'); + } + $this->container['subErrors'] = $subErrors; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. + * + * @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/ManagementWebhook/VerificationErrorRecursive.php b/src/Adyen/Model/ManagementWebhook/VerificationErrorRecursive.php new file mode 100644 index 000000000..ecaf7d727 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhook/VerificationErrorRecursive.php @@ -0,0 +1,521 @@ + + */ +class VerificationErrorRecursive implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VerificationError-recursive'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'code' => 'string', + 'message' => 'string', + 'type' => 'string', + 'remediatingActions' => '\Adyen\Model\ManagementWebhook\RemediatingAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'code' => null, + 'message' => null, + 'type' => null, + 'remediatingActions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'code' => false, + 'message' => false, + 'type' => false, + 'remediatingActions' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'type' => 'type', + 'remediatingActions' => 'remediatingActions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'type' => 'setType', + 'remediatingActions' => 'setRemediatingActions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'type' => 'getType', + 'remediatingActions' => 'getRemediatingActions' + ]; + + /** + * 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_DATA_MISSING = 'dataMissing'; + public const TYPE_INVALID_INPUT = 'invalidInput'; + public const TYPE_PENDING_STATUS = 'pendingStatus'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DATA_MISSING, + self::TYPE_INVALID_INPUT, + self::TYPE_PENDING_STATUS, + ]; + } + /** + * 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('code', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('remediatingActions', $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->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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The verification error code. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message The verification error message. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. + * + * @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 remediatingActions + * + * @return \Adyen\Model\ManagementWebhook\RemediatingAction[]|null + */ + public function getRemediatingActions() + { + return $this->container['remediatingActions']; + } + + /** + * Sets remediatingActions + * + * @param \Adyen\Model\ManagementWebhook\RemediatingAction[]|null $remediatingActions The actions that you can take to resolve the verification error. + * + * @return self + */ + public function setRemediatingActions($remediatingActions) + { + if (is_null($remediatingActions)) { + throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); + } + $this->container['remediatingActions'] = $remediatingActions; + + 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/POSTerminalManagement/Address.php b/src/Adyen/Model/POSTerminalManagement/Address.php index 9ac39790f..b7e63fb41 100644 --- a/src/Adyen/Model/POSTerminalManagement/Address.php +++ b/src/Adyen/Model/POSTerminalManagement/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php index e40a07e5d..e3bec84df 100644 --- a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php index 7fac4095e..90419d033 100644 --- a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php b/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php index 143079d49..f6f82b85e 100644 --- a/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php b/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php index 0180c0baf..5bfd1bfb7 100644 --- a/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php index 292ed7149..4e8965181 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php index 6f1ebd2a8..bd6c08da0 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php index c8cb240e0..0405aee1b 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php index 2022450d2..f4dfb8692 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php index 2a11392dd..5d6777cd2 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php index bd8c5cfe6..29e2515ed 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php b/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php index bf48100c0..51d94dcc2 100644 --- a/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php +++ b/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/ModelInterface.php b/src/Adyen/Model/POSTerminalManagement/ModelInterface.php index 08ddecc37..1f53e429a 100644 --- a/src/Adyen/Model/POSTerminalManagement/ModelInterface.php +++ b/src/Adyen/Model/POSTerminalManagement/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 570b6d004..b6a5027ee 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/POSTerminalManagement/ServiceError.php b/src/Adyen/Model/POSTerminalManagement/ServiceError.php index 92cc7b76d..125ddf9d7 100644 --- a/src/Adyen/Model/POSTerminalManagement/ServiceError.php +++ b/src/Adyen/Model/POSTerminalManagement/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/POSTerminalManagement/Store.php b/src/Adyen/Model/POSTerminalManagement/Store.php index 26d96dc0d..e11a908de 100644 --- a/src/Adyen/Model/POSTerminalManagement/Store.php +++ b/src/Adyen/Model/POSTerminalManagement/Store.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 1 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payment/AccountInfo.php b/src/Adyen/Model/Payment/AccountInfo.php new file mode 100644 index 000000000..d1b34723e --- /dev/null +++ b/src/Adyen/Model/Payment/AccountInfo.php @@ -0,0 +1,1220 @@ + + */ +class AccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountAgeIndicator' => 'string', + 'accountChangeDate' => '\DateTime', + 'accountChangeIndicator' => 'string', + 'accountCreationDate' => '\DateTime', + 'accountType' => 'string', + 'addCardAttemptsDay' => 'int', + 'deliveryAddressUsageDate' => '\DateTime', + 'deliveryAddressUsageIndicator' => 'string', + 'homePhone' => 'string', + 'mobilePhone' => 'string', + 'passwordChangeDate' => '\DateTime', + 'passwordChangeIndicator' => 'string', + 'pastTransactionsDay' => 'int', + 'pastTransactionsYear' => 'int', + 'paymentAccountAge' => '\DateTime', + 'paymentAccountIndicator' => 'string', + 'purchasesLast6Months' => 'int', + 'suspiciousActivity' => 'bool', + 'workPhone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountAgeIndicator' => null, + 'accountChangeDate' => 'date-time', + 'accountChangeIndicator' => null, + 'accountCreationDate' => 'date-time', + 'accountType' => null, + 'addCardAttemptsDay' => 'int32', + 'deliveryAddressUsageDate' => 'date-time', + 'deliveryAddressUsageIndicator' => null, + 'homePhone' => null, + 'mobilePhone' => null, + 'passwordChangeDate' => 'date-time', + 'passwordChangeIndicator' => null, + 'pastTransactionsDay' => 'int32', + 'pastTransactionsYear' => 'int32', + 'paymentAccountAge' => 'date-time', + 'paymentAccountIndicator' => null, + 'purchasesLast6Months' => 'int32', + 'suspiciousActivity' => null, + 'workPhone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountAgeIndicator' => false, + 'accountChangeDate' => false, + 'accountChangeIndicator' => false, + 'accountCreationDate' => false, + 'accountType' => false, + 'addCardAttemptsDay' => true, + 'deliveryAddressUsageDate' => false, + 'deliveryAddressUsageIndicator' => false, + 'homePhone' => false, + 'mobilePhone' => false, + 'passwordChangeDate' => false, + 'passwordChangeIndicator' => false, + 'pastTransactionsDay' => true, + 'pastTransactionsYear' => true, + 'paymentAccountAge' => false, + 'paymentAccountIndicator' => false, + 'purchasesLast6Months' => true, + 'suspiciousActivity' => 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 = [ + 'accountAgeIndicator' => 'accountAgeIndicator', + 'accountChangeDate' => 'accountChangeDate', + 'accountChangeIndicator' => 'accountChangeIndicator', + 'accountCreationDate' => 'accountCreationDate', + 'accountType' => 'accountType', + 'addCardAttemptsDay' => 'addCardAttemptsDay', + 'deliveryAddressUsageDate' => 'deliveryAddressUsageDate', + 'deliveryAddressUsageIndicator' => 'deliveryAddressUsageIndicator', + 'homePhone' => 'homePhone', + 'mobilePhone' => 'mobilePhone', + 'passwordChangeDate' => 'passwordChangeDate', + 'passwordChangeIndicator' => 'passwordChangeIndicator', + 'pastTransactionsDay' => 'pastTransactionsDay', + 'pastTransactionsYear' => 'pastTransactionsYear', + 'paymentAccountAge' => 'paymentAccountAge', + 'paymentAccountIndicator' => 'paymentAccountIndicator', + 'purchasesLast6Months' => 'purchasesLast6Months', + 'suspiciousActivity' => 'suspiciousActivity', + 'workPhone' => 'workPhone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountAgeIndicator' => 'setAccountAgeIndicator', + 'accountChangeDate' => 'setAccountChangeDate', + 'accountChangeIndicator' => 'setAccountChangeIndicator', + 'accountCreationDate' => 'setAccountCreationDate', + 'accountType' => 'setAccountType', + 'addCardAttemptsDay' => 'setAddCardAttemptsDay', + 'deliveryAddressUsageDate' => 'setDeliveryAddressUsageDate', + 'deliveryAddressUsageIndicator' => 'setDeliveryAddressUsageIndicator', + 'homePhone' => 'setHomePhone', + 'mobilePhone' => 'setMobilePhone', + 'passwordChangeDate' => 'setPasswordChangeDate', + 'passwordChangeIndicator' => 'setPasswordChangeIndicator', + 'pastTransactionsDay' => 'setPastTransactionsDay', + 'pastTransactionsYear' => 'setPastTransactionsYear', + 'paymentAccountAge' => 'setPaymentAccountAge', + 'paymentAccountIndicator' => 'setPaymentAccountIndicator', + 'purchasesLast6Months' => 'setPurchasesLast6Months', + 'suspiciousActivity' => 'setSuspiciousActivity', + 'workPhone' => 'setWorkPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountAgeIndicator' => 'getAccountAgeIndicator', + 'accountChangeDate' => 'getAccountChangeDate', + 'accountChangeIndicator' => 'getAccountChangeIndicator', + 'accountCreationDate' => 'getAccountCreationDate', + 'accountType' => 'getAccountType', + 'addCardAttemptsDay' => 'getAddCardAttemptsDay', + 'deliveryAddressUsageDate' => 'getDeliveryAddressUsageDate', + 'deliveryAddressUsageIndicator' => 'getDeliveryAddressUsageIndicator', + 'homePhone' => 'getHomePhone', + 'mobilePhone' => 'getMobilePhone', + 'passwordChangeDate' => 'getPasswordChangeDate', + 'passwordChangeIndicator' => 'getPasswordChangeIndicator', + 'pastTransactionsDay' => 'getPastTransactionsDay', + 'pastTransactionsYear' => 'getPastTransactionsYear', + 'paymentAccountAge' => 'getPaymentAccountAge', + 'paymentAccountIndicator' => 'getPaymentAccountIndicator', + 'purchasesLast6Months' => 'getPurchasesLast6Months', + 'suspiciousActivity' => 'getSuspiciousActivity', + '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 ACCOUNT_AGE_INDICATOR_NOT_APPLICABLE = 'notApplicable'; + public const ACCOUNT_AGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const ACCOUNT_AGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const ACCOUNT_AGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const ACCOUNT_AGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const ACCOUNT_CHANGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const ACCOUNT_CHANGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const ACCOUNT_CHANGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const ACCOUNT_CHANGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const ACCOUNT_TYPE_NOT_APPLICABLE = 'notApplicable'; + public const ACCOUNT_TYPE_CREDIT = 'credit'; + public const ACCOUNT_TYPE_DEBIT = 'debit'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const PASSWORD_CHANGE_INDICATOR_NOT_APPLICABLE = 'notApplicable'; + public const PASSWORD_CHANGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const PASSWORD_CHANGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const PASSWORD_CHANGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const PASSWORD_CHANGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const PAYMENT_ACCOUNT_INDICATOR_NOT_APPLICABLE = 'notApplicable'; + public const PAYMENT_ACCOUNT_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const PAYMENT_ACCOUNT_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const PAYMENT_ACCOUNT_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const PAYMENT_ACCOUNT_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountAgeIndicatorAllowableValues() + { + return [ + self::ACCOUNT_AGE_INDICATOR_NOT_APPLICABLE, + self::ACCOUNT_AGE_INDICATOR_THIS_TRANSACTION, + self::ACCOUNT_AGE_INDICATOR_LESS_THAN30_DAYS, + self::ACCOUNT_AGE_INDICATOR_FROM30_TO60_DAYS, + self::ACCOUNT_AGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountChangeIndicatorAllowableValues() + { + return [ + self::ACCOUNT_CHANGE_INDICATOR_THIS_TRANSACTION, + self::ACCOUNT_CHANGE_INDICATOR_LESS_THAN30_DAYS, + self::ACCOUNT_CHANGE_INDICATOR_FROM30_TO60_DAYS, + self::ACCOUNT_CHANGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountTypeAllowableValues() + { + return [ + self::ACCOUNT_TYPE_NOT_APPLICABLE, + self::ACCOUNT_TYPE_CREDIT, + self::ACCOUNT_TYPE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeliveryAddressUsageIndicatorAllowableValues() + { + return [ + self::DELIVERY_ADDRESS_USAGE_INDICATOR_THIS_TRANSACTION, + self::DELIVERY_ADDRESS_USAGE_INDICATOR_LESS_THAN30_DAYS, + self::DELIVERY_ADDRESS_USAGE_INDICATOR_FROM30_TO60_DAYS, + self::DELIVERY_ADDRESS_USAGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPasswordChangeIndicatorAllowableValues() + { + return [ + self::PASSWORD_CHANGE_INDICATOR_NOT_APPLICABLE, + self::PASSWORD_CHANGE_INDICATOR_THIS_TRANSACTION, + self::PASSWORD_CHANGE_INDICATOR_LESS_THAN30_DAYS, + self::PASSWORD_CHANGE_INDICATOR_FROM30_TO60_DAYS, + self::PASSWORD_CHANGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaymentAccountIndicatorAllowableValues() + { + return [ + self::PAYMENT_ACCOUNT_INDICATOR_NOT_APPLICABLE, + self::PAYMENT_ACCOUNT_INDICATOR_THIS_TRANSACTION, + self::PAYMENT_ACCOUNT_INDICATOR_LESS_THAN30_DAYS, + self::PAYMENT_ACCOUNT_INDICATOR_FROM30_TO60_DAYS, + self::PAYMENT_ACCOUNT_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * 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('accountAgeIndicator', $data ?? [], null); + $this->setIfExists('accountChangeDate', $data ?? [], null); + $this->setIfExists('accountChangeIndicator', $data ?? [], null); + $this->setIfExists('accountCreationDate', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('addCardAttemptsDay', $data ?? [], null); + $this->setIfExists('deliveryAddressUsageDate', $data ?? [], null); + $this->setIfExists('deliveryAddressUsageIndicator', $data ?? [], null); + $this->setIfExists('homePhone', $data ?? [], null); + $this->setIfExists('mobilePhone', $data ?? [], null); + $this->setIfExists('passwordChangeDate', $data ?? [], null); + $this->setIfExists('passwordChangeIndicator', $data ?? [], null); + $this->setIfExists('pastTransactionsDay', $data ?? [], null); + $this->setIfExists('pastTransactionsYear', $data ?? [], null); + $this->setIfExists('paymentAccountAge', $data ?? [], null); + $this->setIfExists('paymentAccountIndicator', $data ?? [], null); + $this->setIfExists('purchasesLast6Months', $data ?? [], null); + $this->setIfExists('suspiciousActivity', $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->getAccountAgeIndicatorAllowableValues(); + if (!is_null($this->container['accountAgeIndicator']) && !in_array($this->container['accountAgeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountAgeIndicator', must be one of '%s'", + $this->container['accountAgeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAccountChangeIndicatorAllowableValues(); + if (!is_null($this->container['accountChangeIndicator']) && !in_array($this->container['accountChangeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountChangeIndicator', must be one of '%s'", + $this->container['accountChangeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!is_null($this->container['accountType']) && !in_array($this->container['accountType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountType', must be one of '%s'", + $this->container['accountType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDeliveryAddressUsageIndicatorAllowableValues(); + if (!is_null($this->container['deliveryAddressUsageIndicator']) && !in_array($this->container['deliveryAddressUsageIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deliveryAddressUsageIndicator', must be one of '%s'", + $this->container['deliveryAddressUsageIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPasswordChangeIndicatorAllowableValues(); + if (!is_null($this->container['passwordChangeIndicator']) && !in_array($this->container['passwordChangeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'passwordChangeIndicator', must be one of '%s'", + $this->container['passwordChangeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPaymentAccountIndicatorAllowableValues(); + if (!is_null($this->container['paymentAccountIndicator']) && !in_array($this->container['paymentAccountIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paymentAccountIndicator', must be one of '%s'", + $this->container['paymentAccountIndicator'], + 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 accountAgeIndicator + * + * @return string|null + */ + public function getAccountAgeIndicator() + { + return $this->container['accountAgeIndicator']; + } + + /** + * Sets accountAgeIndicator + * + * @param string|null $accountAgeIndicator Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setAccountAgeIndicator($accountAgeIndicator) + { + if (is_null($accountAgeIndicator)) { + throw new \InvalidArgumentException('non-nullable accountAgeIndicator cannot be null'); + } + $allowedValues = $this->getAccountAgeIndicatorAllowableValues(); + if (!in_array($accountAgeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountAgeIndicator', must be one of '%s'", + $accountAgeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountAgeIndicator'] = $accountAgeIndicator; + + return $this; + } + + /** + * Gets accountChangeDate + * + * @return \DateTime|null + */ + public function getAccountChangeDate() + { + return $this->container['accountChangeDate']; + } + + /** + * Sets accountChangeDate + * + * @param \DateTime|null $accountChangeDate Date when the shopper's account was last changed. + * + * @return self + */ + public function setAccountChangeDate($accountChangeDate) + { + if (is_null($accountChangeDate)) { + throw new \InvalidArgumentException('non-nullable accountChangeDate cannot be null'); + } + $this->container['accountChangeDate'] = $accountChangeDate; + + return $this; + } + + /** + * Gets accountChangeIndicator + * + * @return string|null + */ + public function getAccountChangeIndicator() + { + return $this->container['accountChangeIndicator']; + } + + /** + * Sets accountChangeIndicator + * + * @param string|null $accountChangeIndicator Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setAccountChangeIndicator($accountChangeIndicator) + { + if (is_null($accountChangeIndicator)) { + throw new \InvalidArgumentException('non-nullable accountChangeIndicator cannot be null'); + } + $allowedValues = $this->getAccountChangeIndicatorAllowableValues(); + if (!in_array($accountChangeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountChangeIndicator', must be one of '%s'", + $accountChangeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountChangeIndicator'] = $accountChangeIndicator; + + return $this; + } + + /** + * Gets accountCreationDate + * + * @return \DateTime|null + */ + public function getAccountCreationDate() + { + return $this->container['accountCreationDate']; + } + + /** + * Sets accountCreationDate + * + * @param \DateTime|null $accountCreationDate Date when the shopper's account was created. + * + * @return self + */ + public function setAccountCreationDate($accountCreationDate) + { + if (is_null($accountCreationDate)) { + throw new \InvalidArgumentException('non-nullable accountCreationDate cannot be null'); + } + $this->container['accountCreationDate'] = $accountCreationDate; + + return $this; + } + + /** + * Gets accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!in_array($accountType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountType', must be one of '%s'", + $accountType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets addCardAttemptsDay + * + * @return int|null + */ + public function getAddCardAttemptsDay() + { + return $this->container['addCardAttemptsDay']; + } + + /** + * Sets addCardAttemptsDay + * + * @param int|null $addCardAttemptsDay Number of attempts the shopper tried to add a card to their account in the last day. + * + * @return self + */ + public function setAddCardAttemptsDay($addCardAttemptsDay) + { + // Do nothing for nullable integers + $this->container['addCardAttemptsDay'] = $addCardAttemptsDay; + + return $this; + } + + /** + * Gets deliveryAddressUsageDate + * + * @return \DateTime|null + */ + public function getDeliveryAddressUsageDate() + { + return $this->container['deliveryAddressUsageDate']; + } + + /** + * Sets deliveryAddressUsageDate + * + * @param \DateTime|null $deliveryAddressUsageDate Date the selected delivery address was first used. + * + * @return self + */ + public function setDeliveryAddressUsageDate($deliveryAddressUsageDate) + { + if (is_null($deliveryAddressUsageDate)) { + throw new \InvalidArgumentException('non-nullable deliveryAddressUsageDate cannot be null'); + } + $this->container['deliveryAddressUsageDate'] = $deliveryAddressUsageDate; + + return $this; + } + + /** + * Gets deliveryAddressUsageIndicator + * + * @return string|null + */ + public function getDeliveryAddressUsageIndicator() + { + return $this->container['deliveryAddressUsageIndicator']; + } + + /** + * Sets deliveryAddressUsageIndicator + * + * @param string|null $deliveryAddressUsageIndicator Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setDeliveryAddressUsageIndicator($deliveryAddressUsageIndicator) + { + if (is_null($deliveryAddressUsageIndicator)) { + throw new \InvalidArgumentException('non-nullable deliveryAddressUsageIndicator cannot be null'); + } + $allowedValues = $this->getDeliveryAddressUsageIndicatorAllowableValues(); + if (!in_array($deliveryAddressUsageIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deliveryAddressUsageIndicator', must be one of '%s'", + $deliveryAddressUsageIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deliveryAddressUsageIndicator'] = $deliveryAddressUsageIndicator; + + return $this; + } + + /** + * Gets homePhone + * + * @return string|null + * @deprecated + */ + public function getHomePhone() + { + return $this->container['homePhone']; + } + + /** + * Sets homePhone + * + * @param string|null $homePhone Shopper's home phone number (including the country code). + * + * @return self + * @deprecated + */ + public function setHomePhone($homePhone) + { + if (is_null($homePhone)) { + throw new \InvalidArgumentException('non-nullable homePhone cannot be null'); + } + $this->container['homePhone'] = $homePhone; + + return $this; + } + + /** + * Gets mobilePhone + * + * @return string|null + * @deprecated + */ + public function getMobilePhone() + { + return $this->container['mobilePhone']; + } + + /** + * Sets mobilePhone + * + * @param string|null $mobilePhone Shopper's mobile phone number (including the country code). + * + * @return self + * @deprecated + */ + public function setMobilePhone($mobilePhone) + { + if (is_null($mobilePhone)) { + throw new \InvalidArgumentException('non-nullable mobilePhone cannot be null'); + } + $this->container['mobilePhone'] = $mobilePhone; + + return $this; + } + + /** + * Gets passwordChangeDate + * + * @return \DateTime|null + */ + public function getPasswordChangeDate() + { + return $this->container['passwordChangeDate']; + } + + /** + * Sets passwordChangeDate + * + * @param \DateTime|null $passwordChangeDate Date when the shopper last changed their password. + * + * @return self + */ + public function setPasswordChangeDate($passwordChangeDate) + { + if (is_null($passwordChangeDate)) { + throw new \InvalidArgumentException('non-nullable passwordChangeDate cannot be null'); + } + $this->container['passwordChangeDate'] = $passwordChangeDate; + + return $this; + } + + /** + * Gets passwordChangeIndicator + * + * @return string|null + */ + public function getPasswordChangeIndicator() + { + return $this->container['passwordChangeIndicator']; + } + + /** + * Sets passwordChangeIndicator + * + * @param string|null $passwordChangeIndicator Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setPasswordChangeIndicator($passwordChangeIndicator) + { + if (is_null($passwordChangeIndicator)) { + throw new \InvalidArgumentException('non-nullable passwordChangeIndicator cannot be null'); + } + $allowedValues = $this->getPasswordChangeIndicatorAllowableValues(); + if (!in_array($passwordChangeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'passwordChangeIndicator', must be one of '%s'", + $passwordChangeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['passwordChangeIndicator'] = $passwordChangeIndicator; + + return $this; + } + + /** + * Gets pastTransactionsDay + * + * @return int|null + */ + public function getPastTransactionsDay() + { + return $this->container['pastTransactionsDay']; + } + + /** + * Sets pastTransactionsDay + * + * @param int|null $pastTransactionsDay Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. + * + * @return self + */ + public function setPastTransactionsDay($pastTransactionsDay) + { + // Do nothing for nullable integers + $this->container['pastTransactionsDay'] = $pastTransactionsDay; + + return $this; + } + + /** + * Gets pastTransactionsYear + * + * @return int|null + */ + public function getPastTransactionsYear() + { + return $this->container['pastTransactionsYear']; + } + + /** + * Sets pastTransactionsYear + * + * @param int|null $pastTransactionsYear Number of all transactions (successful and abandoned) from this shopper in the past year. + * + * @return self + */ + public function setPastTransactionsYear($pastTransactionsYear) + { + // Do nothing for nullable integers + $this->container['pastTransactionsYear'] = $pastTransactionsYear; + + return $this; + } + + /** + * Gets paymentAccountAge + * + * @return \DateTime|null + */ + public function getPaymentAccountAge() + { + return $this->container['paymentAccountAge']; + } + + /** + * Sets paymentAccountAge + * + * @param \DateTime|null $paymentAccountAge Date this payment method was added to the shopper's account. + * + * @return self + */ + public function setPaymentAccountAge($paymentAccountAge) + { + if (is_null($paymentAccountAge)) { + throw new \InvalidArgumentException('non-nullable paymentAccountAge cannot be null'); + } + $this->container['paymentAccountAge'] = $paymentAccountAge; + + return $this; + } + + /** + * Gets paymentAccountIndicator + * + * @return string|null + */ + public function getPaymentAccountIndicator() + { + return $this->container['paymentAccountIndicator']; + } + + /** + * Sets paymentAccountIndicator + * + * @param string|null $paymentAccountIndicator Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setPaymentAccountIndicator($paymentAccountIndicator) + { + if (is_null($paymentAccountIndicator)) { + throw new \InvalidArgumentException('non-nullable paymentAccountIndicator cannot be null'); + } + $allowedValues = $this->getPaymentAccountIndicatorAllowableValues(); + if (!in_array($paymentAccountIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paymentAccountIndicator', must be one of '%s'", + $paymentAccountIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paymentAccountIndicator'] = $paymentAccountIndicator; + + return $this; + } + + /** + * Gets purchasesLast6Months + * + * @return int|null + */ + public function getPurchasesLast6Months() + { + return $this->container['purchasesLast6Months']; + } + + /** + * Sets purchasesLast6Months + * + * @param int|null $purchasesLast6Months Number of successful purchases in the last six months. + * + * @return self + */ + public function setPurchasesLast6Months($purchasesLast6Months) + { + // Do nothing for nullable integers + $this->container['purchasesLast6Months'] = $purchasesLast6Months; + + return $this; + } + + /** + * Gets suspiciousActivity + * + * @return bool|null + */ + public function getSuspiciousActivity() + { + return $this->container['suspiciousActivity']; + } + + /** + * Sets suspiciousActivity + * + * @param bool|null $suspiciousActivity Whether suspicious activity was recorded on this account. + * + * @return self + */ + public function setSuspiciousActivity($suspiciousActivity) + { + if (is_null($suspiciousActivity)) { + throw new \InvalidArgumentException('non-nullable suspiciousActivity cannot be null'); + } + $this->container['suspiciousActivity'] = $suspiciousActivity; + + return $this; + } + + /** + * Gets workPhone + * + * @return string|null + * @deprecated + */ + public function getWorkPhone() + { + return $this->container['workPhone']; + } + + /** + * Sets workPhone + * + * @param string|null $workPhone Shopper's work phone number (including the country code). + * + * @return self + * @deprecated + */ + 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/Payment/AcctInfo.php b/src/Adyen/Model/Payment/AcctInfo.php new file mode 100644 index 000000000..5497825fa --- /dev/null +++ b/src/Adyen/Model/Payment/AcctInfo.php @@ -0,0 +1,1151 @@ + + */ +class AcctInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AcctInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'chAccAgeInd' => 'string', + 'chAccChange' => 'string', + 'chAccChangeInd' => 'string', + 'chAccPwChange' => 'string', + 'chAccPwChangeInd' => 'string', + 'chAccString' => 'string', + 'nbPurchaseAccount' => 'string', + 'paymentAccAge' => 'string', + 'paymentAccInd' => 'string', + 'provisionAttemptsDay' => 'string', + 'shipAddressUsage' => 'string', + 'shipAddressUsageInd' => 'string', + 'shipNameIndicator' => 'string', + 'suspiciousAccActivity' => 'string', + 'txnActivityDay' => 'string', + 'txnActivityYear' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'chAccAgeInd' => null, + 'chAccChange' => null, + 'chAccChangeInd' => null, + 'chAccPwChange' => null, + 'chAccPwChangeInd' => null, + 'chAccString' => null, + 'nbPurchaseAccount' => null, + 'paymentAccAge' => null, + 'paymentAccInd' => null, + 'provisionAttemptsDay' => null, + 'shipAddressUsage' => null, + 'shipAddressUsageInd' => null, + 'shipNameIndicator' => null, + 'suspiciousAccActivity' => null, + 'txnActivityDay' => null, + 'txnActivityYear' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'chAccAgeInd' => false, + 'chAccChange' => false, + 'chAccChangeInd' => false, + 'chAccPwChange' => false, + 'chAccPwChangeInd' => false, + 'chAccString' => false, + 'nbPurchaseAccount' => false, + 'paymentAccAge' => false, + 'paymentAccInd' => false, + 'provisionAttemptsDay' => false, + 'shipAddressUsage' => false, + 'shipAddressUsageInd' => false, + 'shipNameIndicator' => false, + 'suspiciousAccActivity' => false, + 'txnActivityDay' => false, + 'txnActivityYear' => 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 = [ + 'chAccAgeInd' => 'chAccAgeInd', + 'chAccChange' => 'chAccChange', + 'chAccChangeInd' => 'chAccChangeInd', + 'chAccPwChange' => 'chAccPwChange', + 'chAccPwChangeInd' => 'chAccPwChangeInd', + 'chAccString' => 'chAccString', + 'nbPurchaseAccount' => 'nbPurchaseAccount', + 'paymentAccAge' => 'paymentAccAge', + 'paymentAccInd' => 'paymentAccInd', + 'provisionAttemptsDay' => 'provisionAttemptsDay', + 'shipAddressUsage' => 'shipAddressUsage', + 'shipAddressUsageInd' => 'shipAddressUsageInd', + 'shipNameIndicator' => 'shipNameIndicator', + 'suspiciousAccActivity' => 'suspiciousAccActivity', + 'txnActivityDay' => 'txnActivityDay', + 'txnActivityYear' => 'txnActivityYear' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'chAccAgeInd' => 'setChAccAgeInd', + 'chAccChange' => 'setChAccChange', + 'chAccChangeInd' => 'setChAccChangeInd', + 'chAccPwChange' => 'setChAccPwChange', + 'chAccPwChangeInd' => 'setChAccPwChangeInd', + 'chAccString' => 'setChAccString', + 'nbPurchaseAccount' => 'setNbPurchaseAccount', + 'paymentAccAge' => 'setPaymentAccAge', + 'paymentAccInd' => 'setPaymentAccInd', + 'provisionAttemptsDay' => 'setProvisionAttemptsDay', + 'shipAddressUsage' => 'setShipAddressUsage', + 'shipAddressUsageInd' => 'setShipAddressUsageInd', + 'shipNameIndicator' => 'setShipNameIndicator', + 'suspiciousAccActivity' => 'setSuspiciousAccActivity', + 'txnActivityDay' => 'setTxnActivityDay', + 'txnActivityYear' => 'setTxnActivityYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'chAccAgeInd' => 'getChAccAgeInd', + 'chAccChange' => 'getChAccChange', + 'chAccChangeInd' => 'getChAccChangeInd', + 'chAccPwChange' => 'getChAccPwChange', + 'chAccPwChangeInd' => 'getChAccPwChangeInd', + 'chAccString' => 'getChAccString', + 'nbPurchaseAccount' => 'getNbPurchaseAccount', + 'paymentAccAge' => 'getPaymentAccAge', + 'paymentAccInd' => 'getPaymentAccInd', + 'provisionAttemptsDay' => 'getProvisionAttemptsDay', + 'shipAddressUsage' => 'getShipAddressUsage', + 'shipAddressUsageInd' => 'getShipAddressUsageInd', + 'shipNameIndicator' => 'getShipNameIndicator', + 'suspiciousAccActivity' => 'getSuspiciousAccActivity', + 'txnActivityDay' => 'getTxnActivityDay', + 'txnActivityYear' => 'getTxnActivityYear' + ]; + + /** + * 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 CH_ACC_AGE_IND__01 = '01'; + public const CH_ACC_AGE_IND__02 = '02'; + public const CH_ACC_AGE_IND__03 = '03'; + public const CH_ACC_AGE_IND__04 = '04'; + public const CH_ACC_AGE_IND__05 = '05'; + public const CH_ACC_CHANGE_IND__01 = '01'; + public const CH_ACC_CHANGE_IND__02 = '02'; + public const CH_ACC_CHANGE_IND__03 = '03'; + public const CH_ACC_CHANGE_IND__04 = '04'; + public const CH_ACC_PW_CHANGE_IND__01 = '01'; + public const CH_ACC_PW_CHANGE_IND__02 = '02'; + public const CH_ACC_PW_CHANGE_IND__03 = '03'; + public const CH_ACC_PW_CHANGE_IND__04 = '04'; + public const CH_ACC_PW_CHANGE_IND__05 = '05'; + public const PAYMENT_ACC_IND__01 = '01'; + public const PAYMENT_ACC_IND__02 = '02'; + public const PAYMENT_ACC_IND__03 = '03'; + public const PAYMENT_ACC_IND__04 = '04'; + public const PAYMENT_ACC_IND__05 = '05'; + public const SHIP_ADDRESS_USAGE_IND__01 = '01'; + public const SHIP_ADDRESS_USAGE_IND__02 = '02'; + public const SHIP_ADDRESS_USAGE_IND__03 = '03'; + public const SHIP_ADDRESS_USAGE_IND__04 = '04'; + public const SHIP_NAME_INDICATOR__01 = '01'; + public const SHIP_NAME_INDICATOR__02 = '02'; + public const SUSPICIOUS_ACC_ACTIVITY__01 = '01'; + public const SUSPICIOUS_ACC_ACTIVITY__02 = '02'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChAccAgeIndAllowableValues() + { + return [ + self::CH_ACC_AGE_IND__01, + self::CH_ACC_AGE_IND__02, + self::CH_ACC_AGE_IND__03, + self::CH_ACC_AGE_IND__04, + self::CH_ACC_AGE_IND__05, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChAccChangeIndAllowableValues() + { + return [ + self::CH_ACC_CHANGE_IND__01, + self::CH_ACC_CHANGE_IND__02, + self::CH_ACC_CHANGE_IND__03, + self::CH_ACC_CHANGE_IND__04, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChAccPwChangeIndAllowableValues() + { + return [ + self::CH_ACC_PW_CHANGE_IND__01, + self::CH_ACC_PW_CHANGE_IND__02, + self::CH_ACC_PW_CHANGE_IND__03, + self::CH_ACC_PW_CHANGE_IND__04, + self::CH_ACC_PW_CHANGE_IND__05, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaymentAccIndAllowableValues() + { + return [ + self::PAYMENT_ACC_IND__01, + self::PAYMENT_ACC_IND__02, + self::PAYMENT_ACC_IND__03, + self::PAYMENT_ACC_IND__04, + self::PAYMENT_ACC_IND__05, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShipAddressUsageIndAllowableValues() + { + return [ + self::SHIP_ADDRESS_USAGE_IND__01, + self::SHIP_ADDRESS_USAGE_IND__02, + self::SHIP_ADDRESS_USAGE_IND__03, + self::SHIP_ADDRESS_USAGE_IND__04, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShipNameIndicatorAllowableValues() + { + return [ + self::SHIP_NAME_INDICATOR__01, + self::SHIP_NAME_INDICATOR__02, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSuspiciousAccActivityAllowableValues() + { + return [ + self::SUSPICIOUS_ACC_ACTIVITY__01, + self::SUSPICIOUS_ACC_ACTIVITY__02, + ]; + } + /** + * 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('chAccAgeInd', $data ?? [], null); + $this->setIfExists('chAccChange', $data ?? [], null); + $this->setIfExists('chAccChangeInd', $data ?? [], null); + $this->setIfExists('chAccPwChange', $data ?? [], null); + $this->setIfExists('chAccPwChangeInd', $data ?? [], null); + $this->setIfExists('chAccString', $data ?? [], null); + $this->setIfExists('nbPurchaseAccount', $data ?? [], null); + $this->setIfExists('paymentAccAge', $data ?? [], null); + $this->setIfExists('paymentAccInd', $data ?? [], null); + $this->setIfExists('provisionAttemptsDay', $data ?? [], null); + $this->setIfExists('shipAddressUsage', $data ?? [], null); + $this->setIfExists('shipAddressUsageInd', $data ?? [], null); + $this->setIfExists('shipNameIndicator', $data ?? [], null); + $this->setIfExists('suspiciousAccActivity', $data ?? [], null); + $this->setIfExists('txnActivityDay', $data ?? [], null); + $this->setIfExists('txnActivityYear', $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->getChAccAgeIndAllowableValues(); + if (!is_null($this->container['chAccAgeInd']) && !in_array($this->container['chAccAgeInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chAccAgeInd', must be one of '%s'", + $this->container['chAccAgeInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChAccChangeIndAllowableValues(); + if (!is_null($this->container['chAccChangeInd']) && !in_array($this->container['chAccChangeInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chAccChangeInd', must be one of '%s'", + $this->container['chAccChangeInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChAccPwChangeIndAllowableValues(); + if (!is_null($this->container['chAccPwChangeInd']) && !in_array($this->container['chAccPwChangeInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chAccPwChangeInd', must be one of '%s'", + $this->container['chAccPwChangeInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPaymentAccIndAllowableValues(); + if (!is_null($this->container['paymentAccInd']) && !in_array($this->container['paymentAccInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paymentAccInd', must be one of '%s'", + $this->container['paymentAccInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getShipAddressUsageIndAllowableValues(); + if (!is_null($this->container['shipAddressUsageInd']) && !in_array($this->container['shipAddressUsageInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'shipAddressUsageInd', must be one of '%s'", + $this->container['shipAddressUsageInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getShipNameIndicatorAllowableValues(); + if (!is_null($this->container['shipNameIndicator']) && !in_array($this->container['shipNameIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'shipNameIndicator', must be one of '%s'", + $this->container['shipNameIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSuspiciousAccActivityAllowableValues(); + if (!is_null($this->container['suspiciousAccActivity']) && !in_array($this->container['suspiciousAccActivity'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'suspiciousAccActivity', must be one of '%s'", + $this->container['suspiciousAccActivity'], + 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 chAccAgeInd + * + * @return string|null + */ + public function getChAccAgeInd() + { + return $this->container['chAccAgeInd']; + } + + /** + * Sets chAccAgeInd + * + * @param string|null $chAccAgeInd Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days + * + * @return self + */ + public function setChAccAgeInd($chAccAgeInd) + { + if (is_null($chAccAgeInd)) { + throw new \InvalidArgumentException('non-nullable chAccAgeInd cannot be null'); + } + $allowedValues = $this->getChAccAgeIndAllowableValues(); + if (!in_array($chAccAgeInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chAccAgeInd', must be one of '%s'", + $chAccAgeInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chAccAgeInd'] = $chAccAgeInd; + + return $this; + } + + /** + * Gets chAccChange + * + * @return string|null + */ + public function getChAccChange() + { + return $this->container['chAccChange']; + } + + /** + * Sets chAccChange + * + * @param string|null $chAccChange Date that the cardholder’s account with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: **YYYYMMDD** + * + * @return self + */ + public function setChAccChange($chAccChange) + { + if (is_null($chAccChange)) { + throw new \InvalidArgumentException('non-nullable chAccChange cannot be null'); + } + $this->container['chAccChange'] = $chAccChange; + + return $this; + } + + /** + * Gets chAccChangeInd + * + * @return string|null + */ + public function getChAccChangeInd() + { + return $this->container['chAccChangeInd']; + } + + /** + * Sets chAccChangeInd + * + * @param string|null $chAccChangeInd Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days + * + * @return self + */ + public function setChAccChangeInd($chAccChangeInd) + { + if (is_null($chAccChangeInd)) { + throw new \InvalidArgumentException('non-nullable chAccChangeInd cannot be null'); + } + $allowedValues = $this->getChAccChangeIndAllowableValues(); + if (!in_array($chAccChangeInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chAccChangeInd', must be one of '%s'", + $chAccChangeInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chAccChangeInd'] = $chAccChangeInd; + + return $this; + } + + /** + * Gets chAccPwChange + * + * @return string|null + */ + public function getChAccPwChange() + { + return $this->container['chAccPwChange']; + } + + /** + * Sets chAccPwChange + * + * @param string|null $chAccPwChange Date that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: **YYYYMMDD** + * + * @return self + */ + public function setChAccPwChange($chAccPwChange) + { + if (is_null($chAccPwChange)) { + throw new \InvalidArgumentException('non-nullable chAccPwChange cannot be null'); + } + $this->container['chAccPwChange'] = $chAccPwChange; + + return $this; + } + + /** + * Gets chAccPwChangeInd + * + * @return string|null + */ + public function getChAccPwChangeInd() + { + return $this->container['chAccPwChangeInd']; + } + + /** + * Sets chAccPwChangeInd + * + * @param string|null $chAccPwChangeInd Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days + * + * @return self + */ + public function setChAccPwChangeInd($chAccPwChangeInd) + { + if (is_null($chAccPwChangeInd)) { + throw new \InvalidArgumentException('non-nullable chAccPwChangeInd cannot be null'); + } + $allowedValues = $this->getChAccPwChangeIndAllowableValues(); + if (!in_array($chAccPwChangeInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chAccPwChangeInd', must be one of '%s'", + $chAccPwChangeInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chAccPwChangeInd'] = $chAccPwChangeInd; + + return $this; + } + + /** + * Gets chAccString + * + * @return string|null + */ + public function getChAccString() + { + return $this->container['chAccString']; + } + + /** + * Sets chAccString + * + * @param string|null $chAccString Date that the cardholder opened the account with the 3DS Requestor. Format: **YYYYMMDD** + * + * @return self + */ + public function setChAccString($chAccString) + { + if (is_null($chAccString)) { + throw new \InvalidArgumentException('non-nullable chAccString cannot be null'); + } + $this->container['chAccString'] = $chAccString; + + return $this; + } + + /** + * Gets nbPurchaseAccount + * + * @return string|null + */ + public function getNbPurchaseAccount() + { + return $this->container['nbPurchaseAccount']; + } + + /** + * Sets nbPurchaseAccount + * + * @param string|null $nbPurchaseAccount Number of purchases with this cardholder account during the previous six months. Max length: 4 characters. + * + * @return self + */ + public function setNbPurchaseAccount($nbPurchaseAccount) + { + if (is_null($nbPurchaseAccount)) { + throw new \InvalidArgumentException('non-nullable nbPurchaseAccount cannot be null'); + } + $this->container['nbPurchaseAccount'] = $nbPurchaseAccount; + + return $this; + } + + /** + * Gets paymentAccAge + * + * @return string|null + */ + public function getPaymentAccAge() + { + return $this->container['paymentAccAge']; + } + + /** + * Sets paymentAccAge + * + * @param string|null $paymentAccAge String that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: **YYYYMMDD** + * + * @return self + */ + public function setPaymentAccAge($paymentAccAge) + { + if (is_null($paymentAccAge)) { + throw new \InvalidArgumentException('non-nullable paymentAccAge cannot be null'); + } + $this->container['paymentAccAge'] = $paymentAccAge; + + return $this; + } + + /** + * Gets paymentAccInd + * + * @return string|null + */ + public function getPaymentAccInd() + { + return $this->container['paymentAccInd']; + } + + /** + * Sets paymentAccInd + * + * @param string|null $paymentAccInd Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days + * + * @return self + */ + public function setPaymentAccInd($paymentAccInd) + { + if (is_null($paymentAccInd)) { + throw new \InvalidArgumentException('non-nullable paymentAccInd cannot be null'); + } + $allowedValues = $this->getPaymentAccIndAllowableValues(); + if (!in_array($paymentAccInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paymentAccInd', must be one of '%s'", + $paymentAccInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paymentAccInd'] = $paymentAccInd; + + return $this; + } + + /** + * Gets provisionAttemptsDay + * + * @return string|null + */ + public function getProvisionAttemptsDay() + { + return $this->container['provisionAttemptsDay']; + } + + /** + * Sets provisionAttemptsDay + * + * @param string|null $provisionAttemptsDay Number of Add Card attempts in the last 24 hours. Max length: 3 characters. + * + * @return self + */ + public function setProvisionAttemptsDay($provisionAttemptsDay) + { + if (is_null($provisionAttemptsDay)) { + throw new \InvalidArgumentException('non-nullable provisionAttemptsDay cannot be null'); + } + $this->container['provisionAttemptsDay'] = $provisionAttemptsDay; + + return $this; + } + + /** + * Gets shipAddressUsage + * + * @return string|null + */ + public function getShipAddressUsage() + { + return $this->container['shipAddressUsage']; + } + + /** + * Sets shipAddressUsage + * + * @param string|null $shipAddressUsage String when the shipping address used for this transaction was first used with the 3DS Requestor. Format: **YYYYMMDD** + * + * @return self + */ + public function setShipAddressUsage($shipAddressUsage) + { + if (is_null($shipAddressUsage)) { + throw new \InvalidArgumentException('non-nullable shipAddressUsage cannot be null'); + } + $this->container['shipAddressUsage'] = $shipAddressUsage; + + return $this; + } + + /** + * Gets shipAddressUsageInd + * + * @return string|null + */ + public function getShipAddressUsageInd() + { + return $this->container['shipAddressUsageInd']; + } + + /** + * Sets shipAddressUsageInd + * + * @param string|null $shipAddressUsageInd Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days + * + * @return self + */ + public function setShipAddressUsageInd($shipAddressUsageInd) + { + if (is_null($shipAddressUsageInd)) { + throw new \InvalidArgumentException('non-nullable shipAddressUsageInd cannot be null'); + } + $allowedValues = $this->getShipAddressUsageIndAllowableValues(); + if (!in_array($shipAddressUsageInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'shipAddressUsageInd', must be one of '%s'", + $shipAddressUsageInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['shipAddressUsageInd'] = $shipAddressUsageInd; + + return $this; + } + + /** + * Gets shipNameIndicator + * + * @return string|null + */ + public function getShipNameIndicator() + { + return $this->container['shipNameIndicator']; + } + + /** + * Sets shipNameIndicator + * + * @param string|null $shipNameIndicator Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name + * + * @return self + */ + public function setShipNameIndicator($shipNameIndicator) + { + if (is_null($shipNameIndicator)) { + throw new \InvalidArgumentException('non-nullable shipNameIndicator cannot be null'); + } + $allowedValues = $this->getShipNameIndicatorAllowableValues(); + if (!in_array($shipNameIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'shipNameIndicator', must be one of '%s'", + $shipNameIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['shipNameIndicator'] = $shipNameIndicator; + + return $this; + } + + /** + * Gets suspiciousAccActivity + * + * @return string|null + */ + public function getSuspiciousAccActivity() + { + return $this->container['suspiciousAccActivity']; + } + + /** + * Sets suspiciousAccActivity + * + * @param string|null $suspiciousAccActivity Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed + * + * @return self + */ + public function setSuspiciousAccActivity($suspiciousAccActivity) + { + if (is_null($suspiciousAccActivity)) { + throw new \InvalidArgumentException('non-nullable suspiciousAccActivity cannot be null'); + } + $allowedValues = $this->getSuspiciousAccActivityAllowableValues(); + if (!in_array($suspiciousAccActivity, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'suspiciousAccActivity', must be one of '%s'", + $suspiciousAccActivity, + implode("', '", $allowedValues) + ) + ); + } + $this->container['suspiciousAccActivity'] = $suspiciousAccActivity; + + return $this; + } + + /** + * Gets txnActivityDay + * + * @return string|null + */ + public function getTxnActivityDay() + { + return $this->container['txnActivityDay']; + } + + /** + * Sets txnActivityDay + * + * @param string|null $txnActivityDay Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. Max length: 3 characters. + * + * @return self + */ + public function setTxnActivityDay($txnActivityDay) + { + if (is_null($txnActivityDay)) { + throw new \InvalidArgumentException('non-nullable txnActivityDay cannot be null'); + } + $this->container['txnActivityDay'] = $txnActivityDay; + + return $this; + } + + /** + * Gets txnActivityYear + * + * @return string|null + */ + public function getTxnActivityYear() + { + return $this->container['txnActivityYear']; + } + + /** + * Sets txnActivityYear + * + * @param string|null $txnActivityYear Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. Max length: 3 characters. + * + * @return self + */ + public function setTxnActivityYear($txnActivityYear) + { + if (is_null($txnActivityYear)) { + throw new \InvalidArgumentException('non-nullable txnActivityYear cannot be null'); + } + $this->container['txnActivityYear'] = $txnActivityYear; + + 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/Payment/AdditionalData3DSecure.php b/src/Adyen/Model/Payment/AdditionalData3DSecure.php new file mode 100644 index 000000000..c4675d41b --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalData3DSecure.php @@ -0,0 +1,593 @@ + + */ +class AdditionalData3DSecure implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalData3DSecure'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'allow3DS2' => 'string', + 'challengeWindowSize' => 'string', + 'executeThreeD' => 'string', + 'mpiImplementationType' => 'string', + 'scaExemption' => 'string', + 'threeDSVersion' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'allow3DS2' => null, + 'challengeWindowSize' => null, + 'executeThreeD' => null, + 'mpiImplementationType' => null, + 'scaExemption' => null, + 'threeDSVersion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'allow3DS2' => false, + 'challengeWindowSize' => false, + 'executeThreeD' => false, + 'mpiImplementationType' => false, + 'scaExemption' => false, + 'threeDSVersion' => 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 = [ + 'allow3DS2' => 'allow3DS2', + 'challengeWindowSize' => 'challengeWindowSize', + 'executeThreeD' => 'executeThreeD', + 'mpiImplementationType' => 'mpiImplementationType', + 'scaExemption' => 'scaExemption', + 'threeDSVersion' => 'threeDSVersion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'allow3DS2' => 'setAllow3DS2', + 'challengeWindowSize' => 'setChallengeWindowSize', + 'executeThreeD' => 'setExecuteThreeD', + 'mpiImplementationType' => 'setMpiImplementationType', + 'scaExemption' => 'setScaExemption', + 'threeDSVersion' => 'setThreeDSVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'allow3DS2' => 'getAllow3DS2', + 'challengeWindowSize' => 'getChallengeWindowSize', + 'executeThreeD' => 'getExecuteThreeD', + 'mpiImplementationType' => 'getMpiImplementationType', + 'scaExemption' => 'getScaExemption', + 'threeDSVersion' => 'getThreeDSVersion' + ]; + + /** + * 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 CHALLENGE_WINDOW_SIZE__01 = '01'; + public const CHALLENGE_WINDOW_SIZE__02 = '02'; + public const CHALLENGE_WINDOW_SIZE__03 = '03'; + public const CHALLENGE_WINDOW_SIZE__04 = '04'; + public const CHALLENGE_WINDOW_SIZE__05 = '05'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChallengeWindowSizeAllowableValues() + { + return [ + self::CHALLENGE_WINDOW_SIZE__01, + self::CHALLENGE_WINDOW_SIZE__02, + self::CHALLENGE_WINDOW_SIZE__03, + self::CHALLENGE_WINDOW_SIZE__04, + self::CHALLENGE_WINDOW_SIZE__05, + ]; + } + /** + * 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('allow3DS2', $data ?? [], null); + $this->setIfExists('challengeWindowSize', $data ?? [], null); + $this->setIfExists('executeThreeD', $data ?? [], null); + $this->setIfExists('mpiImplementationType', $data ?? [], null); + $this->setIfExists('scaExemption', $data ?? [], null); + $this->setIfExists('threeDSVersion', $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->getChallengeWindowSizeAllowableValues(); + if (!is_null($this->container['challengeWindowSize']) && !in_array($this->container['challengeWindowSize'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'challengeWindowSize', must be one of '%s'", + $this->container['challengeWindowSize'], + 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 allow3DS2 + * + * @return string|null + */ + public function getAllow3DS2() + { + return $this->container['allow3DS2']; + } + + /** + * Sets allow3DS2 + * + * @param string|null $allow3DS2 Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen still selects the version of 3D Secure based on configuration to optimize authorisation rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen will not offer 3D Secure 2 to your shopper regardless of your configuration. + * + * @return self + */ + public function setAllow3DS2($allow3DS2) + { + if (is_null($allow3DS2)) { + throw new \InvalidArgumentException('non-nullable allow3DS2 cannot be null'); + } + $this->container['allow3DS2'] = $allow3DS2; + + return $this; + } + + /** + * Gets challengeWindowSize + * + * @return string|null + */ + public function getChallengeWindowSize() + { + return $this->container['challengeWindowSize']; + } + + /** + * Sets challengeWindowSize + * + * @param string|null $challengeWindowSize Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen + * + * @return self + */ + public function setChallengeWindowSize($challengeWindowSize) + { + if (is_null($challengeWindowSize)) { + throw new \InvalidArgumentException('non-nullable challengeWindowSize cannot be null'); + } + $allowedValues = $this->getChallengeWindowSizeAllowableValues(); + if (!in_array($challengeWindowSize, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'challengeWindowSize', must be one of '%s'", + $challengeWindowSize, + implode("', '", $allowedValues) + ) + ); + } + $this->container['challengeWindowSize'] = $challengeWindowSize; + + return $this; + } + + /** + * Gets executeThreeD + * + * @return string|null + */ + public function getExecuteThreeD() + { + return $this->container['executeThreeD']; + } + + /** + * Sets executeThreeD + * + * @param string|null $executeThreeD Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don't perform 3D Secure authentication. Note that this setting results in refusals if the issuer mandates 3D Secure because of the PSD2 directive or other, national regulations. + * + * @return self + */ + public function setExecuteThreeD($executeThreeD) + { + if (is_null($executeThreeD)) { + throw new \InvalidArgumentException('non-nullable executeThreeD cannot be null'); + } + $this->container['executeThreeD'] = $executeThreeD; + + return $this; + } + + /** + * Gets mpiImplementationType + * + * @return string|null + */ + public function getMpiImplementationType() + { + return $this->container['mpiImplementationType']; + } + + /** + * Sets mpiImplementationType + * + * @param string|null $mpiImplementationType In case of Secure+, this field must be set to **CUPSecurePlus**. + * + * @return self + */ + public function setMpiImplementationType($mpiImplementationType) + { + if (is_null($mpiImplementationType)) { + throw new \InvalidArgumentException('non-nullable mpiImplementationType cannot be null'); + } + $this->container['mpiImplementationType'] = $mpiImplementationType; + + return $this; + } + + /** + * Gets scaExemption + * + * @return string|null + */ + public function getScaExemption() + { + return $this->container['scaExemption']; + } + + /** + * Sets scaExemption + * + * @param string|null $scaExemption Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** + * + * @return self + */ + public function setScaExemption($scaExemption) + { + if (is_null($scaExemption)) { + throw new \InvalidArgumentException('non-nullable scaExemption cannot be null'); + } + $this->container['scaExemption'] = $scaExemption; + + return $this; + } + + /** + * Gets threeDSVersion + * + * @return string|null + */ + public function getThreeDSVersion() + { + return $this->container['threeDSVersion']; + } + + /** + * Sets threeDSVersion + * + * @param string|null $threeDSVersion Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. + * + * @return self + */ + public function setThreeDSVersion($threeDSVersion) + { + if (is_null($threeDSVersion)) { + throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); + } + $this->container['threeDSVersion'] = $threeDSVersion; + + 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/Payment/AdditionalDataAirline.php b/src/Adyen/Model/Payment/AdditionalDataAirline.php new file mode 100644 index 000000000..16028c822 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataAirline.php @@ -0,0 +1,1305 @@ + + */ +class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataAirline'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'airlineAgencyInvoiceNumber' => 'string', + 'airlineAgencyPlanName' => 'string', + 'airlineAirlineCode' => 'string', + 'airlineAirlineDesignatorCode' => 'string', + 'airlineBoardingFee' => 'string', + 'airlineComputerizedReservationSystem' => 'string', + 'airlineCustomerReferenceNumber' => 'string', + 'airlineDocumentType' => 'string', + 'airlineFlightDate' => 'string', + 'airlineLegCarrierCode' => 'string', + 'airlineLegClassOfTravel' => 'string', + 'airlineLegDateOfTravel' => 'string', + 'airlineLegDepartAirport' => 'string', + 'airlineLegDepartTax' => 'string', + 'airlineLegDestinationCode' => 'string', + 'airlineLegFareBaseCode' => 'string', + 'airlineLegFlightNumber' => 'string', + 'airlineLegStopOverCode' => 'string', + 'airlinePassengerDateOfBirth' => 'string', + 'airlinePassengerFirstName' => 'string', + 'airlinePassengerLastName' => 'string', + 'airlinePassengerTelephoneNumber' => 'string', + 'airlinePassengerTravellerType' => 'string', + 'airlinePassengerName' => 'string', + 'airlineTicketIssueAddress' => 'string', + 'airlineTicketNumber' => 'string', + 'airlineTravelAgencyCode' => 'string', + 'airlineTravelAgencyName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'airlineAgencyInvoiceNumber' => null, + 'airlineAgencyPlanName' => null, + 'airlineAirlineCode' => null, + 'airlineAirlineDesignatorCode' => null, + 'airlineBoardingFee' => null, + 'airlineComputerizedReservationSystem' => null, + 'airlineCustomerReferenceNumber' => null, + 'airlineDocumentType' => null, + 'airlineFlightDate' => null, + 'airlineLegCarrierCode' => null, + 'airlineLegClassOfTravel' => null, + 'airlineLegDateOfTravel' => null, + 'airlineLegDepartAirport' => null, + 'airlineLegDepartTax' => null, + 'airlineLegDestinationCode' => null, + 'airlineLegFareBaseCode' => null, + 'airlineLegFlightNumber' => null, + 'airlineLegStopOverCode' => null, + 'airlinePassengerDateOfBirth' => null, + 'airlinePassengerFirstName' => null, + 'airlinePassengerLastName' => null, + 'airlinePassengerTelephoneNumber' => null, + 'airlinePassengerTravellerType' => null, + 'airlinePassengerName' => null, + 'airlineTicketIssueAddress' => null, + 'airlineTicketNumber' => null, + 'airlineTravelAgencyCode' => null, + 'airlineTravelAgencyName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'airlineAgencyInvoiceNumber' => false, + 'airlineAgencyPlanName' => false, + 'airlineAirlineCode' => false, + 'airlineAirlineDesignatorCode' => false, + 'airlineBoardingFee' => false, + 'airlineComputerizedReservationSystem' => false, + 'airlineCustomerReferenceNumber' => false, + 'airlineDocumentType' => false, + 'airlineFlightDate' => false, + 'airlineLegCarrierCode' => false, + 'airlineLegClassOfTravel' => false, + 'airlineLegDateOfTravel' => false, + 'airlineLegDepartAirport' => false, + 'airlineLegDepartTax' => false, + 'airlineLegDestinationCode' => false, + 'airlineLegFareBaseCode' => false, + 'airlineLegFlightNumber' => false, + 'airlineLegStopOverCode' => false, + 'airlinePassengerDateOfBirth' => false, + 'airlinePassengerFirstName' => false, + 'airlinePassengerLastName' => false, + 'airlinePassengerTelephoneNumber' => false, + 'airlinePassengerTravellerType' => false, + 'airlinePassengerName' => false, + 'airlineTicketIssueAddress' => false, + 'airlineTicketNumber' => false, + 'airlineTravelAgencyCode' => false, + 'airlineTravelAgencyName' => 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 = [ + 'airlineAgencyInvoiceNumber' => 'airline.agency_invoice_number', + 'airlineAgencyPlanName' => 'airline.agency_plan_name', + 'airlineAirlineCode' => 'airline.airline_code', + 'airlineAirlineDesignatorCode' => 'airline.airline_designator_code', + 'airlineBoardingFee' => 'airline.boarding_fee', + 'airlineComputerizedReservationSystem' => 'airline.computerized_reservation_system', + 'airlineCustomerReferenceNumber' => 'airline.customer_reference_number', + 'airlineDocumentType' => 'airline.document_type', + 'airlineFlightDate' => 'airline.flight_date', + 'airlineLegCarrierCode' => 'airline.leg.carrier_code', + 'airlineLegClassOfTravel' => 'airline.leg.class_of_travel', + 'airlineLegDateOfTravel' => 'airline.leg.date_of_travel', + 'airlineLegDepartAirport' => 'airline.leg.depart_airport', + 'airlineLegDepartTax' => 'airline.leg.depart_tax', + 'airlineLegDestinationCode' => 'airline.leg.destination_code', + 'airlineLegFareBaseCode' => 'airline.leg.fare_base_code', + 'airlineLegFlightNumber' => 'airline.leg.flight_number', + 'airlineLegStopOverCode' => 'airline.leg.stop_over_code', + 'airlinePassengerDateOfBirth' => 'airline.passenger.date_of_birth', + 'airlinePassengerFirstName' => 'airline.passenger.first_name', + 'airlinePassengerLastName' => 'airline.passenger.last_name', + 'airlinePassengerTelephoneNumber' => 'airline.passenger.telephone_number', + 'airlinePassengerTravellerType' => 'airline.passenger.traveller_type', + 'airlinePassengerName' => 'airline.passenger_name', + 'airlineTicketIssueAddress' => 'airline.ticket_issue_address', + 'airlineTicketNumber' => 'airline.ticket_number', + 'airlineTravelAgencyCode' => 'airline.travel_agency_code', + 'airlineTravelAgencyName' => 'airline.travel_agency_name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'airlineAgencyInvoiceNumber' => 'setAirlineAgencyInvoiceNumber', + 'airlineAgencyPlanName' => 'setAirlineAgencyPlanName', + 'airlineAirlineCode' => 'setAirlineAirlineCode', + 'airlineAirlineDesignatorCode' => 'setAirlineAirlineDesignatorCode', + 'airlineBoardingFee' => 'setAirlineBoardingFee', + 'airlineComputerizedReservationSystem' => 'setAirlineComputerizedReservationSystem', + 'airlineCustomerReferenceNumber' => 'setAirlineCustomerReferenceNumber', + 'airlineDocumentType' => 'setAirlineDocumentType', + 'airlineFlightDate' => 'setAirlineFlightDate', + 'airlineLegCarrierCode' => 'setAirlineLegCarrierCode', + 'airlineLegClassOfTravel' => 'setAirlineLegClassOfTravel', + 'airlineLegDateOfTravel' => 'setAirlineLegDateOfTravel', + 'airlineLegDepartAirport' => 'setAirlineLegDepartAirport', + 'airlineLegDepartTax' => 'setAirlineLegDepartTax', + 'airlineLegDestinationCode' => 'setAirlineLegDestinationCode', + 'airlineLegFareBaseCode' => 'setAirlineLegFareBaseCode', + 'airlineLegFlightNumber' => 'setAirlineLegFlightNumber', + 'airlineLegStopOverCode' => 'setAirlineLegStopOverCode', + 'airlinePassengerDateOfBirth' => 'setAirlinePassengerDateOfBirth', + 'airlinePassengerFirstName' => 'setAirlinePassengerFirstName', + 'airlinePassengerLastName' => 'setAirlinePassengerLastName', + 'airlinePassengerTelephoneNumber' => 'setAirlinePassengerTelephoneNumber', + 'airlinePassengerTravellerType' => 'setAirlinePassengerTravellerType', + 'airlinePassengerName' => 'setAirlinePassengerName', + 'airlineTicketIssueAddress' => 'setAirlineTicketIssueAddress', + 'airlineTicketNumber' => 'setAirlineTicketNumber', + 'airlineTravelAgencyCode' => 'setAirlineTravelAgencyCode', + 'airlineTravelAgencyName' => 'setAirlineTravelAgencyName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'airlineAgencyInvoiceNumber' => 'getAirlineAgencyInvoiceNumber', + 'airlineAgencyPlanName' => 'getAirlineAgencyPlanName', + 'airlineAirlineCode' => 'getAirlineAirlineCode', + 'airlineAirlineDesignatorCode' => 'getAirlineAirlineDesignatorCode', + 'airlineBoardingFee' => 'getAirlineBoardingFee', + 'airlineComputerizedReservationSystem' => 'getAirlineComputerizedReservationSystem', + 'airlineCustomerReferenceNumber' => 'getAirlineCustomerReferenceNumber', + 'airlineDocumentType' => 'getAirlineDocumentType', + 'airlineFlightDate' => 'getAirlineFlightDate', + 'airlineLegCarrierCode' => 'getAirlineLegCarrierCode', + 'airlineLegClassOfTravel' => 'getAirlineLegClassOfTravel', + 'airlineLegDateOfTravel' => 'getAirlineLegDateOfTravel', + 'airlineLegDepartAirport' => 'getAirlineLegDepartAirport', + 'airlineLegDepartTax' => 'getAirlineLegDepartTax', + 'airlineLegDestinationCode' => 'getAirlineLegDestinationCode', + 'airlineLegFareBaseCode' => 'getAirlineLegFareBaseCode', + 'airlineLegFlightNumber' => 'getAirlineLegFlightNumber', + 'airlineLegStopOverCode' => 'getAirlineLegStopOverCode', + 'airlinePassengerDateOfBirth' => 'getAirlinePassengerDateOfBirth', + 'airlinePassengerFirstName' => 'getAirlinePassengerFirstName', + 'airlinePassengerLastName' => 'getAirlinePassengerLastName', + 'airlinePassengerTelephoneNumber' => 'getAirlinePassengerTelephoneNumber', + 'airlinePassengerTravellerType' => 'getAirlinePassengerTravellerType', + 'airlinePassengerName' => 'getAirlinePassengerName', + 'airlineTicketIssueAddress' => 'getAirlineTicketIssueAddress', + 'airlineTicketNumber' => 'getAirlineTicketNumber', + 'airlineTravelAgencyCode' => 'getAirlineTravelAgencyCode', + 'airlineTravelAgencyName' => 'getAirlineTravelAgencyName' + ]; + + /** + * 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('airlineAgencyInvoiceNumber', $data ?? [], null); + $this->setIfExists('airlineAgencyPlanName', $data ?? [], null); + $this->setIfExists('airlineAirlineCode', $data ?? [], null); + $this->setIfExists('airlineAirlineDesignatorCode', $data ?? [], null); + $this->setIfExists('airlineBoardingFee', $data ?? [], null); + $this->setIfExists('airlineComputerizedReservationSystem', $data ?? [], null); + $this->setIfExists('airlineCustomerReferenceNumber', $data ?? [], null); + $this->setIfExists('airlineDocumentType', $data ?? [], null); + $this->setIfExists('airlineFlightDate', $data ?? [], null); + $this->setIfExists('airlineLegCarrierCode', $data ?? [], null); + $this->setIfExists('airlineLegClassOfTravel', $data ?? [], null); + $this->setIfExists('airlineLegDateOfTravel', $data ?? [], null); + $this->setIfExists('airlineLegDepartAirport', $data ?? [], null); + $this->setIfExists('airlineLegDepartTax', $data ?? [], null); + $this->setIfExists('airlineLegDestinationCode', $data ?? [], null); + $this->setIfExists('airlineLegFareBaseCode', $data ?? [], null); + $this->setIfExists('airlineLegFlightNumber', $data ?? [], null); + $this->setIfExists('airlineLegStopOverCode', $data ?? [], null); + $this->setIfExists('airlinePassengerDateOfBirth', $data ?? [], null); + $this->setIfExists('airlinePassengerFirstName', $data ?? [], null); + $this->setIfExists('airlinePassengerLastName', $data ?? [], null); + $this->setIfExists('airlinePassengerTelephoneNumber', $data ?? [], null); + $this->setIfExists('airlinePassengerTravellerType', $data ?? [], null); + $this->setIfExists('airlinePassengerName', $data ?? [], null); + $this->setIfExists('airlineTicketIssueAddress', $data ?? [], null); + $this->setIfExists('airlineTicketNumber', $data ?? [], null); + $this->setIfExists('airlineTravelAgencyCode', $data ?? [], null); + $this->setIfExists('airlineTravelAgencyName', $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['airlinePassengerName'] === null) { + $invalidProperties[] = "'airlinePassengerName' 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 airlineAgencyInvoiceNumber + * + * @return string|null + */ + public function getAirlineAgencyInvoiceNumber() + { + return $this->container['airlineAgencyInvoiceNumber']; + } + + /** + * Sets airlineAgencyInvoiceNumber + * + * @param string|null $airlineAgencyInvoiceNumber The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters + * + * @return self + */ + public function setAirlineAgencyInvoiceNumber($airlineAgencyInvoiceNumber) + { + if (is_null($airlineAgencyInvoiceNumber)) { + throw new \InvalidArgumentException('non-nullable airlineAgencyInvoiceNumber cannot be null'); + } + $this->container['airlineAgencyInvoiceNumber'] = $airlineAgencyInvoiceNumber; + + return $this; + } + + /** + * Gets airlineAgencyPlanName + * + * @return string|null + */ + public function getAirlineAgencyPlanName() + { + return $this->container['airlineAgencyPlanName']; + } + + /** + * Sets airlineAgencyPlanName + * + * @param string|null $airlineAgencyPlanName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters + * + * @return self + */ + public function setAirlineAgencyPlanName($airlineAgencyPlanName) + { + if (is_null($airlineAgencyPlanName)) { + throw new \InvalidArgumentException('non-nullable airlineAgencyPlanName cannot be null'); + } + $this->container['airlineAgencyPlanName'] = $airlineAgencyPlanName; + + return $this; + } + + /** + * Gets airlineAirlineCode + * + * @return string|null + */ + public function getAirlineAirlineCode() + { + return $this->container['airlineAirlineCode']; + } + + /** + * Sets airlineAirlineCode + * + * @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 + */ + public function setAirlineAirlineCode($airlineAirlineCode) + { + if (is_null($airlineAirlineCode)) { + throw new \InvalidArgumentException('non-nullable airlineAirlineCode cannot be null'); + } + $this->container['airlineAirlineCode'] = $airlineAirlineCode; + + return $this; + } + + /** + * Gets airlineAirlineDesignatorCode + * + * @return string|null + */ + public function getAirlineAirlineDesignatorCode() + { + return $this->container['airlineAirlineDesignatorCode']; + } + + /** + * Sets airlineAirlineDesignatorCode + * + * @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 + */ + public function setAirlineAirlineDesignatorCode($airlineAirlineDesignatorCode) + { + if (is_null($airlineAirlineDesignatorCode)) { + throw new \InvalidArgumentException('non-nullable airlineAirlineDesignatorCode cannot be null'); + } + $this->container['airlineAirlineDesignatorCode'] = $airlineAirlineDesignatorCode; + + return $this; + } + + /** + * Gets airlineBoardingFee + * + * @return string|null + */ + public function getAirlineBoardingFee() + { + return $this->container['airlineBoardingFee']; + } + + /** + * Sets airlineBoardingFee + * + * @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 + */ + public function setAirlineBoardingFee($airlineBoardingFee) + { + if (is_null($airlineBoardingFee)) { + throw new \InvalidArgumentException('non-nullable airlineBoardingFee cannot be null'); + } + $this->container['airlineBoardingFee'] = $airlineBoardingFee; + + return $this; + } + + /** + * Gets airlineComputerizedReservationSystem + * + * @return string|null + */ + public function getAirlineComputerizedReservationSystem() + { + return $this->container['airlineComputerizedReservationSystem']; + } + + /** + * 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. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters + * + * @return self + */ + public function setAirlineComputerizedReservationSystem($airlineComputerizedReservationSystem) + { + if (is_null($airlineComputerizedReservationSystem)) { + throw new \InvalidArgumentException('non-nullable airlineComputerizedReservationSystem cannot be null'); + } + $this->container['airlineComputerizedReservationSystem'] = $airlineComputerizedReservationSystem; + + return $this; + } + + /** + * Gets airlineCustomerReferenceNumber + * + * @return string|null + */ + public function getAirlineCustomerReferenceNumber() + { + return $this->container['airlineCustomerReferenceNumber']; + } + + /** + * Sets airlineCustomerReferenceNumber + * + * @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 + */ + public function setAirlineCustomerReferenceNumber($airlineCustomerReferenceNumber) + { + if (is_null($airlineCustomerReferenceNumber)) { + throw new \InvalidArgumentException('non-nullable airlineCustomerReferenceNumber cannot be null'); + } + $this->container['airlineCustomerReferenceNumber'] = $airlineCustomerReferenceNumber; + + return $this; + } + + /** + * Gets airlineDocumentType + * + * @return string|null + */ + public function getAirlineDocumentType() + { + return $this->container['airlineDocumentType']; + } + + /** + * Sets airlineDocumentType + * + * @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 + */ + public function setAirlineDocumentType($airlineDocumentType) + { + if (is_null($airlineDocumentType)) { + throw new \InvalidArgumentException('non-nullable airlineDocumentType cannot be null'); + } + $this->container['airlineDocumentType'] = $airlineDocumentType; + + return $this; + } + + /** + * Gets airlineFlightDate + * + * @return string|null + */ + public function getAirlineFlightDate() + { + return $this->container['airlineFlightDate']; + } + + /** + * Sets airlineFlightDate + * + * @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 + */ + public function setAirlineFlightDate($airlineFlightDate) + { + if (is_null($airlineFlightDate)) { + throw new \InvalidArgumentException('non-nullable airlineFlightDate cannot be null'); + } + $this->container['airlineFlightDate'] = $airlineFlightDate; + + return $this; + } + + /** + * Gets airlineLegCarrierCode + * + * @return string|null + */ + public function getAirlineLegCarrierCode() + { + return $this->container['airlineLegCarrierCode']; + } + + /** + * Sets airlineLegCarrierCode + * + * @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 + */ + public function setAirlineLegCarrierCode($airlineLegCarrierCode) + { + if (is_null($airlineLegCarrierCode)) { + throw new \InvalidArgumentException('non-nullable airlineLegCarrierCode cannot be null'); + } + $this->container['airlineLegCarrierCode'] = $airlineLegCarrierCode; + + return $this; + } + + /** + * Gets airlineLegClassOfTravel + * + * @return string|null + */ + public function getAirlineLegClassOfTravel() + { + return $this->container['airlineLegClassOfTravel']; + } + + /** + * Sets airlineLegClassOfTravel + * + * @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 + */ + public function setAirlineLegClassOfTravel($airlineLegClassOfTravel) + { + if (is_null($airlineLegClassOfTravel)) { + throw new \InvalidArgumentException('non-nullable airlineLegClassOfTravel cannot be null'); + } + $this->container['airlineLegClassOfTravel'] = $airlineLegClassOfTravel; + + return $this; + } + + /** + * Gets airlineLegDateOfTravel + * + * @return string|null + */ + public function getAirlineLegDateOfTravel() + { + return $this->container['airlineLegDateOfTravel']; + } + + /** + * Sets airlineLegDateOfTravel + * + * @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 + */ + public function setAirlineLegDateOfTravel($airlineLegDateOfTravel) + { + if (is_null($airlineLegDateOfTravel)) { + throw new \InvalidArgumentException('non-nullable airlineLegDateOfTravel cannot be null'); + } + $this->container['airlineLegDateOfTravel'] = $airlineLegDateOfTravel; + + return $this; + } + + /** + * Gets airlineLegDepartAirport + * + * @return string|null + */ + public function getAirlineLegDepartAirport() + { + return $this->container['airlineLegDepartAirport']; + } + + /** + * Sets airlineLegDepartAirport + * + * @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 + */ + public function setAirlineLegDepartAirport($airlineLegDepartAirport) + { + if (is_null($airlineLegDepartAirport)) { + throw new \InvalidArgumentException('non-nullable airlineLegDepartAirport cannot be null'); + } + $this->container['airlineLegDepartAirport'] = $airlineLegDepartAirport; + + return $this; + } + + /** + * Gets airlineLegDepartTax + * + * @return string|null + */ + public function getAirlineLegDepartTax() + { + return $this->container['airlineLegDepartTax']; + } + + /** + * Sets airlineLegDepartTax + * + * @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 + */ + public function setAirlineLegDepartTax($airlineLegDepartTax) + { + if (is_null($airlineLegDepartTax)) { + throw new \InvalidArgumentException('non-nullable airlineLegDepartTax cannot be null'); + } + $this->container['airlineLegDepartTax'] = $airlineLegDepartTax; + + return $this; + } + + /** + * Gets airlineLegDestinationCode + * + * @return string|null + */ + public function getAirlineLegDestinationCode() + { + return $this->container['airlineLegDestinationCode']; + } + + /** + * Sets airlineLegDestinationCode + * + * @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 + */ + public function setAirlineLegDestinationCode($airlineLegDestinationCode) + { + if (is_null($airlineLegDestinationCode)) { + throw new \InvalidArgumentException('non-nullable airlineLegDestinationCode cannot be null'); + } + $this->container['airlineLegDestinationCode'] = $airlineLegDestinationCode; + + return $this; + } + + /** + * Gets airlineLegFareBaseCode + * + * @return string|null + */ + public function getAirlineLegFareBaseCode() + { + return $this->container['airlineLegFareBaseCode']; + } + + /** + * Sets airlineLegFareBaseCode + * + * @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 + */ + public function setAirlineLegFareBaseCode($airlineLegFareBaseCode) + { + if (is_null($airlineLegFareBaseCode)) { + throw new \InvalidArgumentException('non-nullable airlineLegFareBaseCode cannot be null'); + } + $this->container['airlineLegFareBaseCode'] = $airlineLegFareBaseCode; + + return $this; + } + + /** + * Gets airlineLegFlightNumber + * + * @return string|null + */ + public function getAirlineLegFlightNumber() + { + return $this->container['airlineLegFlightNumber']; + } + + /** + * Sets airlineLegFlightNumber + * + * @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 + */ + public function setAirlineLegFlightNumber($airlineLegFlightNumber) + { + if (is_null($airlineLegFlightNumber)) { + throw new \InvalidArgumentException('non-nullable airlineLegFlightNumber cannot be null'); + } + $this->container['airlineLegFlightNumber'] = $airlineLegFlightNumber; + + return $this; + } + + /** + * Gets airlineLegStopOverCode + * + * @return string|null + */ + public function getAirlineLegStopOverCode() + { + return $this->container['airlineLegStopOverCode']; + } + + /** + * Sets airlineLegStopOverCode + * + * @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 + */ + public function setAirlineLegStopOverCode($airlineLegStopOverCode) + { + if (is_null($airlineLegStopOverCode)) { + throw new \InvalidArgumentException('non-nullable airlineLegStopOverCode cannot be null'); + } + $this->container['airlineLegStopOverCode'] = $airlineLegStopOverCode; + + return $this; + } + + /** + * Gets airlinePassengerDateOfBirth + * + * @return string|null + */ + public function getAirlinePassengerDateOfBirth() + { + return $this->container['airlinePassengerDateOfBirth']; + } + + /** + * Sets airlinePassengerDateOfBirth + * + * @param string|null $airlinePassengerDateOfBirth The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + * + * @return self + */ + public function setAirlinePassengerDateOfBirth($airlinePassengerDateOfBirth) + { + if (is_null($airlinePassengerDateOfBirth)) { + throw new \InvalidArgumentException('non-nullable airlinePassengerDateOfBirth cannot be null'); + } + $this->container['airlinePassengerDateOfBirth'] = $airlinePassengerDateOfBirth; + + return $this; + } + + /** + * Gets airlinePassengerFirstName + * + * @return string|null + */ + public function getAirlinePassengerFirstName() + { + return $this->container['airlinePassengerFirstName']; + } + + /** + * Sets airlinePassengerFirstName + * + * @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 + */ + public function setAirlinePassengerFirstName($airlinePassengerFirstName) + { + if (is_null($airlinePassengerFirstName)) { + throw new \InvalidArgumentException('non-nullable airlinePassengerFirstName cannot be null'); + } + $this->container['airlinePassengerFirstName'] = $airlinePassengerFirstName; + + return $this; + } + + /** + * Gets airlinePassengerLastName + * + * @return string|null + */ + public function getAirlinePassengerLastName() + { + return $this->container['airlinePassengerLastName']; + } + + /** + * Sets airlinePassengerLastName + * + * @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 + */ + public function setAirlinePassengerLastName($airlinePassengerLastName) + { + if (is_null($airlinePassengerLastName)) { + throw new \InvalidArgumentException('non-nullable airlinePassengerLastName cannot be null'); + } + $this->container['airlinePassengerLastName'] = $airlinePassengerLastName; + + return $this; + } + + /** + * Gets airlinePassengerTelephoneNumber + * + * @return string|null + */ + public function getAirlinePassengerTelephoneNumber() + { + return $this->container['airlinePassengerTelephoneNumber']; + } + + /** + * Sets airlinePassengerTelephoneNumber + * + * @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 + */ + public function setAirlinePassengerTelephoneNumber($airlinePassengerTelephoneNumber) + { + if (is_null($airlinePassengerTelephoneNumber)) { + throw new \InvalidArgumentException('non-nullable airlinePassengerTelephoneNumber cannot be null'); + } + $this->container['airlinePassengerTelephoneNumber'] = $airlinePassengerTelephoneNumber; + + return $this; + } + + /** + * Gets airlinePassengerTravellerType + * + * @return string|null + */ + public function getAirlinePassengerTravellerType() + { + return $this->container['airlinePassengerTravellerType']; + } + + /** + * Sets airlinePassengerTravellerType + * + * @param string|null $airlinePassengerTravellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters + * + * @return self + */ + public function setAirlinePassengerTravellerType($airlinePassengerTravellerType) + { + if (is_null($airlinePassengerTravellerType)) { + throw new \InvalidArgumentException('non-nullable airlinePassengerTravellerType cannot be null'); + } + $this->container['airlinePassengerTravellerType'] = $airlinePassengerTravellerType; + + return $this; + } + + /** + * Gets airlinePassengerName + * + * @return string + */ + public function getAirlinePassengerName() + { + return $this->container['airlinePassengerName']; + } + + /** + * Sets airlinePassengerName + * + * @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 + */ + public function setAirlinePassengerName($airlinePassengerName) + { + if (is_null($airlinePassengerName)) { + throw new \InvalidArgumentException('non-nullable airlinePassengerName cannot be null'); + } + $this->container['airlinePassengerName'] = $airlinePassengerName; + + return $this; + } + + /** + * Gets airlineTicketIssueAddress + * + * @return string|null + */ + public function getAirlineTicketIssueAddress() + { + return $this->container['airlineTicketIssueAddress']; + } + + /** + * Sets airlineTicketIssueAddress + * + * @param string|null $airlineTicketIssueAddress The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters + * + * @return self + */ + public function setAirlineTicketIssueAddress($airlineTicketIssueAddress) + { + if (is_null($airlineTicketIssueAddress)) { + throw new \InvalidArgumentException('non-nullable airlineTicketIssueAddress cannot be null'); + } + $this->container['airlineTicketIssueAddress'] = $airlineTicketIssueAddress; + + return $this; + } + + /** + * Gets airlineTicketNumber + * + * @return string|null + */ + public function getAirlineTicketNumber() + { + return $this->container['airlineTicketNumber']; + } + + /** + * Sets airlineTicketNumber + * + * @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 + */ + public function setAirlineTicketNumber($airlineTicketNumber) + { + if (is_null($airlineTicketNumber)) { + throw new \InvalidArgumentException('non-nullable airlineTicketNumber cannot be null'); + } + $this->container['airlineTicketNumber'] = $airlineTicketNumber; + + return $this; + } + + /** + * Gets airlineTravelAgencyCode + * + * @return string|null + */ + public function getAirlineTravelAgencyCode() + { + return $this->container['airlineTravelAgencyCode']; + } + + /** + * Sets airlineTravelAgencyCode + * + * @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 + */ + public function setAirlineTravelAgencyCode($airlineTravelAgencyCode) + { + if (is_null($airlineTravelAgencyCode)) { + throw new \InvalidArgumentException('non-nullable airlineTravelAgencyCode cannot be null'); + } + $this->container['airlineTravelAgencyCode'] = $airlineTravelAgencyCode; + + return $this; + } + + /** + * Gets airlineTravelAgencyName + * + * @return string|null + */ + public function getAirlineTravelAgencyName() + { + return $this->container['airlineTravelAgencyName']; + } + + /** + * Sets airlineTravelAgencyName + * + * @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 + */ + public function setAirlineTravelAgencyName($airlineTravelAgencyName) + { + if (is_null($airlineTravelAgencyName)) { + throw new \InvalidArgumentException('non-nullable airlineTravelAgencyName cannot be null'); + } + $this->container['airlineTravelAgencyName'] = $airlineTravelAgencyName; + + 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/Payment/AdditionalDataCarRental.php b/src/Adyen/Model/Payment/AdditionalDataCarRental.php new file mode 100644 index 000000000..39ed1c8c9 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataCarRental.php @@ -0,0 +1,1132 @@ + + */ +class AdditionalDataCarRental implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataCarRental'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'carRentalCheckOutDate' => 'string', + 'carRentalCustomerServiceTollFreeNumber' => 'string', + 'carRentalDaysRented' => 'string', + 'carRentalFuelCharges' => 'string', + 'carRentalInsuranceCharges' => 'string', + 'carRentalLocationCity' => 'string', + 'carRentalLocationCountry' => 'string', + 'carRentalLocationStateProvince' => 'string', + 'carRentalNoShowIndicator' => 'string', + 'carRentalOneWayDropOffCharges' => 'string', + 'carRentalRate' => 'string', + 'carRentalRateIndicator' => 'string', + 'carRentalRentalAgreementNumber' => 'string', + 'carRentalRentalClassId' => 'string', + 'carRentalRenterName' => 'string', + 'carRentalReturnCity' => 'string', + 'carRentalReturnCountry' => 'string', + 'carRentalReturnDate' => 'string', + 'carRentalReturnLocationId' => 'string', + 'carRentalReturnStateProvince' => 'string', + 'carRentalTaxExemptIndicator' => 'string', + 'travelEntertainmentAuthDataDuration' => 'string', + 'travelEntertainmentAuthDataMarket' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'carRentalCheckOutDate' => null, + 'carRentalCustomerServiceTollFreeNumber' => null, + 'carRentalDaysRented' => null, + 'carRentalFuelCharges' => null, + 'carRentalInsuranceCharges' => null, + 'carRentalLocationCity' => null, + 'carRentalLocationCountry' => null, + 'carRentalLocationStateProvince' => null, + 'carRentalNoShowIndicator' => null, + 'carRentalOneWayDropOffCharges' => null, + 'carRentalRate' => null, + 'carRentalRateIndicator' => null, + 'carRentalRentalAgreementNumber' => null, + 'carRentalRentalClassId' => null, + 'carRentalRenterName' => null, + 'carRentalReturnCity' => null, + 'carRentalReturnCountry' => null, + 'carRentalReturnDate' => null, + 'carRentalReturnLocationId' => null, + 'carRentalReturnStateProvince' => null, + 'carRentalTaxExemptIndicator' => null, + 'travelEntertainmentAuthDataDuration' => null, + 'travelEntertainmentAuthDataMarket' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'carRentalCheckOutDate' => false, + 'carRentalCustomerServiceTollFreeNumber' => false, + 'carRentalDaysRented' => false, + 'carRentalFuelCharges' => false, + 'carRentalInsuranceCharges' => false, + 'carRentalLocationCity' => false, + 'carRentalLocationCountry' => false, + 'carRentalLocationStateProvince' => false, + 'carRentalNoShowIndicator' => false, + 'carRentalOneWayDropOffCharges' => false, + 'carRentalRate' => false, + 'carRentalRateIndicator' => false, + 'carRentalRentalAgreementNumber' => false, + 'carRentalRentalClassId' => false, + 'carRentalRenterName' => false, + 'carRentalReturnCity' => false, + 'carRentalReturnCountry' => false, + 'carRentalReturnDate' => false, + 'carRentalReturnLocationId' => false, + 'carRentalReturnStateProvince' => false, + 'carRentalTaxExemptIndicator' => false, + 'travelEntertainmentAuthDataDuration' => false, + 'travelEntertainmentAuthDataMarket' => 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 = [ + 'carRentalCheckOutDate' => 'carRental.checkOutDate', + 'carRentalCustomerServiceTollFreeNumber' => 'carRental.customerServiceTollFreeNumber', + 'carRentalDaysRented' => 'carRental.daysRented', + 'carRentalFuelCharges' => 'carRental.fuelCharges', + 'carRentalInsuranceCharges' => 'carRental.insuranceCharges', + 'carRentalLocationCity' => 'carRental.locationCity', + 'carRentalLocationCountry' => 'carRental.locationCountry', + 'carRentalLocationStateProvince' => 'carRental.locationStateProvince', + 'carRentalNoShowIndicator' => 'carRental.noShowIndicator', + 'carRentalOneWayDropOffCharges' => 'carRental.oneWayDropOffCharges', + 'carRentalRate' => 'carRental.rate', + 'carRentalRateIndicator' => 'carRental.rateIndicator', + 'carRentalRentalAgreementNumber' => 'carRental.rentalAgreementNumber', + 'carRentalRentalClassId' => 'carRental.rentalClassId', + 'carRentalRenterName' => 'carRental.renterName', + 'carRentalReturnCity' => 'carRental.returnCity', + 'carRentalReturnCountry' => 'carRental.returnCountry', + 'carRentalReturnDate' => 'carRental.returnDate', + 'carRentalReturnLocationId' => 'carRental.returnLocationId', + 'carRentalReturnStateProvince' => 'carRental.returnStateProvince', + 'carRentalTaxExemptIndicator' => 'carRental.taxExemptIndicator', + 'travelEntertainmentAuthDataDuration' => 'travelEntertainmentAuthData.duration', + 'travelEntertainmentAuthDataMarket' => 'travelEntertainmentAuthData.market' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'carRentalCheckOutDate' => 'setCarRentalCheckOutDate', + 'carRentalCustomerServiceTollFreeNumber' => 'setCarRentalCustomerServiceTollFreeNumber', + 'carRentalDaysRented' => 'setCarRentalDaysRented', + 'carRentalFuelCharges' => 'setCarRentalFuelCharges', + 'carRentalInsuranceCharges' => 'setCarRentalInsuranceCharges', + 'carRentalLocationCity' => 'setCarRentalLocationCity', + 'carRentalLocationCountry' => 'setCarRentalLocationCountry', + 'carRentalLocationStateProvince' => 'setCarRentalLocationStateProvince', + 'carRentalNoShowIndicator' => 'setCarRentalNoShowIndicator', + 'carRentalOneWayDropOffCharges' => 'setCarRentalOneWayDropOffCharges', + 'carRentalRate' => 'setCarRentalRate', + 'carRentalRateIndicator' => 'setCarRentalRateIndicator', + 'carRentalRentalAgreementNumber' => 'setCarRentalRentalAgreementNumber', + 'carRentalRentalClassId' => 'setCarRentalRentalClassId', + 'carRentalRenterName' => 'setCarRentalRenterName', + 'carRentalReturnCity' => 'setCarRentalReturnCity', + 'carRentalReturnCountry' => 'setCarRentalReturnCountry', + 'carRentalReturnDate' => 'setCarRentalReturnDate', + 'carRentalReturnLocationId' => 'setCarRentalReturnLocationId', + 'carRentalReturnStateProvince' => 'setCarRentalReturnStateProvince', + 'carRentalTaxExemptIndicator' => 'setCarRentalTaxExemptIndicator', + 'travelEntertainmentAuthDataDuration' => 'setTravelEntertainmentAuthDataDuration', + 'travelEntertainmentAuthDataMarket' => 'setTravelEntertainmentAuthDataMarket' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'carRentalCheckOutDate' => 'getCarRentalCheckOutDate', + 'carRentalCustomerServiceTollFreeNumber' => 'getCarRentalCustomerServiceTollFreeNumber', + 'carRentalDaysRented' => 'getCarRentalDaysRented', + 'carRentalFuelCharges' => 'getCarRentalFuelCharges', + 'carRentalInsuranceCharges' => 'getCarRentalInsuranceCharges', + 'carRentalLocationCity' => 'getCarRentalLocationCity', + 'carRentalLocationCountry' => 'getCarRentalLocationCountry', + 'carRentalLocationStateProvince' => 'getCarRentalLocationStateProvince', + 'carRentalNoShowIndicator' => 'getCarRentalNoShowIndicator', + 'carRentalOneWayDropOffCharges' => 'getCarRentalOneWayDropOffCharges', + 'carRentalRate' => 'getCarRentalRate', + 'carRentalRateIndicator' => 'getCarRentalRateIndicator', + 'carRentalRentalAgreementNumber' => 'getCarRentalRentalAgreementNumber', + 'carRentalRentalClassId' => 'getCarRentalRentalClassId', + 'carRentalRenterName' => 'getCarRentalRenterName', + 'carRentalReturnCity' => 'getCarRentalReturnCity', + 'carRentalReturnCountry' => 'getCarRentalReturnCountry', + 'carRentalReturnDate' => 'getCarRentalReturnDate', + 'carRentalReturnLocationId' => 'getCarRentalReturnLocationId', + 'carRentalReturnStateProvince' => 'getCarRentalReturnStateProvince', + 'carRentalTaxExemptIndicator' => 'getCarRentalTaxExemptIndicator', + 'travelEntertainmentAuthDataDuration' => 'getTravelEntertainmentAuthDataDuration', + 'travelEntertainmentAuthDataMarket' => 'getTravelEntertainmentAuthDataMarket' + ]; + + /** + * 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('carRentalCheckOutDate', $data ?? [], null); + $this->setIfExists('carRentalCustomerServiceTollFreeNumber', $data ?? [], null); + $this->setIfExists('carRentalDaysRented', $data ?? [], null); + $this->setIfExists('carRentalFuelCharges', $data ?? [], null); + $this->setIfExists('carRentalInsuranceCharges', $data ?? [], null); + $this->setIfExists('carRentalLocationCity', $data ?? [], null); + $this->setIfExists('carRentalLocationCountry', $data ?? [], null); + $this->setIfExists('carRentalLocationStateProvince', $data ?? [], null); + $this->setIfExists('carRentalNoShowIndicator', $data ?? [], null); + $this->setIfExists('carRentalOneWayDropOffCharges', $data ?? [], null); + $this->setIfExists('carRentalRate', $data ?? [], null); + $this->setIfExists('carRentalRateIndicator', $data ?? [], null); + $this->setIfExists('carRentalRentalAgreementNumber', $data ?? [], null); + $this->setIfExists('carRentalRentalClassId', $data ?? [], null); + $this->setIfExists('carRentalRenterName', $data ?? [], null); + $this->setIfExists('carRentalReturnCity', $data ?? [], null); + $this->setIfExists('carRentalReturnCountry', $data ?? [], null); + $this->setIfExists('carRentalReturnDate', $data ?? [], null); + $this->setIfExists('carRentalReturnLocationId', $data ?? [], null); + $this->setIfExists('carRentalReturnStateProvince', $data ?? [], null); + $this->setIfExists('carRentalTaxExemptIndicator', $data ?? [], null); + $this->setIfExists('travelEntertainmentAuthDataDuration', $data ?? [], null); + $this->setIfExists('travelEntertainmentAuthDataMarket', $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 carRentalCheckOutDate + * + * @return string|null + */ + public function getCarRentalCheckOutDate() + { + return $this->container['carRentalCheckOutDate']; + } + + /** + * Sets carRentalCheckOutDate + * + * @param string|null $carRentalCheckOutDate The pick-up date. * Date format: `yyyyMMdd` + * + * @return self + */ + public function setCarRentalCheckOutDate($carRentalCheckOutDate) + { + if (is_null($carRentalCheckOutDate)) { + throw new \InvalidArgumentException('non-nullable carRentalCheckOutDate cannot be null'); + } + $this->container['carRentalCheckOutDate'] = $carRentalCheckOutDate; + + return $this; + } + + /** + * Gets carRentalCustomerServiceTollFreeNumber + * + * @return string|null + */ + public function getCarRentalCustomerServiceTollFreeNumber() + { + return $this->container['carRentalCustomerServiceTollFreeNumber']; + } + + /** + * Sets carRentalCustomerServiceTollFreeNumber + * + * @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 contain any special characters such as + or - *Must not be all zeros. + * + * @return self + */ + public function setCarRentalCustomerServiceTollFreeNumber($carRentalCustomerServiceTollFreeNumber) + { + if (is_null($carRentalCustomerServiceTollFreeNumber)) { + throw new \InvalidArgumentException('non-nullable carRentalCustomerServiceTollFreeNumber cannot be null'); + } + $this->container['carRentalCustomerServiceTollFreeNumber'] = $carRentalCustomerServiceTollFreeNumber; + + return $this; + } + + /** + * Gets carRentalDaysRented + * + * @return string|null + */ + public function getCarRentalDaysRented() + { + return $this->container['carRentalDaysRented']; + } + + /** + * Sets carRentalDaysRented + * + * @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 + */ + public function setCarRentalDaysRented($carRentalDaysRented) + { + if (is_null($carRentalDaysRented)) { + throw new \InvalidArgumentException('non-nullable carRentalDaysRented cannot be null'); + } + $this->container['carRentalDaysRented'] = $carRentalDaysRented; + + return $this; + } + + /** + * Gets carRentalFuelCharges + * + * @return string|null + */ + public function getCarRentalFuelCharges() + { + return $this->container['carRentalFuelCharges']; + } + + /** + * Sets carRentalFuelCharges + * + * @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 + */ + public function setCarRentalFuelCharges($carRentalFuelCharges) + { + if (is_null($carRentalFuelCharges)) { + throw new \InvalidArgumentException('non-nullable carRentalFuelCharges cannot be null'); + } + $this->container['carRentalFuelCharges'] = $carRentalFuelCharges; + + return $this; + } + + /** + * Gets carRentalInsuranceCharges + * + * @return string|null + */ + public function getCarRentalInsuranceCharges() + { + return $this->container['carRentalInsuranceCharges']; + } + + /** + * Sets carRentalInsuranceCharges + * + * @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 + */ + public function setCarRentalInsuranceCharges($carRentalInsuranceCharges) + { + if (is_null($carRentalInsuranceCharges)) { + throw new \InvalidArgumentException('non-nullable carRentalInsuranceCharges cannot be null'); + } + $this->container['carRentalInsuranceCharges'] = $carRentalInsuranceCharges; + + return $this; + } + + /** + * Gets carRentalLocationCity + * + * @return string|null + */ + public function getCarRentalLocationCity() + { + return $this->container['carRentalLocationCity']; + } + + /** + * Sets carRentalLocationCity + * + * @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 + */ + public function setCarRentalLocationCity($carRentalLocationCity) + { + if (is_null($carRentalLocationCity)) { + throw new \InvalidArgumentException('non-nullable carRentalLocationCity cannot be null'); + } + $this->container['carRentalLocationCity'] = $carRentalLocationCity; + + return $this; + } + + /** + * Gets carRentalLocationCountry + * + * @return string|null + */ + public function getCarRentalLocationCountry() + { + return $this->container['carRentalLocationCountry']; + } + + /** + * Sets carRentalLocationCountry + * + * @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 + */ + public function setCarRentalLocationCountry($carRentalLocationCountry) + { + if (is_null($carRentalLocationCountry)) { + throw new \InvalidArgumentException('non-nullable carRentalLocationCountry cannot be null'); + } + $this->container['carRentalLocationCountry'] = $carRentalLocationCountry; + + return $this; + } + + /** + * Gets carRentalLocationStateProvince + * + * @return string|null + */ + public function getCarRentalLocationStateProvince() + { + return $this->container['carRentalLocationStateProvince']; + } + + /** + * Sets carRentalLocationStateProvince + * + * @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 + */ + public function setCarRentalLocationStateProvince($carRentalLocationStateProvince) + { + if (is_null($carRentalLocationStateProvince)) { + throw new \InvalidArgumentException('non-nullable carRentalLocationStateProvince cannot be null'); + } + $this->container['carRentalLocationStateProvince'] = $carRentalLocationStateProvince; + + return $this; + } + + /** + * Gets carRentalNoShowIndicator + * + * @return string|null + */ + public function getCarRentalNoShowIndicator() + { + return $this->container['carRentalNoShowIndicator']; + } + + /** + * Sets carRentalNoShowIndicator + * + * @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 + */ + public function setCarRentalNoShowIndicator($carRentalNoShowIndicator) + { + if (is_null($carRentalNoShowIndicator)) { + throw new \InvalidArgumentException('non-nullable carRentalNoShowIndicator cannot be null'); + } + $this->container['carRentalNoShowIndicator'] = $carRentalNoShowIndicator; + + return $this; + } + + /** + * Gets carRentalOneWayDropOffCharges + * + * @return string|null + */ + public function getCarRentalOneWayDropOffCharges() + { + return $this->container['carRentalOneWayDropOffCharges']; + } + + /** + * Sets carRentalOneWayDropOffCharges + * + * @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 + */ + public function setCarRentalOneWayDropOffCharges($carRentalOneWayDropOffCharges) + { + if (is_null($carRentalOneWayDropOffCharges)) { + throw new \InvalidArgumentException('non-nullable carRentalOneWayDropOffCharges cannot be null'); + } + $this->container['carRentalOneWayDropOffCharges'] = $carRentalOneWayDropOffCharges; + + return $this; + } + + /** + * Gets carRentalRate + * + * @return string|null + */ + public function getCarRentalRate() + { + return $this->container['carRentalRate']; + } + + /** + * Sets carRentalRate + * + * @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 + */ + public function setCarRentalRate($carRentalRate) + { + if (is_null($carRentalRate)) { + throw new \InvalidArgumentException('non-nullable carRentalRate cannot be null'); + } + $this->container['carRentalRate'] = $carRentalRate; + + return $this; + } + + /** + * Gets carRentalRateIndicator + * + * @return string|null + */ + public function getCarRentalRateIndicator() + { + return $this->container['carRentalRateIndicator']; + } + + /** + * Sets carRentalRateIndicator + * + * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate + * + * @return self + */ + public function setCarRentalRateIndicator($carRentalRateIndicator) + { + if (is_null($carRentalRateIndicator)) { + throw new \InvalidArgumentException('non-nullable carRentalRateIndicator cannot be null'); + } + $this->container['carRentalRateIndicator'] = $carRentalRateIndicator; + + return $this; + } + + /** + * Gets carRentalRentalAgreementNumber + * + * @return string|null + */ + public function getCarRentalRentalAgreementNumber() + { + return $this->container['carRentalRentalAgreementNumber']; + } + + /** + * Sets carRentalRentalAgreementNumber + * + * @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 + */ + public function setCarRentalRentalAgreementNumber($carRentalRentalAgreementNumber) + { + if (is_null($carRentalRentalAgreementNumber)) { + throw new \InvalidArgumentException('non-nullable carRentalRentalAgreementNumber cannot be null'); + } + $this->container['carRentalRentalAgreementNumber'] = $carRentalRentalAgreementNumber; + + return $this; + } + + /** + * Gets carRentalRentalClassId + * + * @return string|null + */ + public function getCarRentalRentalClassId() + { + return $this->container['carRentalRentalClassId']; + } + + /** + * Sets carRentalRentalClassId + * + * @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 + */ + public function setCarRentalRentalClassId($carRentalRentalClassId) + { + if (is_null($carRentalRentalClassId)) { + throw new \InvalidArgumentException('non-nullable carRentalRentalClassId cannot be null'); + } + $this->container['carRentalRentalClassId'] = $carRentalRentalClassId; + + return $this; + } + + /** + * Gets carRentalRenterName + * + * @return string|null + */ + public function getCarRentalRenterName() + { + return $this->container['carRentalRenterName']; + } + + /** + * Sets carRentalRenterName + * + * @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 + */ + public function setCarRentalRenterName($carRentalRenterName) + { + if (is_null($carRentalRenterName)) { + throw new \InvalidArgumentException('non-nullable carRentalRenterName cannot be null'); + } + $this->container['carRentalRenterName'] = $carRentalRenterName; + + return $this; + } + + /** + * Gets carRentalReturnCity + * + * @return string|null + */ + public function getCarRentalReturnCity() + { + return $this->container['carRentalReturnCity']; + } + + /** + * Sets carRentalReturnCity + * + * @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 + */ + public function setCarRentalReturnCity($carRentalReturnCity) + { + if (is_null($carRentalReturnCity)) { + throw new \InvalidArgumentException('non-nullable carRentalReturnCity cannot be null'); + } + $this->container['carRentalReturnCity'] = $carRentalReturnCity; + + return $this; + } + + /** + * Gets carRentalReturnCountry + * + * @return string|null + */ + public function getCarRentalReturnCountry() + { + return $this->container['carRentalReturnCountry']; + } + + /** + * Sets carRentalReturnCountry + * + * @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 + */ + public function setCarRentalReturnCountry($carRentalReturnCountry) + { + if (is_null($carRentalReturnCountry)) { + throw new \InvalidArgumentException('non-nullable carRentalReturnCountry cannot be null'); + } + $this->container['carRentalReturnCountry'] = $carRentalReturnCountry; + + return $this; + } + + /** + * Gets carRentalReturnDate + * + * @return string|null + */ + public function getCarRentalReturnDate() + { + return $this->container['carRentalReturnDate']; + } + + /** + * Sets carRentalReturnDate + * + * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 + * + * @return self + */ + public function setCarRentalReturnDate($carRentalReturnDate) + { + if (is_null($carRentalReturnDate)) { + throw new \InvalidArgumentException('non-nullable carRentalReturnDate cannot be null'); + } + $this->container['carRentalReturnDate'] = $carRentalReturnDate; + + return $this; + } + + /** + * Gets carRentalReturnLocationId + * + * @return string|null + */ + public function getCarRentalReturnLocationId() + { + return $this->container['carRentalReturnLocationId']; + } + + /** + * Sets carRentalReturnLocationId + * + * @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 + */ + public function setCarRentalReturnLocationId($carRentalReturnLocationId) + { + if (is_null($carRentalReturnLocationId)) { + throw new \InvalidArgumentException('non-nullable carRentalReturnLocationId cannot be null'); + } + $this->container['carRentalReturnLocationId'] = $carRentalReturnLocationId; + + return $this; + } + + /** + * Gets carRentalReturnStateProvince + * + * @return string|null + */ + public function getCarRentalReturnStateProvince() + { + return $this->container['carRentalReturnStateProvince']; + } + + /** + * Sets carRentalReturnStateProvince + * + * @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 + */ + public function setCarRentalReturnStateProvince($carRentalReturnStateProvince) + { + if (is_null($carRentalReturnStateProvince)) { + throw new \InvalidArgumentException('non-nullable carRentalReturnStateProvince cannot be null'); + } + $this->container['carRentalReturnStateProvince'] = $carRentalReturnStateProvince; + + return $this; + } + + /** + * Gets carRentalTaxExemptIndicator + * + * @return string|null + */ + public function getCarRentalTaxExemptIndicator() + { + return $this->container['carRentalTaxExemptIndicator']; + } + + /** + * Sets carRentalTaxExemptIndicator + * + * @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 + */ + public function setCarRentalTaxExemptIndicator($carRentalTaxExemptIndicator) + { + if (is_null($carRentalTaxExemptIndicator)) { + throw new \InvalidArgumentException('non-nullable carRentalTaxExemptIndicator cannot be null'); + } + $this->container['carRentalTaxExemptIndicator'] = $carRentalTaxExemptIndicator; + + return $this; + } + + /** + * Gets travelEntertainmentAuthDataDuration + * + * @return string|null + */ + public function getTravelEntertainmentAuthDataDuration() + { + return $this->container['travelEntertainmentAuthDataDuration']; + } + + /** + * Sets travelEntertainmentAuthDataDuration + * + * @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 + */ + public function setTravelEntertainmentAuthDataDuration($travelEntertainmentAuthDataDuration) + { + if (is_null($travelEntertainmentAuthDataDuration)) { + throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataDuration cannot be null'); + } + $this->container['travelEntertainmentAuthDataDuration'] = $travelEntertainmentAuthDataDuration; + + return $this; + } + + /** + * Gets travelEntertainmentAuthDataMarket + * + * @return string|null + */ + public function getTravelEntertainmentAuthDataMarket() + { + return $this->container['travelEntertainmentAuthDataMarket']; + } + + /** + * 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 + * + * @return self + */ + public function setTravelEntertainmentAuthDataMarket($travelEntertainmentAuthDataMarket) + { + if (is_null($travelEntertainmentAuthDataMarket)) { + throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataMarket cannot be null'); + } + $this->container['travelEntertainmentAuthDataMarket'] = $travelEntertainmentAuthDataMarket; + + 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/Payment/AdditionalDataCommon.php b/src/Adyen/Model/Payment/AdditionalDataCommon.php new file mode 100644 index 000000000..f65d9cdfa --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataCommon.php @@ -0,0 +1,927 @@ + + */ +class AdditionalDataCommon implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataCommon'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'requestedTestErrorResponseCode' => 'string', + 'allowPartialAuth' => 'string', + 'authorisationType' => 'string', + 'customRoutingFlag' => 'string', + 'industryUsage' => 'string', + 'manualCapture' => 'string', + 'networkTxReference' => 'string', + 'overwriteBrand' => 'string', + 'subMerchantCity' => 'string', + 'subMerchantCountry' => 'string', + 'subMerchantID' => 'string', + 'subMerchantName' => 'string', + 'subMerchantPostalCode' => 'string', + 'subMerchantState' => 'string', + 'subMerchantStreet' => 'string', + 'subMerchantTaxId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'requestedTestErrorResponseCode' => null, + 'allowPartialAuth' => null, + 'authorisationType' => null, + 'customRoutingFlag' => null, + 'industryUsage' => null, + 'manualCapture' => null, + 'networkTxReference' => null, + 'overwriteBrand' => null, + 'subMerchantCity' => null, + 'subMerchantCountry' => null, + 'subMerchantID' => null, + 'subMerchantName' => null, + 'subMerchantPostalCode' => null, + 'subMerchantState' => null, + 'subMerchantStreet' => null, + 'subMerchantTaxId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'requestedTestErrorResponseCode' => false, + 'allowPartialAuth' => false, + 'authorisationType' => false, + 'customRoutingFlag' => false, + 'industryUsage' => false, + 'manualCapture' => false, + 'networkTxReference' => false, + 'overwriteBrand' => false, + 'subMerchantCity' => false, + 'subMerchantCountry' => false, + 'subMerchantID' => false, + 'subMerchantName' => false, + 'subMerchantPostalCode' => false, + 'subMerchantState' => false, + 'subMerchantStreet' => false, + 'subMerchantTaxId' => 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 = [ + 'requestedTestErrorResponseCode' => 'RequestedTestErrorResponseCode', + 'allowPartialAuth' => 'allowPartialAuth', + 'authorisationType' => 'authorisationType', + 'customRoutingFlag' => 'customRoutingFlag', + 'industryUsage' => 'industryUsage', + 'manualCapture' => 'manualCapture', + 'networkTxReference' => 'networkTxReference', + 'overwriteBrand' => 'overwriteBrand', + 'subMerchantCity' => 'subMerchantCity', + 'subMerchantCountry' => 'subMerchantCountry', + 'subMerchantID' => 'subMerchantID', + 'subMerchantName' => 'subMerchantName', + 'subMerchantPostalCode' => 'subMerchantPostalCode', + 'subMerchantState' => 'subMerchantState', + 'subMerchantStreet' => 'subMerchantStreet', + 'subMerchantTaxId' => 'subMerchantTaxId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'requestedTestErrorResponseCode' => 'setRequestedTestErrorResponseCode', + 'allowPartialAuth' => 'setAllowPartialAuth', + 'authorisationType' => 'setAuthorisationType', + 'customRoutingFlag' => 'setCustomRoutingFlag', + 'industryUsage' => 'setIndustryUsage', + 'manualCapture' => 'setManualCapture', + 'networkTxReference' => 'setNetworkTxReference', + 'overwriteBrand' => 'setOverwriteBrand', + 'subMerchantCity' => 'setSubMerchantCity', + 'subMerchantCountry' => 'setSubMerchantCountry', + 'subMerchantID' => 'setSubMerchantID', + 'subMerchantName' => 'setSubMerchantName', + 'subMerchantPostalCode' => 'setSubMerchantPostalCode', + 'subMerchantState' => 'setSubMerchantState', + 'subMerchantStreet' => 'setSubMerchantStreet', + 'subMerchantTaxId' => 'setSubMerchantTaxId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'requestedTestErrorResponseCode' => 'getRequestedTestErrorResponseCode', + 'allowPartialAuth' => 'getAllowPartialAuth', + 'authorisationType' => 'getAuthorisationType', + 'customRoutingFlag' => 'getCustomRoutingFlag', + 'industryUsage' => 'getIndustryUsage', + 'manualCapture' => 'getManualCapture', + 'networkTxReference' => 'getNetworkTxReference', + 'overwriteBrand' => 'getOverwriteBrand', + 'subMerchantCity' => 'getSubMerchantCity', + 'subMerchantCountry' => 'getSubMerchantCountry', + 'subMerchantID' => 'getSubMerchantID', + 'subMerchantName' => 'getSubMerchantName', + 'subMerchantPostalCode' => 'getSubMerchantPostalCode', + 'subMerchantState' => 'getSubMerchantState', + 'subMerchantStreet' => 'getSubMerchantStreet', + 'subMerchantTaxId' => 'getSubMerchantTaxId' + ]; + + /** + * 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 INDUSTRY_USAGE_NO_SHOW = 'NoShow'; + public const INDUSTRY_USAGE_DELAYED_CHARGE = 'DelayedCharge'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIndustryUsageAllowableValues() + { + return [ + self::INDUSTRY_USAGE_NO_SHOW, + self::INDUSTRY_USAGE_DELAYED_CHARGE, + ]; + } + /** + * 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('requestedTestErrorResponseCode', $data ?? [], null); + $this->setIfExists('allowPartialAuth', $data ?? [], null); + $this->setIfExists('authorisationType', $data ?? [], null); + $this->setIfExists('customRoutingFlag', $data ?? [], null); + $this->setIfExists('industryUsage', $data ?? [], null); + $this->setIfExists('manualCapture', $data ?? [], null); + $this->setIfExists('networkTxReference', $data ?? [], null); + $this->setIfExists('overwriteBrand', $data ?? [], null); + $this->setIfExists('subMerchantCity', $data ?? [], null); + $this->setIfExists('subMerchantCountry', $data ?? [], null); + $this->setIfExists('subMerchantID', $data ?? [], null); + $this->setIfExists('subMerchantName', $data ?? [], null); + $this->setIfExists('subMerchantPostalCode', $data ?? [], null); + $this->setIfExists('subMerchantState', $data ?? [], null); + $this->setIfExists('subMerchantStreet', $data ?? [], null); + $this->setIfExists('subMerchantTaxId', $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->getIndustryUsageAllowableValues(); + if (!is_null($this->container['industryUsage']) && !in_array($this->container['industryUsage'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'industryUsage', must be one of '%s'", + $this->container['industryUsage'], + 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 requestedTestErrorResponseCode + * + * @return string|null + */ + public function getRequestedTestErrorResponseCode() + { + return $this->container['requestedTestErrorResponseCode']; + } + + /** + * Sets requestedTestErrorResponseCode + * + * @param string|null $requestedTestErrorResponseCode Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn't a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. + * + * @return self + */ + public function setRequestedTestErrorResponseCode($requestedTestErrorResponseCode) + { + if (is_null($requestedTestErrorResponseCode)) { + throw new \InvalidArgumentException('non-nullable requestedTestErrorResponseCode cannot be null'); + } + $this->container['requestedTestErrorResponseCode'] = $requestedTestErrorResponseCode; + + return $this; + } + + /** + * Gets allowPartialAuth + * + * @return string|null + */ + public function getAllowPartialAuth() + { + return $this->container['allowPartialAuth']; + } + + /** + * Sets allowPartialAuth + * + * @param string|null $allowPartialAuth Set to true to authorise a part of the requested amount in case the cardholder does not have enough funds on their account. If a payment was partially authorised, the response includes resultCode: PartiallyAuthorised and the authorised amount in additionalData.authorisedAmountValue. To enable this functionality, contact our Support Team. + * + * @return self + */ + public function setAllowPartialAuth($allowPartialAuth) + { + if (is_null($allowPartialAuth)) { + throw new \InvalidArgumentException('non-nullable allowPartialAuth cannot be null'); + } + $this->container['allowPartialAuth'] = $allowPartialAuth; + + return $this; + } + + /** + * Gets authorisationType + * + * @return string|null + */ + public function getAuthorisationType() + { + return $this->container['authorisationType']; + } + + /** + * Sets authorisationType + * + * @param string|null $authorisationType Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/online-payments/adjust-authorisation#authorisation-types). Allowed values: * **PreAuth** – flags the payment request to be handled as a pre-authorisation. * **FinalAuth** – flags the payment request to be handled as a final authorisation. + * + * @return self + */ + public function setAuthorisationType($authorisationType) + { + if (is_null($authorisationType)) { + throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); + } + $this->container['authorisationType'] = $authorisationType; + + return $this; + } + + /** + * Gets customRoutingFlag + * + * @return string|null + */ + public function getCustomRoutingFlag() + { + return $this->container['customRoutingFlag']; + } + + /** + * Sets customRoutingFlag + * + * @param string|null $customRoutingFlag Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new). + * + * @return self + */ + public function setCustomRoutingFlag($customRoutingFlag) + { + if (is_null($customRoutingFlag)) { + throw new \InvalidArgumentException('non-nullable customRoutingFlag cannot be null'); + } + $this->container['customRoutingFlag'] = $customRoutingFlag; + + return $this; + } + + /** + * Gets industryUsage + * + * @return string|null + */ + public function getIndustryUsage() + { + return $this->container['industryUsage']; + } + + /** + * Sets industryUsage + * + * @param string|null $industryUsage In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. + * + * @return self + */ + public function setIndustryUsage($industryUsage) + { + if (is_null($industryUsage)) { + throw new \InvalidArgumentException('non-nullable industryUsage cannot be null'); + } + $allowedValues = $this->getIndustryUsageAllowableValues(); + if (!in_array($industryUsage, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'industryUsage', must be one of '%s'", + $industryUsage, + implode("', '", $allowedValues) + ) + ); + } + $this->container['industryUsage'] = $industryUsage; + + return $this; + } + + /** + * Gets manualCapture + * + * @return string|null + */ + public function getManualCapture() + { + return $this->container['manualCapture']; + } + + /** + * Sets manualCapture + * + * @param string|null $manualCapture Set to **true** to require [manual capture](https://docs.adyen.com/online-payments/capture) for the transaction. + * + * @return self + */ + public function setManualCapture($manualCapture) + { + if (is_null($manualCapture)) { + throw new \InvalidArgumentException('non-nullable manualCapture cannot be null'); + } + $this->container['manualCapture'] = $manualCapture; + + return $this; + } + + /** + * Gets networkTxReference + * + * @return string|null + */ + public function getNetworkTxReference() + { + return $this->container['networkTxReference']; + } + + /** + * Sets networkTxReference + * + * @param string|null $networkTxReference Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. + * + * @return self + */ + public function setNetworkTxReference($networkTxReference) + { + if (is_null($networkTxReference)) { + throw new \InvalidArgumentException('non-nullable networkTxReference cannot be null'); + } + $this->container['networkTxReference'] = $networkTxReference; + + return $this; + } + + /** + * Gets overwriteBrand + * + * @return string|null + */ + public function getOverwriteBrand() + { + return $this->container['overwriteBrand']; + } + + /** + * Sets overwriteBrand + * + * @param string|null $overwriteBrand Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction. + * + * @return self + */ + public function setOverwriteBrand($overwriteBrand) + { + if (is_null($overwriteBrand)) { + throw new \InvalidArgumentException('non-nullable overwriteBrand cannot be null'); + } + $this->container['overwriteBrand'] = $overwriteBrand; + + return $this; + } + + /** + * Gets subMerchantCity + * + * @return string|null + */ + public function getSubMerchantCity() + { + return $this->container['subMerchantCity']; + } + + /** + * Sets subMerchantCity + * + * @param string|null $subMerchantCity This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 13 characters. + * + * @return self + */ + public function setSubMerchantCity($subMerchantCity) + { + if (is_null($subMerchantCity)) { + throw new \InvalidArgumentException('non-nullable subMerchantCity cannot be null'); + } + $this->container['subMerchantCity'] = $subMerchantCity; + + return $this; + } + + /** + * Gets subMerchantCountry + * + * @return string|null + */ + public function getSubMerchantCountry() + { + return $this->container['subMerchantCountry']; + } + + /** + * Sets subMerchantCountry + * + * @param string|null $subMerchantCountry This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant's address. * Format: alpha-numeric. * Fixed length: 3 characters. + * + * @return self + */ + public function setSubMerchantCountry($subMerchantCountry) + { + if (is_null($subMerchantCountry)) { + throw new \InvalidArgumentException('non-nullable subMerchantCountry cannot be null'); + } + $this->container['subMerchantCountry'] = $subMerchantCountry; + + return $this; + } + + /** + * Gets subMerchantID + * + * @return string|null + */ + public function getSubMerchantID() + { + return $this->container['subMerchantID']; + } + + /** + * Sets subMerchantID + * + * @param string|null $subMerchantID This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters. + * + * @return self + */ + public function setSubMerchantID($subMerchantID) + { + if (is_null($subMerchantID)) { + throw new \InvalidArgumentException('non-nullable subMerchantID cannot be null'); + } + $this->container['subMerchantID'] = $subMerchantID; + + return $this; + } + + /** + * Gets subMerchantName + * + * @return string|null + */ + public function getSubMerchantName() + { + return $this->container['subMerchantName']; + } + + /** + * Sets subMerchantName + * + * @param string|null $subMerchantName This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. * Format: alpha-numeric. * Maximum length: 22 characters. + * + * @return self + */ + public function setSubMerchantName($subMerchantName) + { + if (is_null($subMerchantName)) { + throw new \InvalidArgumentException('non-nullable subMerchantName cannot be null'); + } + $this->container['subMerchantName'] = $subMerchantName; + + return $this; + } + + /** + * Gets subMerchantPostalCode + * + * @return string|null + */ + public function getSubMerchantPostalCode() + { + return $this->container['subMerchantPostalCode']; + } + + /** + * Sets subMerchantPostalCode + * + * @param string|null $subMerchantPostalCode This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 10 characters. + * + * @return self + */ + public function setSubMerchantPostalCode($subMerchantPostalCode) + { + if (is_null($subMerchantPostalCode)) { + throw new \InvalidArgumentException('non-nullable subMerchantPostalCode cannot be null'); + } + $this->container['subMerchantPostalCode'] = $subMerchantPostalCode; + + return $this; + } + + /** + * Gets subMerchantState + * + * @return string|null + */ + public function getSubMerchantState() + { + return $this->container['subMerchantState']; + } + + /** + * Sets subMerchantState + * + * @param string|null $subMerchantState This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 3 characters. + * + * @return self + */ + public function setSubMerchantState($subMerchantState) + { + if (is_null($subMerchantState)) { + throw new \InvalidArgumentException('non-nullable subMerchantState cannot be null'); + } + $this->container['subMerchantState'] = $subMerchantState; + + return $this; + } + + /** + * Gets subMerchantStreet + * + * @return string|null + */ + public function getSubMerchantStreet() + { + return $this->container['subMerchantStreet']; + } + + /** + * Sets subMerchantStreet + * + * @param string|null $subMerchantStreet This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 60 characters. + * + * @return self + */ + public function setSubMerchantStreet($subMerchantStreet) + { + if (is_null($subMerchantStreet)) { + throw new \InvalidArgumentException('non-nullable subMerchantStreet cannot be null'); + } + $this->container['subMerchantStreet'] = $subMerchantStreet; + + return $this; + } + + /** + * Gets subMerchantTaxId + * + * @return string|null + */ + public function getSubMerchantTaxId() + { + return $this->container['subMerchantTaxId']; + } + + /** + * Sets subMerchantTaxId + * + * @param string|null $subMerchantTaxId This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. * Format: alpha-numeric. * Fixed length: 11 or 14 characters. + * + * @return self + */ + public function setSubMerchantTaxId($subMerchantTaxId) + { + if (is_null($subMerchantTaxId)) { + throw new \InvalidArgumentException('non-nullable subMerchantTaxId cannot be null'); + } + $this->container['subMerchantTaxId'] = $subMerchantTaxId; + + 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/Payment/AdditionalDataLevel23.php b/src/Adyen/Model/Payment/AdditionalDataLevel23.php new file mode 100644 index 000000000..e41db9f19 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataLevel23.php @@ -0,0 +1,928 @@ + + */ +class AdditionalDataLevel23 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataLevel23'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enhancedSchemeDataCustomerReference' => 'string', + 'enhancedSchemeDataDestinationCountryCode' => 'string', + 'enhancedSchemeDataDestinationPostalCode' => 'string', + 'enhancedSchemeDataDestinationStateProvinceCode' => 'string', + 'enhancedSchemeDataDutyAmount' => 'string', + 'enhancedSchemeDataFreightAmount' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrDescription' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrProductCode' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrQuantity' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure' => 'string', + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice' => 'string', + 'enhancedSchemeDataOrderDate' => 'string', + 'enhancedSchemeDataShipFromPostalCode' => 'string', + 'enhancedSchemeDataTotalTaxAmount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enhancedSchemeDataCustomerReference' => null, + 'enhancedSchemeDataDestinationCountryCode' => null, + 'enhancedSchemeDataDestinationPostalCode' => null, + 'enhancedSchemeDataDestinationStateProvinceCode' => null, + 'enhancedSchemeDataDutyAmount' => null, + 'enhancedSchemeDataFreightAmount' => null, + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode' => null, + 'enhancedSchemeDataItemDetailLineItemNrDescription' => null, + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount' => null, + 'enhancedSchemeDataItemDetailLineItemNrProductCode' => null, + 'enhancedSchemeDataItemDetailLineItemNrQuantity' => null, + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount' => null, + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure' => null, + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice' => null, + 'enhancedSchemeDataOrderDate' => null, + 'enhancedSchemeDataShipFromPostalCode' => null, + 'enhancedSchemeDataTotalTaxAmount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'enhancedSchemeDataCustomerReference' => false, + 'enhancedSchemeDataDestinationCountryCode' => false, + 'enhancedSchemeDataDestinationPostalCode' => false, + 'enhancedSchemeDataDestinationStateProvinceCode' => false, + 'enhancedSchemeDataDutyAmount' => false, + 'enhancedSchemeDataFreightAmount' => false, + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode' => false, + 'enhancedSchemeDataItemDetailLineItemNrDescription' => false, + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount' => false, + 'enhancedSchemeDataItemDetailLineItemNrProductCode' => false, + 'enhancedSchemeDataItemDetailLineItemNrQuantity' => false, + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount' => false, + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure' => false, + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice' => false, + 'enhancedSchemeDataOrderDate' => false, + 'enhancedSchemeDataShipFromPostalCode' => false, + 'enhancedSchemeDataTotalTaxAmount' => 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 = [ + 'enhancedSchemeDataCustomerReference' => 'enhancedSchemeData.customerReference', + 'enhancedSchemeDataDestinationCountryCode' => 'enhancedSchemeData.destinationCountryCode', + 'enhancedSchemeDataDestinationPostalCode' => 'enhancedSchemeData.destinationPostalCode', + 'enhancedSchemeDataDestinationStateProvinceCode' => 'enhancedSchemeData.destinationStateProvinceCode', + 'enhancedSchemeDataDutyAmount' => 'enhancedSchemeData.dutyAmount', + 'enhancedSchemeDataFreightAmount' => 'enhancedSchemeData.freightAmount', + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode' => 'enhancedSchemeData.itemDetailLine[itemNr].commodityCode', + 'enhancedSchemeDataItemDetailLineItemNrDescription' => 'enhancedSchemeData.itemDetailLine[itemNr].description', + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount' => 'enhancedSchemeData.itemDetailLine[itemNr].discountAmount', + 'enhancedSchemeDataItemDetailLineItemNrProductCode' => 'enhancedSchemeData.itemDetailLine[itemNr].productCode', + 'enhancedSchemeDataItemDetailLineItemNrQuantity' => 'enhancedSchemeData.itemDetailLine[itemNr].quantity', + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount' => 'enhancedSchemeData.itemDetailLine[itemNr].totalAmount', + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure' => 'enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure', + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice' => 'enhancedSchemeData.itemDetailLine[itemNr].unitPrice', + 'enhancedSchemeDataOrderDate' => 'enhancedSchemeData.orderDate', + 'enhancedSchemeDataShipFromPostalCode' => 'enhancedSchemeData.shipFromPostalCode', + 'enhancedSchemeDataTotalTaxAmount' => 'enhancedSchemeData.totalTaxAmount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enhancedSchemeDataCustomerReference' => 'setEnhancedSchemeDataCustomerReference', + 'enhancedSchemeDataDestinationCountryCode' => 'setEnhancedSchemeDataDestinationCountryCode', + 'enhancedSchemeDataDestinationPostalCode' => 'setEnhancedSchemeDataDestinationPostalCode', + 'enhancedSchemeDataDestinationStateProvinceCode' => 'setEnhancedSchemeDataDestinationStateProvinceCode', + 'enhancedSchemeDataDutyAmount' => 'setEnhancedSchemeDataDutyAmount', + 'enhancedSchemeDataFreightAmount' => 'setEnhancedSchemeDataFreightAmount', + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode' => 'setEnhancedSchemeDataItemDetailLineItemNrCommodityCode', + 'enhancedSchemeDataItemDetailLineItemNrDescription' => 'setEnhancedSchemeDataItemDetailLineItemNrDescription', + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount' => 'setEnhancedSchemeDataItemDetailLineItemNrDiscountAmount', + 'enhancedSchemeDataItemDetailLineItemNrProductCode' => 'setEnhancedSchemeDataItemDetailLineItemNrProductCode', + 'enhancedSchemeDataItemDetailLineItemNrQuantity' => 'setEnhancedSchemeDataItemDetailLineItemNrQuantity', + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount' => 'setEnhancedSchemeDataItemDetailLineItemNrTotalAmount', + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure' => 'setEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure', + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice' => 'setEnhancedSchemeDataItemDetailLineItemNrUnitPrice', + 'enhancedSchemeDataOrderDate' => 'setEnhancedSchemeDataOrderDate', + 'enhancedSchemeDataShipFromPostalCode' => 'setEnhancedSchemeDataShipFromPostalCode', + 'enhancedSchemeDataTotalTaxAmount' => 'setEnhancedSchemeDataTotalTaxAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enhancedSchemeDataCustomerReference' => 'getEnhancedSchemeDataCustomerReference', + 'enhancedSchemeDataDestinationCountryCode' => 'getEnhancedSchemeDataDestinationCountryCode', + 'enhancedSchemeDataDestinationPostalCode' => 'getEnhancedSchemeDataDestinationPostalCode', + 'enhancedSchemeDataDestinationStateProvinceCode' => 'getEnhancedSchemeDataDestinationStateProvinceCode', + 'enhancedSchemeDataDutyAmount' => 'getEnhancedSchemeDataDutyAmount', + 'enhancedSchemeDataFreightAmount' => 'getEnhancedSchemeDataFreightAmount', + 'enhancedSchemeDataItemDetailLineItemNrCommodityCode' => 'getEnhancedSchemeDataItemDetailLineItemNrCommodityCode', + 'enhancedSchemeDataItemDetailLineItemNrDescription' => 'getEnhancedSchemeDataItemDetailLineItemNrDescription', + 'enhancedSchemeDataItemDetailLineItemNrDiscountAmount' => 'getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount', + 'enhancedSchemeDataItemDetailLineItemNrProductCode' => 'getEnhancedSchemeDataItemDetailLineItemNrProductCode', + 'enhancedSchemeDataItemDetailLineItemNrQuantity' => 'getEnhancedSchemeDataItemDetailLineItemNrQuantity', + 'enhancedSchemeDataItemDetailLineItemNrTotalAmount' => 'getEnhancedSchemeDataItemDetailLineItemNrTotalAmount', + 'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure' => 'getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure', + 'enhancedSchemeDataItemDetailLineItemNrUnitPrice' => 'getEnhancedSchemeDataItemDetailLineItemNrUnitPrice', + 'enhancedSchemeDataOrderDate' => 'getEnhancedSchemeDataOrderDate', + 'enhancedSchemeDataShipFromPostalCode' => 'getEnhancedSchemeDataShipFromPostalCode', + 'enhancedSchemeDataTotalTaxAmount' => 'getEnhancedSchemeDataTotalTaxAmount' + ]; + + /** + * 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('enhancedSchemeDataCustomerReference', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataDestinationCountryCode', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataDestinationPostalCode', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataDestinationStateProvinceCode', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataDutyAmount', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataFreightAmount', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrCommodityCode', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrDescription', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrDiscountAmount', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrProductCode', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrQuantity', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrTotalAmount', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataItemDetailLineItemNrUnitPrice', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataOrderDate', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataShipFromPostalCode', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataTotalTaxAmount', $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 enhancedSchemeDataCustomerReference + * + * @return string|null + */ + public function getEnhancedSchemeDataCustomerReference() + { + return $this->container['enhancedSchemeDataCustomerReference']; + } + + /** + * Sets enhancedSchemeDataCustomerReference + * + * @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 + */ + public function setEnhancedSchemeDataCustomerReference($enhancedSchemeDataCustomerReference) + { + if (is_null($enhancedSchemeDataCustomerReference)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataCustomerReference cannot be null'); + } + $this->container['enhancedSchemeDataCustomerReference'] = $enhancedSchemeDataCustomerReference; + + return $this; + } + + /** + * Gets enhancedSchemeDataDestinationCountryCode + * + * @return string|null + */ + public function getEnhancedSchemeDataDestinationCountryCode() + { + return $this->container['enhancedSchemeDataDestinationCountryCode']; + } + + /** + * Sets enhancedSchemeDataDestinationCountryCode + * + * @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 + */ + public function setEnhancedSchemeDataDestinationCountryCode($enhancedSchemeDataDestinationCountryCode) + { + if (is_null($enhancedSchemeDataDestinationCountryCode)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDestinationCountryCode cannot be null'); + } + $this->container['enhancedSchemeDataDestinationCountryCode'] = $enhancedSchemeDataDestinationCountryCode; + + return $this; + } + + /** + * Gets enhancedSchemeDataDestinationPostalCode + * + * @return string|null + */ + public function getEnhancedSchemeDataDestinationPostalCode() + { + return $this->container['enhancedSchemeDataDestinationPostalCode']; + } + + /** + * Sets enhancedSchemeDataDestinationPostalCode + * + * @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 + */ + public function setEnhancedSchemeDataDestinationPostalCode($enhancedSchemeDataDestinationPostalCode) + { + if (is_null($enhancedSchemeDataDestinationPostalCode)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDestinationPostalCode cannot be null'); + } + $this->container['enhancedSchemeDataDestinationPostalCode'] = $enhancedSchemeDataDestinationPostalCode; + + return $this; + } + + /** + * Gets enhancedSchemeDataDestinationStateProvinceCode + * + * @return string|null + */ + public function getEnhancedSchemeDataDestinationStateProvinceCode() + { + return $this->container['enhancedSchemeDataDestinationStateProvinceCode']; + } + + /** + * Sets enhancedSchemeDataDestinationStateProvinceCode + * + * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. * Encoding: ASCII * Max length: 3 characters * Must not start with a space + * + * @return self + */ + public function setEnhancedSchemeDataDestinationStateProvinceCode($enhancedSchemeDataDestinationStateProvinceCode) + { + if (is_null($enhancedSchemeDataDestinationStateProvinceCode)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDestinationStateProvinceCode cannot be null'); + } + $this->container['enhancedSchemeDataDestinationStateProvinceCode'] = $enhancedSchemeDataDestinationStateProvinceCode; + + return $this; + } + + /** + * Gets enhancedSchemeDataDutyAmount + * + * @return string|null + */ + public function getEnhancedSchemeDataDutyAmount() + { + return $this->container['enhancedSchemeDataDutyAmount']; + } + + /** + * Sets enhancedSchemeDataDutyAmount + * + * @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 + */ + public function setEnhancedSchemeDataDutyAmount($enhancedSchemeDataDutyAmount) + { + if (is_null($enhancedSchemeDataDutyAmount)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDutyAmount cannot be null'); + } + $this->container['enhancedSchemeDataDutyAmount'] = $enhancedSchemeDataDutyAmount; + + return $this; + } + + /** + * Gets enhancedSchemeDataFreightAmount + * + * @return string|null + */ + public function getEnhancedSchemeDataFreightAmount() + { + return $this->container['enhancedSchemeDataFreightAmount']; + } + + /** + * Sets enhancedSchemeDataFreightAmount + * + * @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 + */ + public function setEnhancedSchemeDataFreightAmount($enhancedSchemeDataFreightAmount) + { + if (is_null($enhancedSchemeDataFreightAmount)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataFreightAmount cannot be null'); + } + $this->container['enhancedSchemeDataFreightAmount'] = $enhancedSchemeDataFreightAmount; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrCommodityCode + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrCommodityCode']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrCommodityCode($enhancedSchemeDataItemDetailLineItemNrCommodityCode) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrCommodityCode)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrCommodityCode cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrCommodityCode'] = $enhancedSchemeDataItemDetailLineItemNrCommodityCode; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrDescription + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrDescription() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrDescription']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrDescription + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrDescription($enhancedSchemeDataItemDetailLineItemNrDescription) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrDescription)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrDescription cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrDescription'] = $enhancedSchemeDataItemDetailLineItemNrDescription; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrDiscountAmount + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrDiscountAmount']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrDiscountAmount + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrDiscountAmount($enhancedSchemeDataItemDetailLineItemNrDiscountAmount) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrDiscountAmount)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrDiscountAmount cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrDiscountAmount'] = $enhancedSchemeDataItemDetailLineItemNrDiscountAmount; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrProductCode + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrProductCode() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrProductCode']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrProductCode + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrProductCode($enhancedSchemeDataItemDetailLineItemNrProductCode) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrProductCode)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrProductCode cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrProductCode'] = $enhancedSchemeDataItemDetailLineItemNrProductCode; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrQuantity + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrQuantity() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrQuantity']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrQuantity + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrQuantity($enhancedSchemeDataItemDetailLineItemNrQuantity) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrQuantity)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrQuantity cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrQuantity'] = $enhancedSchemeDataItemDetailLineItemNrQuantity; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrTotalAmount + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrTotalAmount() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrTotalAmount']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrTotalAmount + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrTotalAmount($enhancedSchemeDataItemDetailLineItemNrTotalAmount) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrTotalAmount)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrTotalAmount cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrTotalAmount'] = $enhancedSchemeDataItemDetailLineItemNrTotalAmount; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure + * + * @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 + */ + public function setEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure($enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure'] = $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure; + + return $this; + } + + /** + * Gets enhancedSchemeDataItemDetailLineItemNrUnitPrice + * + * @return string|null + */ + public function getEnhancedSchemeDataItemDetailLineItemNrUnitPrice() + { + return $this->container['enhancedSchemeDataItemDetailLineItemNrUnitPrice']; + } + + /** + * Sets enhancedSchemeDataItemDetailLineItemNrUnitPrice + * + * @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 * Must not be all zeros. + * + * @return self + */ + public function setEnhancedSchemeDataItemDetailLineItemNrUnitPrice($enhancedSchemeDataItemDetailLineItemNrUnitPrice) + { + if (is_null($enhancedSchemeDataItemDetailLineItemNrUnitPrice)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrUnitPrice cannot be null'); + } + $this->container['enhancedSchemeDataItemDetailLineItemNrUnitPrice'] = $enhancedSchemeDataItemDetailLineItemNrUnitPrice; + + return $this; + } + + /** + * Gets enhancedSchemeDataOrderDate + * + * @return string|null + */ + public function getEnhancedSchemeDataOrderDate() + { + return $this->container['enhancedSchemeDataOrderDate']; + } + + /** + * Sets enhancedSchemeDataOrderDate + * + * @param string|null $enhancedSchemeDataOrderDate The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters + * + * @return self + */ + public function setEnhancedSchemeDataOrderDate($enhancedSchemeDataOrderDate) + { + if (is_null($enhancedSchemeDataOrderDate)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataOrderDate cannot be null'); + } + $this->container['enhancedSchemeDataOrderDate'] = $enhancedSchemeDataOrderDate; + + return $this; + } + + /** + * Gets enhancedSchemeDataShipFromPostalCode + * + * @return string|null + */ + public function getEnhancedSchemeDataShipFromPostalCode() + { + return $this->container['enhancedSchemeDataShipFromPostalCode']; + } + + /** + * Sets enhancedSchemeDataShipFromPostalCode + * + * @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 + */ + public function setEnhancedSchemeDataShipFromPostalCode($enhancedSchemeDataShipFromPostalCode) + { + if (is_null($enhancedSchemeDataShipFromPostalCode)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataShipFromPostalCode cannot be null'); + } + $this->container['enhancedSchemeDataShipFromPostalCode'] = $enhancedSchemeDataShipFromPostalCode; + + return $this; + } + + /** + * Gets enhancedSchemeDataTotalTaxAmount + * + * @return string|null + */ + public function getEnhancedSchemeDataTotalTaxAmount() + { + return $this->container['enhancedSchemeDataTotalTaxAmount']; + } + + /** + * Sets enhancedSchemeDataTotalTaxAmount + * + * @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 * Must not be all zeros. + * + * @return self + */ + public function setEnhancedSchemeDataTotalTaxAmount($enhancedSchemeDataTotalTaxAmount) + { + if (is_null($enhancedSchemeDataTotalTaxAmount)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTotalTaxAmount cannot be null'); + } + $this->container['enhancedSchemeDataTotalTaxAmount'] = $enhancedSchemeDataTotalTaxAmount; + + 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/Payment/AdditionalDataLodging.php b/src/Adyen/Model/Payment/AdditionalDataLodging.php new file mode 100644 index 000000000..22603bd91 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataLodging.php @@ -0,0 +1,894 @@ + + */ +class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataLodging'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'lodgingCheckInDate' => 'string', + 'lodgingCheckOutDate' => 'string', + 'lodgingCustomerServiceTollFreeNumber' => 'string', + 'lodgingFireSafetyActIndicator' => 'string', + 'lodgingFolioCashAdvances' => 'string', + 'lodgingFolioNumber' => 'string', + 'lodgingFoodBeverageCharges' => 'string', + 'lodgingNoShowIndicator' => 'string', + 'lodgingPrepaidExpenses' => 'string', + 'lodgingPropertyPhoneNumber' => 'string', + 'lodgingRoom1NumberOfNights' => 'string', + 'lodgingRoom1Rate' => 'string', + 'lodgingTotalRoomTax' => 'string', + 'lodgingTotalTax' => 'string', + 'travelEntertainmentAuthDataDuration' => 'string', + 'travelEntertainmentAuthDataMarket' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'lodgingCheckInDate' => null, + 'lodgingCheckOutDate' => null, + 'lodgingCustomerServiceTollFreeNumber' => null, + 'lodgingFireSafetyActIndicator' => null, + 'lodgingFolioCashAdvances' => null, + 'lodgingFolioNumber' => null, + 'lodgingFoodBeverageCharges' => null, + 'lodgingNoShowIndicator' => null, + 'lodgingPrepaidExpenses' => null, + 'lodgingPropertyPhoneNumber' => null, + 'lodgingRoom1NumberOfNights' => null, + 'lodgingRoom1Rate' => null, + 'lodgingTotalRoomTax' => null, + 'lodgingTotalTax' => null, + 'travelEntertainmentAuthDataDuration' => null, + 'travelEntertainmentAuthDataMarket' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'lodgingCheckInDate' => false, + 'lodgingCheckOutDate' => false, + 'lodgingCustomerServiceTollFreeNumber' => false, + 'lodgingFireSafetyActIndicator' => false, + 'lodgingFolioCashAdvances' => false, + 'lodgingFolioNumber' => false, + 'lodgingFoodBeverageCharges' => false, + 'lodgingNoShowIndicator' => false, + 'lodgingPrepaidExpenses' => false, + 'lodgingPropertyPhoneNumber' => false, + 'lodgingRoom1NumberOfNights' => false, + 'lodgingRoom1Rate' => false, + 'lodgingTotalRoomTax' => false, + 'lodgingTotalTax' => false, + 'travelEntertainmentAuthDataDuration' => false, + 'travelEntertainmentAuthDataMarket' => 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 = [ + 'lodgingCheckInDate' => 'lodging.checkInDate', + 'lodgingCheckOutDate' => 'lodging.checkOutDate', + 'lodgingCustomerServiceTollFreeNumber' => 'lodging.customerServiceTollFreeNumber', + 'lodgingFireSafetyActIndicator' => 'lodging.fireSafetyActIndicator', + 'lodgingFolioCashAdvances' => 'lodging.folioCashAdvances', + 'lodgingFolioNumber' => 'lodging.folioNumber', + 'lodgingFoodBeverageCharges' => 'lodging.foodBeverageCharges', + 'lodgingNoShowIndicator' => 'lodging.noShowIndicator', + 'lodgingPrepaidExpenses' => 'lodging.prepaidExpenses', + 'lodgingPropertyPhoneNumber' => 'lodging.propertyPhoneNumber', + 'lodgingRoom1NumberOfNights' => 'lodging.room1.numberOfNights', + 'lodgingRoom1Rate' => 'lodging.room1.rate', + 'lodgingTotalRoomTax' => 'lodging.totalRoomTax', + 'lodgingTotalTax' => 'lodging.totalTax', + 'travelEntertainmentAuthDataDuration' => 'travelEntertainmentAuthData.duration', + 'travelEntertainmentAuthDataMarket' => 'travelEntertainmentAuthData.market' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'lodgingCheckInDate' => 'setLodgingCheckInDate', + 'lodgingCheckOutDate' => 'setLodgingCheckOutDate', + 'lodgingCustomerServiceTollFreeNumber' => 'setLodgingCustomerServiceTollFreeNumber', + 'lodgingFireSafetyActIndicator' => 'setLodgingFireSafetyActIndicator', + 'lodgingFolioCashAdvances' => 'setLodgingFolioCashAdvances', + 'lodgingFolioNumber' => 'setLodgingFolioNumber', + 'lodgingFoodBeverageCharges' => 'setLodgingFoodBeverageCharges', + 'lodgingNoShowIndicator' => 'setLodgingNoShowIndicator', + 'lodgingPrepaidExpenses' => 'setLodgingPrepaidExpenses', + 'lodgingPropertyPhoneNumber' => 'setLodgingPropertyPhoneNumber', + 'lodgingRoom1NumberOfNights' => 'setLodgingRoom1NumberOfNights', + 'lodgingRoom1Rate' => 'setLodgingRoom1Rate', + 'lodgingTotalRoomTax' => 'setLodgingTotalRoomTax', + 'lodgingTotalTax' => 'setLodgingTotalTax', + 'travelEntertainmentAuthDataDuration' => 'setTravelEntertainmentAuthDataDuration', + 'travelEntertainmentAuthDataMarket' => 'setTravelEntertainmentAuthDataMarket' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'lodgingCheckInDate' => 'getLodgingCheckInDate', + 'lodgingCheckOutDate' => 'getLodgingCheckOutDate', + 'lodgingCustomerServiceTollFreeNumber' => 'getLodgingCustomerServiceTollFreeNumber', + 'lodgingFireSafetyActIndicator' => 'getLodgingFireSafetyActIndicator', + 'lodgingFolioCashAdvances' => 'getLodgingFolioCashAdvances', + 'lodgingFolioNumber' => 'getLodgingFolioNumber', + 'lodgingFoodBeverageCharges' => 'getLodgingFoodBeverageCharges', + 'lodgingNoShowIndicator' => 'getLodgingNoShowIndicator', + 'lodgingPrepaidExpenses' => 'getLodgingPrepaidExpenses', + 'lodgingPropertyPhoneNumber' => 'getLodgingPropertyPhoneNumber', + 'lodgingRoom1NumberOfNights' => 'getLodgingRoom1NumberOfNights', + 'lodgingRoom1Rate' => 'getLodgingRoom1Rate', + 'lodgingTotalRoomTax' => 'getLodgingTotalRoomTax', + 'lodgingTotalTax' => 'getLodgingTotalTax', + 'travelEntertainmentAuthDataDuration' => 'getTravelEntertainmentAuthDataDuration', + 'travelEntertainmentAuthDataMarket' => 'getTravelEntertainmentAuthDataMarket' + ]; + + /** + * 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('lodgingCheckInDate', $data ?? [], null); + $this->setIfExists('lodgingCheckOutDate', $data ?? [], null); + $this->setIfExists('lodgingCustomerServiceTollFreeNumber', $data ?? [], null); + $this->setIfExists('lodgingFireSafetyActIndicator', $data ?? [], null); + $this->setIfExists('lodgingFolioCashAdvances', $data ?? [], null); + $this->setIfExists('lodgingFolioNumber', $data ?? [], null); + $this->setIfExists('lodgingFoodBeverageCharges', $data ?? [], null); + $this->setIfExists('lodgingNoShowIndicator', $data ?? [], null); + $this->setIfExists('lodgingPrepaidExpenses', $data ?? [], null); + $this->setIfExists('lodgingPropertyPhoneNumber', $data ?? [], null); + $this->setIfExists('lodgingRoom1NumberOfNights', $data ?? [], null); + $this->setIfExists('lodgingRoom1Rate', $data ?? [], null); + $this->setIfExists('lodgingTotalRoomTax', $data ?? [], null); + $this->setIfExists('lodgingTotalTax', $data ?? [], null); + $this->setIfExists('travelEntertainmentAuthDataDuration', $data ?? [], null); + $this->setIfExists('travelEntertainmentAuthDataMarket', $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 lodgingCheckInDate + * + * @return string|null + */ + public function getLodgingCheckInDate() + { + return $this->container['lodgingCheckInDate']; + } + + /** + * Sets lodgingCheckInDate + * + * @param string|null $lodgingCheckInDate The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. + * + * @return self + */ + public function setLodgingCheckInDate($lodgingCheckInDate) + { + if (is_null($lodgingCheckInDate)) { + throw new \InvalidArgumentException('non-nullable lodgingCheckInDate cannot be null'); + } + $this->container['lodgingCheckInDate'] = $lodgingCheckInDate; + + return $this; + } + + /** + * Gets lodgingCheckOutDate + * + * @return string|null + */ + public function getLodgingCheckOutDate() + { + return $this->container['lodgingCheckOutDate']; + } + + /** + * Sets lodgingCheckOutDate + * + * @param string|null $lodgingCheckOutDate The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. + * + * @return self + */ + public function setLodgingCheckOutDate($lodgingCheckOutDate) + { + if (is_null($lodgingCheckOutDate)) { + throw new \InvalidArgumentException('non-nullable lodgingCheckOutDate cannot be null'); + } + $this->container['lodgingCheckOutDate'] = $lodgingCheckOutDate; + + return $this; + } + + /** + * Gets lodgingCustomerServiceTollFreeNumber + * + * @return string|null + */ + public function getLodgingCustomerServiceTollFreeNumber() + { + return $this->container['lodgingCustomerServiceTollFreeNumber']; + } + + /** + * Sets lodgingCustomerServiceTollFreeNumber + * + * @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 contain any special characters such as + or - *Must not be all zeros. + * + * @return self + */ + public function setLodgingCustomerServiceTollFreeNumber($lodgingCustomerServiceTollFreeNumber) + { + if (is_null($lodgingCustomerServiceTollFreeNumber)) { + throw new \InvalidArgumentException('non-nullable lodgingCustomerServiceTollFreeNumber cannot be null'); + } + $this->container['lodgingCustomerServiceTollFreeNumber'] = $lodgingCustomerServiceTollFreeNumber; + + return $this; + } + + /** + * Gets lodgingFireSafetyActIndicator + * + * @return string|null + */ + public function getLodgingFireSafetyActIndicator() + { + return $this->container['lodgingFireSafetyActIndicator']; + } + + /** + * Sets lodgingFireSafetyActIndicator + * + * @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 + */ + public function setLodgingFireSafetyActIndicator($lodgingFireSafetyActIndicator) + { + if (is_null($lodgingFireSafetyActIndicator)) { + throw new \InvalidArgumentException('non-nullable lodgingFireSafetyActIndicator cannot be null'); + } + $this->container['lodgingFireSafetyActIndicator'] = $lodgingFireSafetyActIndicator; + + return $this; + } + + /** + * Gets lodgingFolioCashAdvances + * + * @return string|null + */ + public function getLodgingFolioCashAdvances() + { + return $this->container['lodgingFolioCashAdvances']; + } + + /** + * Sets lodgingFolioCashAdvances + * + * @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 + */ + public function setLodgingFolioCashAdvances($lodgingFolioCashAdvances) + { + if (is_null($lodgingFolioCashAdvances)) { + throw new \InvalidArgumentException('non-nullable lodgingFolioCashAdvances cannot be null'); + } + $this->container['lodgingFolioCashAdvances'] = $lodgingFolioCashAdvances; + + return $this; + } + + /** + * Gets lodgingFolioNumber + * + * @return string|null + */ + public function getLodgingFolioNumber() + { + return $this->container['lodgingFolioNumber']; + } + + /** + * Sets lodgingFolioNumber + * + * @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 + */ + public function setLodgingFolioNumber($lodgingFolioNumber) + { + if (is_null($lodgingFolioNumber)) { + throw new \InvalidArgumentException('non-nullable lodgingFolioNumber cannot be null'); + } + $this->container['lodgingFolioNumber'] = $lodgingFolioNumber; + + return $this; + } + + /** + * Gets lodgingFoodBeverageCharges + * + * @return string|null + */ + public function getLodgingFoodBeverageCharges() + { + return $this->container['lodgingFoodBeverageCharges']; + } + + /** + * Sets lodgingFoodBeverageCharges + * + * @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 + */ + public function setLodgingFoodBeverageCharges($lodgingFoodBeverageCharges) + { + if (is_null($lodgingFoodBeverageCharges)) { + throw new \InvalidArgumentException('non-nullable lodgingFoodBeverageCharges cannot be null'); + } + $this->container['lodgingFoodBeverageCharges'] = $lodgingFoodBeverageCharges; + + return $this; + } + + /** + * Gets lodgingNoShowIndicator + * + * @return string|null + */ + public function getLodgingNoShowIndicator() + { + return $this->container['lodgingNoShowIndicator']; + } + + /** + * 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 + * + * @return self + */ + public function setLodgingNoShowIndicator($lodgingNoShowIndicator) + { + if (is_null($lodgingNoShowIndicator)) { + throw new \InvalidArgumentException('non-nullable lodgingNoShowIndicator cannot be null'); + } + $this->container['lodgingNoShowIndicator'] = $lodgingNoShowIndicator; + + return $this; + } + + /** + * Gets lodgingPrepaidExpenses + * + * @return string|null + */ + public function getLodgingPrepaidExpenses() + { + return $this->container['lodgingPrepaidExpenses']; + } + + /** + * Sets lodgingPrepaidExpenses + * + * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters + * + * @return self + */ + public function setLodgingPrepaidExpenses($lodgingPrepaidExpenses) + { + if (is_null($lodgingPrepaidExpenses)) { + throw new \InvalidArgumentException('non-nullable lodgingPrepaidExpenses cannot be null'); + } + $this->container['lodgingPrepaidExpenses'] = $lodgingPrepaidExpenses; + + return $this; + } + + /** + * Gets lodgingPropertyPhoneNumber + * + * @return string|null + */ + public function getLodgingPropertyPhoneNumber() + { + return $this->container['lodgingPropertyPhoneNumber']; + } + + /** + * Sets lodgingPropertyPhoneNumber + * + * @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 contain any special characters such as + or - *Must not be all zeros. + * + * @return self + */ + public function setLodgingPropertyPhoneNumber($lodgingPropertyPhoneNumber) + { + if (is_null($lodgingPropertyPhoneNumber)) { + throw new \InvalidArgumentException('non-nullable lodgingPropertyPhoneNumber cannot be null'); + } + $this->container['lodgingPropertyPhoneNumber'] = $lodgingPropertyPhoneNumber; + + return $this; + } + + /** + * Gets lodgingRoom1NumberOfNights + * + * @return string|null + */ + public function getLodgingRoom1NumberOfNights() + { + return $this->container['lodgingRoom1NumberOfNights']; + } + + /** + * Sets lodgingRoom1NumberOfNights + * + * @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 + */ + public function setLodgingRoom1NumberOfNights($lodgingRoom1NumberOfNights) + { + if (is_null($lodgingRoom1NumberOfNights)) { + throw new \InvalidArgumentException('non-nullable lodgingRoom1NumberOfNights cannot be null'); + } + $this->container['lodgingRoom1NumberOfNights'] = $lodgingRoom1NumberOfNights; + + return $this; + } + + /** + * Gets lodgingRoom1Rate + * + * @return string|null + */ + public function getLodgingRoom1Rate() + { + return $this->container['lodgingRoom1Rate']; + } + + /** + * Sets lodgingRoom1Rate + * + * @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 + */ + public function setLodgingRoom1Rate($lodgingRoom1Rate) + { + if (is_null($lodgingRoom1Rate)) { + throw new \InvalidArgumentException('non-nullable lodgingRoom1Rate cannot be null'); + } + $this->container['lodgingRoom1Rate'] = $lodgingRoom1Rate; + + return $this; + } + + /** + * Gets lodgingTotalRoomTax + * + * @return string|null + */ + public function getLodgingTotalRoomTax() + { + return $this->container['lodgingTotalRoomTax']; + } + + /** + * Sets lodgingTotalRoomTax + * + * @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 + */ + public function setLodgingTotalRoomTax($lodgingTotalRoomTax) + { + if (is_null($lodgingTotalRoomTax)) { + throw new \InvalidArgumentException('non-nullable lodgingTotalRoomTax cannot be null'); + } + $this->container['lodgingTotalRoomTax'] = $lodgingTotalRoomTax; + + return $this; + } + + /** + * Gets lodgingTotalTax + * + * @return string|null + */ + public function getLodgingTotalTax() + { + return $this->container['lodgingTotalTax']; + } + + /** + * Sets lodgingTotalTax + * + * @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 + */ + public function setLodgingTotalTax($lodgingTotalTax) + { + if (is_null($lodgingTotalTax)) { + throw new \InvalidArgumentException('non-nullable lodgingTotalTax cannot be null'); + } + $this->container['lodgingTotalTax'] = $lodgingTotalTax; + + return $this; + } + + /** + * Gets travelEntertainmentAuthDataDuration + * + * @return string|null + */ + public function getTravelEntertainmentAuthDataDuration() + { + return $this->container['travelEntertainmentAuthDataDuration']; + } + + /** + * Sets travelEntertainmentAuthDataDuration + * + * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters + * + * @return self + */ + public function setTravelEntertainmentAuthDataDuration($travelEntertainmentAuthDataDuration) + { + if (is_null($travelEntertainmentAuthDataDuration)) { + throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataDuration cannot be null'); + } + $this->container['travelEntertainmentAuthDataDuration'] = $travelEntertainmentAuthDataDuration; + + return $this; + } + + /** + * Gets travelEntertainmentAuthDataMarket + * + * @return string|null + */ + public function getTravelEntertainmentAuthDataMarket() + { + return $this->container['travelEntertainmentAuthDataMarket']; + } + + /** + * Sets travelEntertainmentAuthDataMarket + * + * @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 + */ + public function setTravelEntertainmentAuthDataMarket($travelEntertainmentAuthDataMarket) + { + if (is_null($travelEntertainmentAuthDataMarket)) { + throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataMarket cannot be null'); + } + $this->container['travelEntertainmentAuthDataMarket'] = $travelEntertainmentAuthDataMarket; + + 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/Payment/AdditionalDataModifications.php b/src/Adyen/Model/Payment/AdditionalDataModifications.php new file mode 100644 index 000000000..be08c5f08 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataModifications.php @@ -0,0 +1,384 @@ + + */ +class AdditionalDataModifications implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataModifications'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'installmentPaymentDataSelectedInstallmentOption' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'installmentPaymentDataSelectedInstallmentOption' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'installmentPaymentDataSelectedInstallmentOption' => 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 = [ + 'installmentPaymentDataSelectedInstallmentOption' => 'installmentPaymentData.selectedInstallmentOption' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'installmentPaymentDataSelectedInstallmentOption' => 'setInstallmentPaymentDataSelectedInstallmentOption' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'installmentPaymentDataSelectedInstallmentOption' => 'getInstallmentPaymentDataSelectedInstallmentOption' + ]; + + /** + * 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('installmentPaymentDataSelectedInstallmentOption', $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 installmentPaymentDataSelectedInstallmentOption + * + * @return string|null + */ + public function getInstallmentPaymentDataSelectedInstallmentOption() + { + return $this->container['installmentPaymentDataSelectedInstallmentOption']; + } + + /** + * Sets installmentPaymentDataSelectedInstallmentOption + * + * @param string|null $installmentPaymentDataSelectedInstallmentOption This is the installment option selected by the shopper. It is required only if specified by the user. + * + * @return self + */ + public function setInstallmentPaymentDataSelectedInstallmentOption($installmentPaymentDataSelectedInstallmentOption) + { + if (is_null($installmentPaymentDataSelectedInstallmentOption)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataSelectedInstallmentOption cannot be null'); + } + $this->container['installmentPaymentDataSelectedInstallmentOption'] = $installmentPaymentDataSelectedInstallmentOption; + + 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/Payment/AdditionalDataOpenInvoice.php b/src/Adyen/Model/Payment/AdditionalDataOpenInvoice.php new file mode 100644 index 000000000..a6101e804 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataOpenInvoice.php @@ -0,0 +1,962 @@ + + */ +class AdditionalDataOpenInvoice implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataOpenInvoice'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'openinvoicedataMerchantData' => 'string', + 'openinvoicedataNumberOfLines' => 'string', + 'openinvoicedataRecipientFirstName' => 'string', + 'openinvoicedataRecipientLastName' => 'string', + 'openinvoicedataLineItemNrCurrencyCode' => 'string', + 'openinvoicedataLineItemNrDescription' => 'string', + 'openinvoicedataLineItemNrItemAmount' => 'string', + 'openinvoicedataLineItemNrItemId' => 'string', + 'openinvoicedataLineItemNrItemVatAmount' => 'string', + 'openinvoicedataLineItemNrItemVatPercentage' => 'string', + 'openinvoicedataLineItemNrNumberOfItems' => 'string', + 'openinvoicedataLineItemNrReturnShippingCompany' => 'string', + 'openinvoicedataLineItemNrReturnTrackingNumber' => 'string', + 'openinvoicedataLineItemNrReturnTrackingUri' => 'string', + 'openinvoicedataLineItemNrShippingCompany' => 'string', + 'openinvoicedataLineItemNrShippingMethod' => 'string', + 'openinvoicedataLineItemNrTrackingNumber' => 'string', + 'openinvoicedataLineItemNrTrackingUri' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'openinvoicedataMerchantData' => null, + 'openinvoicedataNumberOfLines' => null, + 'openinvoicedataRecipientFirstName' => null, + 'openinvoicedataRecipientLastName' => null, + 'openinvoicedataLineItemNrCurrencyCode' => null, + 'openinvoicedataLineItemNrDescription' => null, + 'openinvoicedataLineItemNrItemAmount' => null, + 'openinvoicedataLineItemNrItemId' => null, + 'openinvoicedataLineItemNrItemVatAmount' => null, + 'openinvoicedataLineItemNrItemVatPercentage' => null, + 'openinvoicedataLineItemNrNumberOfItems' => null, + 'openinvoicedataLineItemNrReturnShippingCompany' => null, + 'openinvoicedataLineItemNrReturnTrackingNumber' => null, + 'openinvoicedataLineItemNrReturnTrackingUri' => null, + 'openinvoicedataLineItemNrShippingCompany' => null, + 'openinvoicedataLineItemNrShippingMethod' => null, + 'openinvoicedataLineItemNrTrackingNumber' => null, + 'openinvoicedataLineItemNrTrackingUri' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'openinvoicedataMerchantData' => false, + 'openinvoicedataNumberOfLines' => false, + 'openinvoicedataRecipientFirstName' => false, + 'openinvoicedataRecipientLastName' => false, + 'openinvoicedataLineItemNrCurrencyCode' => false, + 'openinvoicedataLineItemNrDescription' => false, + 'openinvoicedataLineItemNrItemAmount' => false, + 'openinvoicedataLineItemNrItemId' => false, + 'openinvoicedataLineItemNrItemVatAmount' => false, + 'openinvoicedataLineItemNrItemVatPercentage' => false, + 'openinvoicedataLineItemNrNumberOfItems' => false, + 'openinvoicedataLineItemNrReturnShippingCompany' => false, + 'openinvoicedataLineItemNrReturnTrackingNumber' => false, + 'openinvoicedataLineItemNrReturnTrackingUri' => false, + 'openinvoicedataLineItemNrShippingCompany' => false, + 'openinvoicedataLineItemNrShippingMethod' => false, + 'openinvoicedataLineItemNrTrackingNumber' => false, + 'openinvoicedataLineItemNrTrackingUri' => 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 = [ + 'openinvoicedataMerchantData' => 'openinvoicedata.merchantData', + 'openinvoicedataNumberOfLines' => 'openinvoicedata.numberOfLines', + 'openinvoicedataRecipientFirstName' => 'openinvoicedata.recipientFirstName', + 'openinvoicedataRecipientLastName' => 'openinvoicedata.recipientLastName', + 'openinvoicedataLineItemNrCurrencyCode' => 'openinvoicedataLine[itemNr].currencyCode', + 'openinvoicedataLineItemNrDescription' => 'openinvoicedataLine[itemNr].description', + 'openinvoicedataLineItemNrItemAmount' => 'openinvoicedataLine[itemNr].itemAmount', + 'openinvoicedataLineItemNrItemId' => 'openinvoicedataLine[itemNr].itemId', + 'openinvoicedataLineItemNrItemVatAmount' => 'openinvoicedataLine[itemNr].itemVatAmount', + 'openinvoicedataLineItemNrItemVatPercentage' => 'openinvoicedataLine[itemNr].itemVatPercentage', + 'openinvoicedataLineItemNrNumberOfItems' => 'openinvoicedataLine[itemNr].numberOfItems', + 'openinvoicedataLineItemNrReturnShippingCompany' => 'openinvoicedataLine[itemNr].returnShippingCompany', + 'openinvoicedataLineItemNrReturnTrackingNumber' => 'openinvoicedataLine[itemNr].returnTrackingNumber', + 'openinvoicedataLineItemNrReturnTrackingUri' => 'openinvoicedataLine[itemNr].returnTrackingUri', + 'openinvoicedataLineItemNrShippingCompany' => 'openinvoicedataLine[itemNr].shippingCompany', + 'openinvoicedataLineItemNrShippingMethod' => 'openinvoicedataLine[itemNr].shippingMethod', + 'openinvoicedataLineItemNrTrackingNumber' => 'openinvoicedataLine[itemNr].trackingNumber', + 'openinvoicedataLineItemNrTrackingUri' => 'openinvoicedataLine[itemNr].trackingUri' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'openinvoicedataMerchantData' => 'setOpeninvoicedataMerchantData', + 'openinvoicedataNumberOfLines' => 'setOpeninvoicedataNumberOfLines', + 'openinvoicedataRecipientFirstName' => 'setOpeninvoicedataRecipientFirstName', + 'openinvoicedataRecipientLastName' => 'setOpeninvoicedataRecipientLastName', + 'openinvoicedataLineItemNrCurrencyCode' => 'setOpeninvoicedataLineItemNrCurrencyCode', + 'openinvoicedataLineItemNrDescription' => 'setOpeninvoicedataLineItemNrDescription', + 'openinvoicedataLineItemNrItemAmount' => 'setOpeninvoicedataLineItemNrItemAmount', + 'openinvoicedataLineItemNrItemId' => 'setOpeninvoicedataLineItemNrItemId', + 'openinvoicedataLineItemNrItemVatAmount' => 'setOpeninvoicedataLineItemNrItemVatAmount', + 'openinvoicedataLineItemNrItemVatPercentage' => 'setOpeninvoicedataLineItemNrItemVatPercentage', + 'openinvoicedataLineItemNrNumberOfItems' => 'setOpeninvoicedataLineItemNrNumberOfItems', + 'openinvoicedataLineItemNrReturnShippingCompany' => 'setOpeninvoicedataLineItemNrReturnShippingCompany', + 'openinvoicedataLineItemNrReturnTrackingNumber' => 'setOpeninvoicedataLineItemNrReturnTrackingNumber', + 'openinvoicedataLineItemNrReturnTrackingUri' => 'setOpeninvoicedataLineItemNrReturnTrackingUri', + 'openinvoicedataLineItemNrShippingCompany' => 'setOpeninvoicedataLineItemNrShippingCompany', + 'openinvoicedataLineItemNrShippingMethod' => 'setOpeninvoicedataLineItemNrShippingMethod', + 'openinvoicedataLineItemNrTrackingNumber' => 'setOpeninvoicedataLineItemNrTrackingNumber', + 'openinvoicedataLineItemNrTrackingUri' => 'setOpeninvoicedataLineItemNrTrackingUri' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'openinvoicedataMerchantData' => 'getOpeninvoicedataMerchantData', + 'openinvoicedataNumberOfLines' => 'getOpeninvoicedataNumberOfLines', + 'openinvoicedataRecipientFirstName' => 'getOpeninvoicedataRecipientFirstName', + 'openinvoicedataRecipientLastName' => 'getOpeninvoicedataRecipientLastName', + 'openinvoicedataLineItemNrCurrencyCode' => 'getOpeninvoicedataLineItemNrCurrencyCode', + 'openinvoicedataLineItemNrDescription' => 'getOpeninvoicedataLineItemNrDescription', + 'openinvoicedataLineItemNrItemAmount' => 'getOpeninvoicedataLineItemNrItemAmount', + 'openinvoicedataLineItemNrItemId' => 'getOpeninvoicedataLineItemNrItemId', + 'openinvoicedataLineItemNrItemVatAmount' => 'getOpeninvoicedataLineItemNrItemVatAmount', + 'openinvoicedataLineItemNrItemVatPercentage' => 'getOpeninvoicedataLineItemNrItemVatPercentage', + 'openinvoicedataLineItemNrNumberOfItems' => 'getOpeninvoicedataLineItemNrNumberOfItems', + 'openinvoicedataLineItemNrReturnShippingCompany' => 'getOpeninvoicedataLineItemNrReturnShippingCompany', + 'openinvoicedataLineItemNrReturnTrackingNumber' => 'getOpeninvoicedataLineItemNrReturnTrackingNumber', + 'openinvoicedataLineItemNrReturnTrackingUri' => 'getOpeninvoicedataLineItemNrReturnTrackingUri', + 'openinvoicedataLineItemNrShippingCompany' => 'getOpeninvoicedataLineItemNrShippingCompany', + 'openinvoicedataLineItemNrShippingMethod' => 'getOpeninvoicedataLineItemNrShippingMethod', + 'openinvoicedataLineItemNrTrackingNumber' => 'getOpeninvoicedataLineItemNrTrackingNumber', + 'openinvoicedataLineItemNrTrackingUri' => 'getOpeninvoicedataLineItemNrTrackingUri' + ]; + + /** + * 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('openinvoicedataMerchantData', $data ?? [], null); + $this->setIfExists('openinvoicedataNumberOfLines', $data ?? [], null); + $this->setIfExists('openinvoicedataRecipientFirstName', $data ?? [], null); + $this->setIfExists('openinvoicedataRecipientLastName', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrCurrencyCode', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrDescription', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrItemAmount', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrItemId', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrItemVatAmount', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrItemVatPercentage', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrNumberOfItems', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrReturnShippingCompany', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrReturnTrackingNumber', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrReturnTrackingUri', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrShippingCompany', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrShippingMethod', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrTrackingNumber', $data ?? [], null); + $this->setIfExists('openinvoicedataLineItemNrTrackingUri', $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 openinvoicedataMerchantData + * + * @return string|null + */ + public function getOpeninvoicedataMerchantData() + { + return $this->container['openinvoicedataMerchantData']; + } + + /** + * Sets openinvoicedataMerchantData + * + * @param string|null $openinvoicedataMerchantData Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. Since the field is optional, if it's not included it does not impact computing the merchant signature. Applies only to Klarna. You can contact Klarna for the format and structure of the string. + * + * @return self + */ + public function setOpeninvoicedataMerchantData($openinvoicedataMerchantData) + { + if (is_null($openinvoicedataMerchantData)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataMerchantData cannot be null'); + } + $this->container['openinvoicedataMerchantData'] = $openinvoicedataMerchantData; + + return $this; + } + + /** + * Gets openinvoicedataNumberOfLines + * + * @return string|null + */ + public function getOpeninvoicedataNumberOfLines() + { + return $this->container['openinvoicedataNumberOfLines']; + } + + /** + * Sets openinvoicedataNumberOfLines + * + * @param string|null $openinvoicedataNumberOfLines The number of invoice lines included in `openinvoicedata`. There needs to be at least one line, so `numberOfLines` needs to be at least 1. + * + * @return self + */ + public function setOpeninvoicedataNumberOfLines($openinvoicedataNumberOfLines) + { + if (is_null($openinvoicedataNumberOfLines)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataNumberOfLines cannot be null'); + } + $this->container['openinvoicedataNumberOfLines'] = $openinvoicedataNumberOfLines; + + return $this; + } + + /** + * Gets openinvoicedataRecipientFirstName + * + * @return string|null + */ + public function getOpeninvoicedataRecipientFirstName() + { + return $this->container['openinvoicedataRecipientFirstName']; + } + + /** + * Sets openinvoicedataRecipientFirstName + * + * @param string|null $openinvoicedataRecipientFirstName First name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. + * + * @return self + */ + public function setOpeninvoicedataRecipientFirstName($openinvoicedataRecipientFirstName) + { + if (is_null($openinvoicedataRecipientFirstName)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataRecipientFirstName cannot be null'); + } + $this->container['openinvoicedataRecipientFirstName'] = $openinvoicedataRecipientFirstName; + + return $this; + } + + /** + * Gets openinvoicedataRecipientLastName + * + * @return string|null + */ + public function getOpeninvoicedataRecipientLastName() + { + return $this->container['openinvoicedataRecipientLastName']; + } + + /** + * Sets openinvoicedataRecipientLastName + * + * @param string|null $openinvoicedataRecipientLastName Last name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. + * + * @return self + */ + public function setOpeninvoicedataRecipientLastName($openinvoicedataRecipientLastName) + { + if (is_null($openinvoicedataRecipientLastName)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataRecipientLastName cannot be null'); + } + $this->container['openinvoicedataRecipientLastName'] = $openinvoicedataRecipientLastName; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrCurrencyCode + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrCurrencyCode() + { + return $this->container['openinvoicedataLineItemNrCurrencyCode']; + } + + /** + * Sets openinvoicedataLineItemNrCurrencyCode + * + * @param string|null $openinvoicedataLineItemNrCurrencyCode The three-character ISO currency code. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrCurrencyCode($openinvoicedataLineItemNrCurrencyCode) + { + if (is_null($openinvoicedataLineItemNrCurrencyCode)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrCurrencyCode cannot be null'); + } + $this->container['openinvoicedataLineItemNrCurrencyCode'] = $openinvoicedataLineItemNrCurrencyCode; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrDescription + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrDescription() + { + return $this->container['openinvoicedataLineItemNrDescription']; + } + + /** + * Sets openinvoicedataLineItemNrDescription + * + * @param string|null $openinvoicedataLineItemNrDescription A text description of the product the invoice line refers to. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrDescription($openinvoicedataLineItemNrDescription) + { + if (is_null($openinvoicedataLineItemNrDescription)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrDescription cannot be null'); + } + $this->container['openinvoicedataLineItemNrDescription'] = $openinvoicedataLineItemNrDescription; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrItemAmount + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrItemAmount() + { + return $this->container['openinvoicedataLineItemNrItemAmount']; + } + + /** + * Sets openinvoicedataLineItemNrItemAmount + * + * @param string|null $openinvoicedataLineItemNrItemAmount The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrItemAmount($openinvoicedataLineItemNrItemAmount) + { + if (is_null($openinvoicedataLineItemNrItemAmount)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemAmount cannot be null'); + } + $this->container['openinvoicedataLineItemNrItemAmount'] = $openinvoicedataLineItemNrItemAmount; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrItemId + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrItemId() + { + return $this->container['openinvoicedataLineItemNrItemId']; + } + + /** + * Sets openinvoicedataLineItemNrItemId + * + * @param string|null $openinvoicedataLineItemNrItemId A unique id for this item. Required for RatePay if the description of each item is not unique. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrItemId($openinvoicedataLineItemNrItemId) + { + if (is_null($openinvoicedataLineItemNrItemId)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemId cannot be null'); + } + $this->container['openinvoicedataLineItemNrItemId'] = $openinvoicedataLineItemNrItemId; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrItemVatAmount + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrItemVatAmount() + { + return $this->container['openinvoicedataLineItemNrItemVatAmount']; + } + + /** + * Sets openinvoicedataLineItemNrItemVatAmount + * + * @param string|null $openinvoicedataLineItemNrItemVatAmount The VAT due for one item in the invoice line, represented in minor units. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrItemVatAmount($openinvoicedataLineItemNrItemVatAmount) + { + if (is_null($openinvoicedataLineItemNrItemVatAmount)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemVatAmount cannot be null'); + } + $this->container['openinvoicedataLineItemNrItemVatAmount'] = $openinvoicedataLineItemNrItemVatAmount; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrItemVatPercentage + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrItemVatPercentage() + { + return $this->container['openinvoicedataLineItemNrItemVatPercentage']; + } + + /** + * Sets openinvoicedataLineItemNrItemVatPercentage + * + * @param string|null $openinvoicedataLineItemNrItemVatPercentage The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrItemVatPercentage($openinvoicedataLineItemNrItemVatPercentage) + { + if (is_null($openinvoicedataLineItemNrItemVatPercentage)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemVatPercentage cannot be null'); + } + $this->container['openinvoicedataLineItemNrItemVatPercentage'] = $openinvoicedataLineItemNrItemVatPercentage; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrNumberOfItems + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrNumberOfItems() + { + return $this->container['openinvoicedataLineItemNrNumberOfItems']; + } + + /** + * Sets openinvoicedataLineItemNrNumberOfItems + * + * @param string|null $openinvoicedataLineItemNrNumberOfItems The number of units purchased of a specific product. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrNumberOfItems($openinvoicedataLineItemNrNumberOfItems) + { + if (is_null($openinvoicedataLineItemNrNumberOfItems)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrNumberOfItems cannot be null'); + } + $this->container['openinvoicedataLineItemNrNumberOfItems'] = $openinvoicedataLineItemNrNumberOfItems; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrReturnShippingCompany + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrReturnShippingCompany() + { + return $this->container['openinvoicedataLineItemNrReturnShippingCompany']; + } + + /** + * Sets openinvoicedataLineItemNrReturnShippingCompany + * + * @param string|null $openinvoicedataLineItemNrReturnShippingCompany Name of the shipping company handling the the return shipment. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrReturnShippingCompany($openinvoicedataLineItemNrReturnShippingCompany) + { + if (is_null($openinvoicedataLineItemNrReturnShippingCompany)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrReturnShippingCompany cannot be null'); + } + $this->container['openinvoicedataLineItemNrReturnShippingCompany'] = $openinvoicedataLineItemNrReturnShippingCompany; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrReturnTrackingNumber + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrReturnTrackingNumber() + { + return $this->container['openinvoicedataLineItemNrReturnTrackingNumber']; + } + + /** + * Sets openinvoicedataLineItemNrReturnTrackingNumber + * + * @param string|null $openinvoicedataLineItemNrReturnTrackingNumber The tracking number for the return of the shipment. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrReturnTrackingNumber($openinvoicedataLineItemNrReturnTrackingNumber) + { + if (is_null($openinvoicedataLineItemNrReturnTrackingNumber)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrReturnTrackingNumber cannot be null'); + } + $this->container['openinvoicedataLineItemNrReturnTrackingNumber'] = $openinvoicedataLineItemNrReturnTrackingNumber; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrReturnTrackingUri + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrReturnTrackingUri() + { + return $this->container['openinvoicedataLineItemNrReturnTrackingUri']; + } + + /** + * Sets openinvoicedataLineItemNrReturnTrackingUri + * + * @param string|null $openinvoicedataLineItemNrReturnTrackingUri URI where the customer can track the return of their shipment. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrReturnTrackingUri($openinvoicedataLineItemNrReturnTrackingUri) + { + if (is_null($openinvoicedataLineItemNrReturnTrackingUri)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrReturnTrackingUri cannot be null'); + } + $this->container['openinvoicedataLineItemNrReturnTrackingUri'] = $openinvoicedataLineItemNrReturnTrackingUri; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrShippingCompany + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrShippingCompany() + { + return $this->container['openinvoicedataLineItemNrShippingCompany']; + } + + /** + * Sets openinvoicedataLineItemNrShippingCompany + * + * @param string|null $openinvoicedataLineItemNrShippingCompany Name of the shipping company handling the delivery. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrShippingCompany($openinvoicedataLineItemNrShippingCompany) + { + if (is_null($openinvoicedataLineItemNrShippingCompany)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrShippingCompany cannot be null'); + } + $this->container['openinvoicedataLineItemNrShippingCompany'] = $openinvoicedataLineItemNrShippingCompany; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrShippingMethod + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrShippingMethod() + { + return $this->container['openinvoicedataLineItemNrShippingMethod']; + } + + /** + * Sets openinvoicedataLineItemNrShippingMethod + * + * @param string|null $openinvoicedataLineItemNrShippingMethod Shipping method. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrShippingMethod($openinvoicedataLineItemNrShippingMethod) + { + if (is_null($openinvoicedataLineItemNrShippingMethod)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrShippingMethod cannot be null'); + } + $this->container['openinvoicedataLineItemNrShippingMethod'] = $openinvoicedataLineItemNrShippingMethod; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrTrackingNumber + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrTrackingNumber() + { + return $this->container['openinvoicedataLineItemNrTrackingNumber']; + } + + /** + * Sets openinvoicedataLineItemNrTrackingNumber + * + * @param string|null $openinvoicedataLineItemNrTrackingNumber The tracking number for the shipment. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrTrackingNumber($openinvoicedataLineItemNrTrackingNumber) + { + if (is_null($openinvoicedataLineItemNrTrackingNumber)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrTrackingNumber cannot be null'); + } + $this->container['openinvoicedataLineItemNrTrackingNumber'] = $openinvoicedataLineItemNrTrackingNumber; + + return $this; + } + + /** + * Gets openinvoicedataLineItemNrTrackingUri + * + * @return string|null + */ + public function getOpeninvoicedataLineItemNrTrackingUri() + { + return $this->container['openinvoicedataLineItemNrTrackingUri']; + } + + /** + * Sets openinvoicedataLineItemNrTrackingUri + * + * @param string|null $openinvoicedataLineItemNrTrackingUri URI where the customer can track their shipment. + * + * @return self + */ + public function setOpeninvoicedataLineItemNrTrackingUri($openinvoicedataLineItemNrTrackingUri) + { + if (is_null($openinvoicedataLineItemNrTrackingUri)) { + throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrTrackingUri cannot be null'); + } + $this->container['openinvoicedataLineItemNrTrackingUri'] = $openinvoicedataLineItemNrTrackingUri; + + 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/Payment/AdditionalDataOpi.php b/src/Adyen/Model/Payment/AdditionalDataOpi.php new file mode 100644 index 000000000..c7d783696 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataOpi.php @@ -0,0 +1,384 @@ + + */ +class AdditionalDataOpi implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataOpi'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'opiIncludeTransToken' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'opiIncludeTransToken' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'opiIncludeTransToken' => 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 = [ + 'opiIncludeTransToken' => 'opi.includeTransToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'opiIncludeTransToken' => 'setOpiIncludeTransToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'opiIncludeTransToken' => 'getOpiIncludeTransToken' + ]; + + /** + * 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('opiIncludeTransToken', $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 opiIncludeTransToken + * + * @return string|null + */ + public function getOpiIncludeTransToken() + { + return $this->container['opiIncludeTransToken']; + } + + /** + * Sets opiIncludeTransToken + * + * @param string|null $opiIncludeTransToken Optional boolean indicator. Set to **true** if you want an ecommerce transaction to return an `opi.transToken` as additional data in the response. You can store this Oracle Payment Interface token in your Oracle Opera database. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). + * + * @return self + */ + public function setOpiIncludeTransToken($opiIncludeTransToken) + { + if (is_null($opiIncludeTransToken)) { + throw new \InvalidArgumentException('non-nullable opiIncludeTransToken cannot be null'); + } + $this->container['opiIncludeTransToken'] = $opiIncludeTransToken; + + 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/Payment/AdditionalDataRatepay.php b/src/Adyen/Model/Payment/AdditionalDataRatepay.php new file mode 100644 index 000000000..17ca48e50 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataRatepay.php @@ -0,0 +1,622 @@ + + */ +class AdditionalDataRatepay implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataRatepay'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'ratepayInstallmentAmount' => 'string', + 'ratepayInterestRate' => 'string', + 'ratepayLastInstallmentAmount' => 'string', + 'ratepayPaymentFirstday' => 'string', + 'ratepaydataDeliveryDate' => 'string', + 'ratepaydataDueDate' => 'string', + 'ratepaydataInvoiceDate' => 'string', + 'ratepaydataInvoiceId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'ratepayInstallmentAmount' => null, + 'ratepayInterestRate' => null, + 'ratepayLastInstallmentAmount' => null, + 'ratepayPaymentFirstday' => null, + 'ratepaydataDeliveryDate' => null, + 'ratepaydataDueDate' => null, + 'ratepaydataInvoiceDate' => null, + 'ratepaydataInvoiceId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'ratepayInstallmentAmount' => false, + 'ratepayInterestRate' => false, + 'ratepayLastInstallmentAmount' => false, + 'ratepayPaymentFirstday' => false, + 'ratepaydataDeliveryDate' => false, + 'ratepaydataDueDate' => false, + 'ratepaydataInvoiceDate' => false, + 'ratepaydataInvoiceId' => 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 = [ + 'ratepayInstallmentAmount' => 'ratepay.installmentAmount', + 'ratepayInterestRate' => 'ratepay.interestRate', + 'ratepayLastInstallmentAmount' => 'ratepay.lastInstallmentAmount', + 'ratepayPaymentFirstday' => 'ratepay.paymentFirstday', + 'ratepaydataDeliveryDate' => 'ratepaydata.deliveryDate', + 'ratepaydataDueDate' => 'ratepaydata.dueDate', + 'ratepaydataInvoiceDate' => 'ratepaydata.invoiceDate', + 'ratepaydataInvoiceId' => 'ratepaydata.invoiceId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ratepayInstallmentAmount' => 'setRatepayInstallmentAmount', + 'ratepayInterestRate' => 'setRatepayInterestRate', + 'ratepayLastInstallmentAmount' => 'setRatepayLastInstallmentAmount', + 'ratepayPaymentFirstday' => 'setRatepayPaymentFirstday', + 'ratepaydataDeliveryDate' => 'setRatepaydataDeliveryDate', + 'ratepaydataDueDate' => 'setRatepaydataDueDate', + 'ratepaydataInvoiceDate' => 'setRatepaydataInvoiceDate', + 'ratepaydataInvoiceId' => 'setRatepaydataInvoiceId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ratepayInstallmentAmount' => 'getRatepayInstallmentAmount', + 'ratepayInterestRate' => 'getRatepayInterestRate', + 'ratepayLastInstallmentAmount' => 'getRatepayLastInstallmentAmount', + 'ratepayPaymentFirstday' => 'getRatepayPaymentFirstday', + 'ratepaydataDeliveryDate' => 'getRatepaydataDeliveryDate', + 'ratepaydataDueDate' => 'getRatepaydataDueDate', + 'ratepaydataInvoiceDate' => 'getRatepaydataInvoiceDate', + 'ratepaydataInvoiceId' => 'getRatepaydataInvoiceId' + ]; + + /** + * 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('ratepayInstallmentAmount', $data ?? [], null); + $this->setIfExists('ratepayInterestRate', $data ?? [], null); + $this->setIfExists('ratepayLastInstallmentAmount', $data ?? [], null); + $this->setIfExists('ratepayPaymentFirstday', $data ?? [], null); + $this->setIfExists('ratepaydataDeliveryDate', $data ?? [], null); + $this->setIfExists('ratepaydataDueDate', $data ?? [], null); + $this->setIfExists('ratepaydataInvoiceDate', $data ?? [], null); + $this->setIfExists('ratepaydataInvoiceId', $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 ratepayInstallmentAmount + * + * @return string|null + */ + public function getRatepayInstallmentAmount() + { + return $this->container['ratepayInstallmentAmount']; + } + + /** + * Sets ratepayInstallmentAmount + * + * @param string|null $ratepayInstallmentAmount Amount the customer has to pay each month. + * + * @return self + */ + public function setRatepayInstallmentAmount($ratepayInstallmentAmount) + { + if (is_null($ratepayInstallmentAmount)) { + throw new \InvalidArgumentException('non-nullable ratepayInstallmentAmount cannot be null'); + } + $this->container['ratepayInstallmentAmount'] = $ratepayInstallmentAmount; + + return $this; + } + + /** + * Gets ratepayInterestRate + * + * @return string|null + */ + public function getRatepayInterestRate() + { + return $this->container['ratepayInterestRate']; + } + + /** + * Sets ratepayInterestRate + * + * @param string|null $ratepayInterestRate Interest rate of this installment. + * + * @return self + */ + public function setRatepayInterestRate($ratepayInterestRate) + { + if (is_null($ratepayInterestRate)) { + throw new \InvalidArgumentException('non-nullable ratepayInterestRate cannot be null'); + } + $this->container['ratepayInterestRate'] = $ratepayInterestRate; + + return $this; + } + + /** + * Gets ratepayLastInstallmentAmount + * + * @return string|null + */ + public function getRatepayLastInstallmentAmount() + { + return $this->container['ratepayLastInstallmentAmount']; + } + + /** + * Sets ratepayLastInstallmentAmount + * + * @param string|null $ratepayLastInstallmentAmount Amount of the last installment. + * + * @return self + */ + public function setRatepayLastInstallmentAmount($ratepayLastInstallmentAmount) + { + if (is_null($ratepayLastInstallmentAmount)) { + throw new \InvalidArgumentException('non-nullable ratepayLastInstallmentAmount cannot be null'); + } + $this->container['ratepayLastInstallmentAmount'] = $ratepayLastInstallmentAmount; + + return $this; + } + + /** + * Gets ratepayPaymentFirstday + * + * @return string|null + */ + public function getRatepayPaymentFirstday() + { + return $this->container['ratepayPaymentFirstday']; + } + + /** + * Sets ratepayPaymentFirstday + * + * @param string|null $ratepayPaymentFirstday Calendar day of the first payment. + * + * @return self + */ + public function setRatepayPaymentFirstday($ratepayPaymentFirstday) + { + if (is_null($ratepayPaymentFirstday)) { + throw new \InvalidArgumentException('non-nullable ratepayPaymentFirstday cannot be null'); + } + $this->container['ratepayPaymentFirstday'] = $ratepayPaymentFirstday; + + return $this; + } + + /** + * Gets ratepaydataDeliveryDate + * + * @return string|null + */ + public function getRatepaydataDeliveryDate() + { + return $this->container['ratepaydataDeliveryDate']; + } + + /** + * Sets ratepaydataDeliveryDate + * + * @param string|null $ratepaydataDeliveryDate Date the merchant delivered the goods to the customer. + * + * @return self + */ + public function setRatepaydataDeliveryDate($ratepaydataDeliveryDate) + { + if (is_null($ratepaydataDeliveryDate)) { + throw new \InvalidArgumentException('non-nullable ratepaydataDeliveryDate cannot be null'); + } + $this->container['ratepaydataDeliveryDate'] = $ratepaydataDeliveryDate; + + return $this; + } + + /** + * Gets ratepaydataDueDate + * + * @return string|null + */ + public function getRatepaydataDueDate() + { + return $this->container['ratepaydataDueDate']; + } + + /** + * Sets ratepaydataDueDate + * + * @param string|null $ratepaydataDueDate Date by which the customer must settle the payment. + * + * @return self + */ + public function setRatepaydataDueDate($ratepaydataDueDate) + { + if (is_null($ratepaydataDueDate)) { + throw new \InvalidArgumentException('non-nullable ratepaydataDueDate cannot be null'); + } + $this->container['ratepaydataDueDate'] = $ratepaydataDueDate; + + return $this; + } + + /** + * Gets ratepaydataInvoiceDate + * + * @return string|null + */ + public function getRatepaydataInvoiceDate() + { + return $this->container['ratepaydataInvoiceDate']; + } + + /** + * Sets ratepaydataInvoiceDate + * + * @param string|null $ratepaydataInvoiceDate Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date. + * + * @return self + */ + public function setRatepaydataInvoiceDate($ratepaydataInvoiceDate) + { + if (is_null($ratepaydataInvoiceDate)) { + throw new \InvalidArgumentException('non-nullable ratepaydataInvoiceDate cannot be null'); + } + $this->container['ratepaydataInvoiceDate'] = $ratepaydataInvoiceDate; + + return $this; + } + + /** + * Gets ratepaydataInvoiceId + * + * @return string|null + */ + public function getRatepaydataInvoiceId() + { + return $this->container['ratepaydataInvoiceId']; + } + + /** + * Sets ratepaydataInvoiceId + * + * @param string|null $ratepaydataInvoiceId Identification name or number for the invoice, defined by the merchant. + * + * @return self + */ + public function setRatepaydataInvoiceId($ratepaydataInvoiceId) + { + if (is_null($ratepaydataInvoiceId)) { + throw new \InvalidArgumentException('non-nullable ratepaydataInvoiceId cannot be null'); + } + $this->container['ratepaydataInvoiceId'] = $ratepaydataInvoiceId; + + 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/Payment/AdditionalDataRetry.php b/src/Adyen/Model/Payment/AdditionalDataRetry.php new file mode 100644 index 000000000..a7c9cb594 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataRetry.php @@ -0,0 +1,452 @@ + + */ +class AdditionalDataRetry implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataRetry'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'retryChainAttemptNumber' => 'string', + 'retryOrderAttemptNumber' => 'string', + 'retrySkipRetry' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'retryChainAttemptNumber' => null, + 'retryOrderAttemptNumber' => null, + 'retrySkipRetry' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'retryChainAttemptNumber' => false, + 'retryOrderAttemptNumber' => false, + 'retrySkipRetry' => 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 = [ + 'retryChainAttemptNumber' => 'retry.chainAttemptNumber', + 'retryOrderAttemptNumber' => 'retry.orderAttemptNumber', + 'retrySkipRetry' => 'retry.skipRetry' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'retryChainAttemptNumber' => 'setRetryChainAttemptNumber', + 'retryOrderAttemptNumber' => 'setRetryOrderAttemptNumber', + 'retrySkipRetry' => 'setRetrySkipRetry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'retryChainAttemptNumber' => 'getRetryChainAttemptNumber', + 'retryOrderAttemptNumber' => 'getRetryOrderAttemptNumber', + 'retrySkipRetry' => 'getRetrySkipRetry' + ]; + + /** + * 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('retryChainAttemptNumber', $data ?? [], null); + $this->setIfExists('retryOrderAttemptNumber', $data ?? [], null); + $this->setIfExists('retrySkipRetry', $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 retryChainAttemptNumber + * + * @return string|null + */ + public function getRetryChainAttemptNumber() + { + return $this->container['retryChainAttemptNumber']; + } + + /** + * Sets retryChainAttemptNumber + * + * @param string|null $retryChainAttemptNumber The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. + * + * @return self + */ + public function setRetryChainAttemptNumber($retryChainAttemptNumber) + { + if (is_null($retryChainAttemptNumber)) { + throw new \InvalidArgumentException('non-nullable retryChainAttemptNumber cannot be null'); + } + $this->container['retryChainAttemptNumber'] = $retryChainAttemptNumber; + + return $this; + } + + /** + * Gets retryOrderAttemptNumber + * + * @return string|null + */ + public function getRetryOrderAttemptNumber() + { + return $this->container['retryOrderAttemptNumber']; + } + + /** + * Sets retryOrderAttemptNumber + * + * @param string|null $retryOrderAttemptNumber The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. + * + * @return self + */ + public function setRetryOrderAttemptNumber($retryOrderAttemptNumber) + { + if (is_null($retryOrderAttemptNumber)) { + throw new \InvalidArgumentException('non-nullable retryOrderAttemptNumber cannot be null'); + } + $this->container['retryOrderAttemptNumber'] = $retryOrderAttemptNumber; + + return $this; + } + + /** + * Gets retrySkipRetry + * + * @return string|null + */ + public function getRetrySkipRetry() + { + return $this->container['retrySkipRetry']; + } + + /** + * Sets retrySkipRetry + * + * @param string|null $retrySkipRetry The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. + * + * @return self + */ + public function setRetrySkipRetry($retrySkipRetry) + { + if (is_null($retrySkipRetry)) { + throw new \InvalidArgumentException('non-nullable retrySkipRetry cannot be null'); + } + $this->container['retrySkipRetry'] = $retrySkipRetry; + + 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/Payment/AdditionalDataRisk.php b/src/Adyen/Model/Payment/AdditionalDataRisk.php new file mode 100644 index 000000000..7793393ed --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataRisk.php @@ -0,0 +1,1064 @@ + + */ +class AdditionalDataRisk implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataRisk'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'riskdataCustomFieldName' => 'string', + 'riskdataBasketItemItemNrAmountPerItem' => 'string', + 'riskdataBasketItemItemNrBrand' => 'string', + 'riskdataBasketItemItemNrCategory' => 'string', + 'riskdataBasketItemItemNrColor' => 'string', + 'riskdataBasketItemItemNrCurrency' => 'string', + 'riskdataBasketItemItemNrItemID' => 'string', + 'riskdataBasketItemItemNrManufacturer' => 'string', + 'riskdataBasketItemItemNrProductTitle' => 'string', + 'riskdataBasketItemItemNrQuantity' => 'string', + 'riskdataBasketItemItemNrReceiverEmail' => 'string', + 'riskdataBasketItemItemNrSize' => 'string', + 'riskdataBasketItemItemNrSku' => 'string', + 'riskdataBasketItemItemNrUpc' => 'string', + 'riskdataPromotionsPromotionItemNrPromotionCode' => 'string', + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount' => 'string', + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency' => 'string', + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage' => 'string', + 'riskdataPromotionsPromotionItemNrPromotionName' => 'string', + 'riskdataRiskProfileReference' => 'string', + 'riskdataSkipRisk' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'riskdataCustomFieldName' => null, + 'riskdataBasketItemItemNrAmountPerItem' => null, + 'riskdataBasketItemItemNrBrand' => null, + 'riskdataBasketItemItemNrCategory' => null, + 'riskdataBasketItemItemNrColor' => null, + 'riskdataBasketItemItemNrCurrency' => null, + 'riskdataBasketItemItemNrItemID' => null, + 'riskdataBasketItemItemNrManufacturer' => null, + 'riskdataBasketItemItemNrProductTitle' => null, + 'riskdataBasketItemItemNrQuantity' => null, + 'riskdataBasketItemItemNrReceiverEmail' => null, + 'riskdataBasketItemItemNrSize' => null, + 'riskdataBasketItemItemNrSku' => null, + 'riskdataBasketItemItemNrUpc' => null, + 'riskdataPromotionsPromotionItemNrPromotionCode' => null, + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount' => null, + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency' => null, + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage' => null, + 'riskdataPromotionsPromotionItemNrPromotionName' => null, + 'riskdataRiskProfileReference' => null, + 'riskdataSkipRisk' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'riskdataCustomFieldName' => false, + 'riskdataBasketItemItemNrAmountPerItem' => false, + 'riskdataBasketItemItemNrBrand' => false, + 'riskdataBasketItemItemNrCategory' => false, + 'riskdataBasketItemItemNrColor' => false, + 'riskdataBasketItemItemNrCurrency' => false, + 'riskdataBasketItemItemNrItemID' => false, + 'riskdataBasketItemItemNrManufacturer' => false, + 'riskdataBasketItemItemNrProductTitle' => false, + 'riskdataBasketItemItemNrQuantity' => false, + 'riskdataBasketItemItemNrReceiverEmail' => false, + 'riskdataBasketItemItemNrSize' => false, + 'riskdataBasketItemItemNrSku' => false, + 'riskdataBasketItemItemNrUpc' => false, + 'riskdataPromotionsPromotionItemNrPromotionCode' => false, + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount' => false, + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency' => false, + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage' => false, + 'riskdataPromotionsPromotionItemNrPromotionName' => false, + 'riskdataRiskProfileReference' => false, + 'riskdataSkipRisk' => 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 = [ + 'riskdataCustomFieldName' => 'riskdata.[customFieldName]', + 'riskdataBasketItemItemNrAmountPerItem' => 'riskdata.basket.item[itemNr].amountPerItem', + 'riskdataBasketItemItemNrBrand' => 'riskdata.basket.item[itemNr].brand', + 'riskdataBasketItemItemNrCategory' => 'riskdata.basket.item[itemNr].category', + 'riskdataBasketItemItemNrColor' => 'riskdata.basket.item[itemNr].color', + 'riskdataBasketItemItemNrCurrency' => 'riskdata.basket.item[itemNr].currency', + 'riskdataBasketItemItemNrItemID' => 'riskdata.basket.item[itemNr].itemID', + 'riskdataBasketItemItemNrManufacturer' => 'riskdata.basket.item[itemNr].manufacturer', + 'riskdataBasketItemItemNrProductTitle' => 'riskdata.basket.item[itemNr].productTitle', + 'riskdataBasketItemItemNrQuantity' => 'riskdata.basket.item[itemNr].quantity', + 'riskdataBasketItemItemNrReceiverEmail' => 'riskdata.basket.item[itemNr].receiverEmail', + 'riskdataBasketItemItemNrSize' => 'riskdata.basket.item[itemNr].size', + 'riskdataBasketItemItemNrSku' => 'riskdata.basket.item[itemNr].sku', + 'riskdataBasketItemItemNrUpc' => 'riskdata.basket.item[itemNr].upc', + 'riskdataPromotionsPromotionItemNrPromotionCode' => 'riskdata.promotions.promotion[itemNr].promotionCode', + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount' => 'riskdata.promotions.promotion[itemNr].promotionDiscountAmount', + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency' => 'riskdata.promotions.promotion[itemNr].promotionDiscountCurrency', + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage' => 'riskdata.promotions.promotion[itemNr].promotionDiscountPercentage', + 'riskdataPromotionsPromotionItemNrPromotionName' => 'riskdata.promotions.promotion[itemNr].promotionName', + 'riskdataRiskProfileReference' => 'riskdata.riskProfileReference', + 'riskdataSkipRisk' => 'riskdata.skipRisk' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'riskdataCustomFieldName' => 'setRiskdataCustomFieldName', + 'riskdataBasketItemItemNrAmountPerItem' => 'setRiskdataBasketItemItemNrAmountPerItem', + 'riskdataBasketItemItemNrBrand' => 'setRiskdataBasketItemItemNrBrand', + 'riskdataBasketItemItemNrCategory' => 'setRiskdataBasketItemItemNrCategory', + 'riskdataBasketItemItemNrColor' => 'setRiskdataBasketItemItemNrColor', + 'riskdataBasketItemItemNrCurrency' => 'setRiskdataBasketItemItemNrCurrency', + 'riskdataBasketItemItemNrItemID' => 'setRiskdataBasketItemItemNrItemID', + 'riskdataBasketItemItemNrManufacturer' => 'setRiskdataBasketItemItemNrManufacturer', + 'riskdataBasketItemItemNrProductTitle' => 'setRiskdataBasketItemItemNrProductTitle', + 'riskdataBasketItemItemNrQuantity' => 'setRiskdataBasketItemItemNrQuantity', + 'riskdataBasketItemItemNrReceiverEmail' => 'setRiskdataBasketItemItemNrReceiverEmail', + 'riskdataBasketItemItemNrSize' => 'setRiskdataBasketItemItemNrSize', + 'riskdataBasketItemItemNrSku' => 'setRiskdataBasketItemItemNrSku', + 'riskdataBasketItemItemNrUpc' => 'setRiskdataBasketItemItemNrUpc', + 'riskdataPromotionsPromotionItemNrPromotionCode' => 'setRiskdataPromotionsPromotionItemNrPromotionCode', + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount' => 'setRiskdataPromotionsPromotionItemNrPromotionDiscountAmount', + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency' => 'setRiskdataPromotionsPromotionItemNrPromotionDiscountCurrency', + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage' => 'setRiskdataPromotionsPromotionItemNrPromotionDiscountPercentage', + 'riskdataPromotionsPromotionItemNrPromotionName' => 'setRiskdataPromotionsPromotionItemNrPromotionName', + 'riskdataRiskProfileReference' => 'setRiskdataRiskProfileReference', + 'riskdataSkipRisk' => 'setRiskdataSkipRisk' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'riskdataCustomFieldName' => 'getRiskdataCustomFieldName', + 'riskdataBasketItemItemNrAmountPerItem' => 'getRiskdataBasketItemItemNrAmountPerItem', + 'riskdataBasketItemItemNrBrand' => 'getRiskdataBasketItemItemNrBrand', + 'riskdataBasketItemItemNrCategory' => 'getRiskdataBasketItemItemNrCategory', + 'riskdataBasketItemItemNrColor' => 'getRiskdataBasketItemItemNrColor', + 'riskdataBasketItemItemNrCurrency' => 'getRiskdataBasketItemItemNrCurrency', + 'riskdataBasketItemItemNrItemID' => 'getRiskdataBasketItemItemNrItemID', + 'riskdataBasketItemItemNrManufacturer' => 'getRiskdataBasketItemItemNrManufacturer', + 'riskdataBasketItemItemNrProductTitle' => 'getRiskdataBasketItemItemNrProductTitle', + 'riskdataBasketItemItemNrQuantity' => 'getRiskdataBasketItemItemNrQuantity', + 'riskdataBasketItemItemNrReceiverEmail' => 'getRiskdataBasketItemItemNrReceiverEmail', + 'riskdataBasketItemItemNrSize' => 'getRiskdataBasketItemItemNrSize', + 'riskdataBasketItemItemNrSku' => 'getRiskdataBasketItemItemNrSku', + 'riskdataBasketItemItemNrUpc' => 'getRiskdataBasketItemItemNrUpc', + 'riskdataPromotionsPromotionItemNrPromotionCode' => 'getRiskdataPromotionsPromotionItemNrPromotionCode', + 'riskdataPromotionsPromotionItemNrPromotionDiscountAmount' => 'getRiskdataPromotionsPromotionItemNrPromotionDiscountAmount', + 'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency' => 'getRiskdataPromotionsPromotionItemNrPromotionDiscountCurrency', + 'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage' => 'getRiskdataPromotionsPromotionItemNrPromotionDiscountPercentage', + 'riskdataPromotionsPromotionItemNrPromotionName' => 'getRiskdataPromotionsPromotionItemNrPromotionName', + 'riskdataRiskProfileReference' => 'getRiskdataRiskProfileReference', + 'riskdataSkipRisk' => 'getRiskdataSkipRisk' + ]; + + /** + * 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('riskdataCustomFieldName', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrAmountPerItem', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrBrand', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrCategory', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrColor', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrCurrency', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrItemID', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrManufacturer', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrProductTitle', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrQuantity', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrReceiverEmail', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrSize', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrSku', $data ?? [], null); + $this->setIfExists('riskdataBasketItemItemNrUpc', $data ?? [], null); + $this->setIfExists('riskdataPromotionsPromotionItemNrPromotionCode', $data ?? [], null); + $this->setIfExists('riskdataPromotionsPromotionItemNrPromotionDiscountAmount', $data ?? [], null); + $this->setIfExists('riskdataPromotionsPromotionItemNrPromotionDiscountCurrency', $data ?? [], null); + $this->setIfExists('riskdataPromotionsPromotionItemNrPromotionDiscountPercentage', $data ?? [], null); + $this->setIfExists('riskdataPromotionsPromotionItemNrPromotionName', $data ?? [], null); + $this->setIfExists('riskdataRiskProfileReference', $data ?? [], null); + $this->setIfExists('riskdataSkipRisk', $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 riskdataCustomFieldName + * + * @return string|null + */ + public function getRiskdataCustomFieldName() + { + return $this->container['riskdataCustomFieldName']; + } + + /** + * Sets riskdataCustomFieldName + * + * @param string|null $riskdataCustomFieldName The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields). + * + * @return self + */ + public function setRiskdataCustomFieldName($riskdataCustomFieldName) + { + if (is_null($riskdataCustomFieldName)) { + throw new \InvalidArgumentException('non-nullable riskdataCustomFieldName cannot be null'); + } + $this->container['riskdataCustomFieldName'] = $riskdataCustomFieldName; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrAmountPerItem + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrAmountPerItem() + { + return $this->container['riskdataBasketItemItemNrAmountPerItem']; + } + + /** + * Sets riskdataBasketItemItemNrAmountPerItem + * + * @param string|null $riskdataBasketItemItemNrAmountPerItem The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setRiskdataBasketItemItemNrAmountPerItem($riskdataBasketItemItemNrAmountPerItem) + { + if (is_null($riskdataBasketItemItemNrAmountPerItem)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrAmountPerItem cannot be null'); + } + $this->container['riskdataBasketItemItemNrAmountPerItem'] = $riskdataBasketItemItemNrAmountPerItem; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrBrand + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrBrand() + { + return $this->container['riskdataBasketItemItemNrBrand']; + } + + /** + * Sets riskdataBasketItemItemNrBrand + * + * @param string|null $riskdataBasketItemItemNrBrand Brand of the item. + * + * @return self + */ + public function setRiskdataBasketItemItemNrBrand($riskdataBasketItemItemNrBrand) + { + if (is_null($riskdataBasketItemItemNrBrand)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrBrand cannot be null'); + } + $this->container['riskdataBasketItemItemNrBrand'] = $riskdataBasketItemItemNrBrand; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrCategory + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrCategory() + { + return $this->container['riskdataBasketItemItemNrCategory']; + } + + /** + * Sets riskdataBasketItemItemNrCategory + * + * @param string|null $riskdataBasketItemItemNrCategory Category of the item. + * + * @return self + */ + public function setRiskdataBasketItemItemNrCategory($riskdataBasketItemItemNrCategory) + { + if (is_null($riskdataBasketItemItemNrCategory)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrCategory cannot be null'); + } + $this->container['riskdataBasketItemItemNrCategory'] = $riskdataBasketItemItemNrCategory; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrColor + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrColor() + { + return $this->container['riskdataBasketItemItemNrColor']; + } + + /** + * Sets riskdataBasketItemItemNrColor + * + * @param string|null $riskdataBasketItemItemNrColor Color of the item. + * + * @return self + */ + public function setRiskdataBasketItemItemNrColor($riskdataBasketItemItemNrColor) + { + if (is_null($riskdataBasketItemItemNrColor)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrColor cannot be null'); + } + $this->container['riskdataBasketItemItemNrColor'] = $riskdataBasketItemItemNrColor; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrCurrency + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrCurrency() + { + return $this->container['riskdataBasketItemItemNrCurrency']; + } + + /** + * Sets riskdataBasketItemItemNrCurrency + * + * @param string|null $riskdataBasketItemItemNrCurrency The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + * + * @return self + */ + public function setRiskdataBasketItemItemNrCurrency($riskdataBasketItemItemNrCurrency) + { + if (is_null($riskdataBasketItemItemNrCurrency)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrCurrency cannot be null'); + } + $this->container['riskdataBasketItemItemNrCurrency'] = $riskdataBasketItemItemNrCurrency; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrItemID + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrItemID() + { + return $this->container['riskdataBasketItemItemNrItemID']; + } + + /** + * Sets riskdataBasketItemItemNrItemID + * + * @param string|null $riskdataBasketItemItemNrItemID ID of the item. + * + * @return self + */ + public function setRiskdataBasketItemItemNrItemID($riskdataBasketItemItemNrItemID) + { + if (is_null($riskdataBasketItemItemNrItemID)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrItemID cannot be null'); + } + $this->container['riskdataBasketItemItemNrItemID'] = $riskdataBasketItemItemNrItemID; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrManufacturer + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrManufacturer() + { + return $this->container['riskdataBasketItemItemNrManufacturer']; + } + + /** + * Sets riskdataBasketItemItemNrManufacturer + * + * @param string|null $riskdataBasketItemItemNrManufacturer Manufacturer of the item. + * + * @return self + */ + public function setRiskdataBasketItemItemNrManufacturer($riskdataBasketItemItemNrManufacturer) + { + if (is_null($riskdataBasketItemItemNrManufacturer)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrManufacturer cannot be null'); + } + $this->container['riskdataBasketItemItemNrManufacturer'] = $riskdataBasketItemItemNrManufacturer; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrProductTitle + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrProductTitle() + { + return $this->container['riskdataBasketItemItemNrProductTitle']; + } + + /** + * Sets riskdataBasketItemItemNrProductTitle + * + * @param string|null $riskdataBasketItemItemNrProductTitle A text description of the product the invoice line refers to. + * + * @return self + */ + public function setRiskdataBasketItemItemNrProductTitle($riskdataBasketItemItemNrProductTitle) + { + if (is_null($riskdataBasketItemItemNrProductTitle)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrProductTitle cannot be null'); + } + $this->container['riskdataBasketItemItemNrProductTitle'] = $riskdataBasketItemItemNrProductTitle; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrQuantity + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrQuantity() + { + return $this->container['riskdataBasketItemItemNrQuantity']; + } + + /** + * Sets riskdataBasketItemItemNrQuantity + * + * @param string|null $riskdataBasketItemItemNrQuantity Quantity of the item purchased. + * + * @return self + */ + public function setRiskdataBasketItemItemNrQuantity($riskdataBasketItemItemNrQuantity) + { + if (is_null($riskdataBasketItemItemNrQuantity)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrQuantity cannot be null'); + } + $this->container['riskdataBasketItemItemNrQuantity'] = $riskdataBasketItemItemNrQuantity; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrReceiverEmail + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrReceiverEmail() + { + return $this->container['riskdataBasketItemItemNrReceiverEmail']; + } + + /** + * Sets riskdataBasketItemItemNrReceiverEmail + * + * @param string|null $riskdataBasketItemItemNrReceiverEmail Email associated with the given product in the basket (usually in electronic gift cards). + * + * @return self + */ + public function setRiskdataBasketItemItemNrReceiverEmail($riskdataBasketItemItemNrReceiverEmail) + { + if (is_null($riskdataBasketItemItemNrReceiverEmail)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrReceiverEmail cannot be null'); + } + $this->container['riskdataBasketItemItemNrReceiverEmail'] = $riskdataBasketItemItemNrReceiverEmail; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrSize + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrSize() + { + return $this->container['riskdataBasketItemItemNrSize']; + } + + /** + * Sets riskdataBasketItemItemNrSize + * + * @param string|null $riskdataBasketItemItemNrSize Size of the item. + * + * @return self + */ + public function setRiskdataBasketItemItemNrSize($riskdataBasketItemItemNrSize) + { + if (is_null($riskdataBasketItemItemNrSize)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrSize cannot be null'); + } + $this->container['riskdataBasketItemItemNrSize'] = $riskdataBasketItemItemNrSize; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrSku + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrSku() + { + return $this->container['riskdataBasketItemItemNrSku']; + } + + /** + * Sets riskdataBasketItemItemNrSku + * + * @param string|null $riskdataBasketItemItemNrSku [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit). + * + * @return self + */ + public function setRiskdataBasketItemItemNrSku($riskdataBasketItemItemNrSku) + { + if (is_null($riskdataBasketItemItemNrSku)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrSku cannot be null'); + } + $this->container['riskdataBasketItemItemNrSku'] = $riskdataBasketItemItemNrSku; + + return $this; + } + + /** + * Gets riskdataBasketItemItemNrUpc + * + * @return string|null + */ + public function getRiskdataBasketItemItemNrUpc() + { + return $this->container['riskdataBasketItemItemNrUpc']; + } + + /** + * Sets riskdataBasketItemItemNrUpc + * + * @param string|null $riskdataBasketItemItemNrUpc [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code). + * + * @return self + */ + public function setRiskdataBasketItemItemNrUpc($riskdataBasketItemItemNrUpc) + { + if (is_null($riskdataBasketItemItemNrUpc)) { + throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrUpc cannot be null'); + } + $this->container['riskdataBasketItemItemNrUpc'] = $riskdataBasketItemItemNrUpc; + + return $this; + } + + /** + * Gets riskdataPromotionsPromotionItemNrPromotionCode + * + * @return string|null + */ + public function getRiskdataPromotionsPromotionItemNrPromotionCode() + { + return $this->container['riskdataPromotionsPromotionItemNrPromotionCode']; + } + + /** + * Sets riskdataPromotionsPromotionItemNrPromotionCode + * + * @param string|null $riskdataPromotionsPromotionItemNrPromotionCode Code of the promotion. + * + * @return self + */ + public function setRiskdataPromotionsPromotionItemNrPromotionCode($riskdataPromotionsPromotionItemNrPromotionCode) + { + if (is_null($riskdataPromotionsPromotionItemNrPromotionCode)) { + throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionCode cannot be null'); + } + $this->container['riskdataPromotionsPromotionItemNrPromotionCode'] = $riskdataPromotionsPromotionItemNrPromotionCode; + + return $this; + } + + /** + * Gets riskdataPromotionsPromotionItemNrPromotionDiscountAmount + * + * @return string|null + */ + public function getRiskdataPromotionsPromotionItemNrPromotionDiscountAmount() + { + return $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountAmount']; + } + + /** + * Sets riskdataPromotionsPromotionItemNrPromotionDiscountAmount + * + * @param string|null $riskdataPromotionsPromotionItemNrPromotionDiscountAmount The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setRiskdataPromotionsPromotionItemNrPromotionDiscountAmount($riskdataPromotionsPromotionItemNrPromotionDiscountAmount) + { + if (is_null($riskdataPromotionsPromotionItemNrPromotionDiscountAmount)) { + throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionDiscountAmount cannot be null'); + } + $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountAmount'] = $riskdataPromotionsPromotionItemNrPromotionDiscountAmount; + + return $this; + } + + /** + * Gets riskdataPromotionsPromotionItemNrPromotionDiscountCurrency + * + * @return string|null + */ + public function getRiskdataPromotionsPromotionItemNrPromotionDiscountCurrency() + { + return $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountCurrency']; + } + + /** + * Sets riskdataPromotionsPromotionItemNrPromotionDiscountCurrency + * + * @param string|null $riskdataPromotionsPromotionItemNrPromotionDiscountCurrency The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + * + * @return self + */ + public function setRiskdataPromotionsPromotionItemNrPromotionDiscountCurrency($riskdataPromotionsPromotionItemNrPromotionDiscountCurrency) + { + if (is_null($riskdataPromotionsPromotionItemNrPromotionDiscountCurrency)) { + throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionDiscountCurrency cannot be null'); + } + $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountCurrency'] = $riskdataPromotionsPromotionItemNrPromotionDiscountCurrency; + + return $this; + } + + /** + * Gets riskdataPromotionsPromotionItemNrPromotionDiscountPercentage + * + * @return string|null + */ + public function getRiskdataPromotionsPromotionItemNrPromotionDiscountPercentage() + { + return $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountPercentage']; + } + + /** + * Sets riskdataPromotionsPromotionItemNrPromotionDiscountPercentage + * + * @param string|null $riskdataPromotionsPromotionItemNrPromotionDiscountPercentage Promotion's percentage discount. It is represented in percentage value and there is no need to include the '%' sign. e.g. for a promotion discount of 30%, the value of the field should be 30. + * + * @return self + */ + public function setRiskdataPromotionsPromotionItemNrPromotionDiscountPercentage($riskdataPromotionsPromotionItemNrPromotionDiscountPercentage) + { + if (is_null($riskdataPromotionsPromotionItemNrPromotionDiscountPercentage)) { + throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionDiscountPercentage cannot be null'); + } + $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountPercentage'] = $riskdataPromotionsPromotionItemNrPromotionDiscountPercentage; + + return $this; + } + + /** + * Gets riskdataPromotionsPromotionItemNrPromotionName + * + * @return string|null + */ + public function getRiskdataPromotionsPromotionItemNrPromotionName() + { + return $this->container['riskdataPromotionsPromotionItemNrPromotionName']; + } + + /** + * Sets riskdataPromotionsPromotionItemNrPromotionName + * + * @param string|null $riskdataPromotionsPromotionItemNrPromotionName Name of the promotion. + * + * @return self + */ + public function setRiskdataPromotionsPromotionItemNrPromotionName($riskdataPromotionsPromotionItemNrPromotionName) + { + if (is_null($riskdataPromotionsPromotionItemNrPromotionName)) { + throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionName cannot be null'); + } + $this->container['riskdataPromotionsPromotionItemNrPromotionName'] = $riskdataPromotionsPromotionItemNrPromotionName; + + return $this; + } + + /** + * Gets riskdataRiskProfileReference + * + * @return string|null + */ + public function getRiskdataRiskProfileReference() + { + return $this->container['riskdataRiskProfileReference']; + } + + /** + * Sets riskdataRiskProfileReference + * + * @param string|null $riskdataRiskProfileReference Reference number of the risk profile that you want to apply to the payment. If not provided or left blank, the merchant-level account's default risk profile will be applied to the payment. For more information, see [dynamically assign a risk profile to a payment](https://docs.adyen.com/risk-management/create-and-use-risk-profiles#dynamically-assign-a-risk-profile-to-a-payment). + * + * @return self + */ + public function setRiskdataRiskProfileReference($riskdataRiskProfileReference) + { + if (is_null($riskdataRiskProfileReference)) { + throw new \InvalidArgumentException('non-nullable riskdataRiskProfileReference cannot be null'); + } + $this->container['riskdataRiskProfileReference'] = $riskdataRiskProfileReference; + + return $this; + } + + /** + * Gets riskdataSkipRisk + * + * @return string|null + */ + public function getRiskdataSkipRisk() + { + return $this->container['riskdataSkipRisk']; + } + + /** + * Sets riskdataSkipRisk + * + * @param string|null $riskdataSkipRisk If this parameter is provided with the value **true**, risk checks for the payment request are skipped and the transaction will not get a risk score. + * + * @return self + */ + public function setRiskdataSkipRisk($riskdataSkipRisk) + { + if (is_null($riskdataSkipRisk)) { + throw new \InvalidArgumentException('non-nullable riskdataSkipRisk cannot be null'); + } + $this->container['riskdataSkipRisk'] = $riskdataSkipRisk; + + 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/Payment/AdditionalDataRiskStandalone.php b/src/Adyen/Model/Payment/AdditionalDataRiskStandalone.php new file mode 100644 index 000000000..de1772cb8 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataRiskStandalone.php @@ -0,0 +1,860 @@ + + */ +class AdditionalDataRiskStandalone implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataRiskStandalone'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'payPalCountryCode' => 'string', + 'payPalEmailId' => 'string', + 'payPalFirstName' => 'string', + 'payPalLastName' => 'string', + 'payPalPayerId' => 'string', + 'payPalPhone' => 'string', + 'payPalProtectionEligibility' => 'string', + 'payPalTransactionId' => 'string', + 'avsResultRaw' => 'string', + 'bin' => 'string', + 'cvcResultRaw' => 'string', + 'riskToken' => 'string', + 'threeDAuthenticated' => 'string', + 'threeDOffered' => 'string', + 'tokenDataType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'payPalCountryCode' => null, + 'payPalEmailId' => null, + 'payPalFirstName' => null, + 'payPalLastName' => null, + 'payPalPayerId' => null, + 'payPalPhone' => null, + 'payPalProtectionEligibility' => null, + 'payPalTransactionId' => null, + 'avsResultRaw' => null, + 'bin' => null, + 'cvcResultRaw' => null, + 'riskToken' => null, + 'threeDAuthenticated' => null, + 'threeDOffered' => null, + 'tokenDataType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'payPalCountryCode' => false, + 'payPalEmailId' => false, + 'payPalFirstName' => false, + 'payPalLastName' => false, + 'payPalPayerId' => false, + 'payPalPhone' => false, + 'payPalProtectionEligibility' => false, + 'payPalTransactionId' => false, + 'avsResultRaw' => false, + 'bin' => false, + 'cvcResultRaw' => false, + 'riskToken' => false, + 'threeDAuthenticated' => false, + 'threeDOffered' => false, + 'tokenDataType' => 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 = [ + 'payPalCountryCode' => 'PayPal.CountryCode', + 'payPalEmailId' => 'PayPal.EmailId', + 'payPalFirstName' => 'PayPal.FirstName', + 'payPalLastName' => 'PayPal.LastName', + 'payPalPayerId' => 'PayPal.PayerId', + 'payPalPhone' => 'PayPal.Phone', + 'payPalProtectionEligibility' => 'PayPal.ProtectionEligibility', + 'payPalTransactionId' => 'PayPal.TransactionId', + 'avsResultRaw' => 'avsResultRaw', + 'bin' => 'bin', + 'cvcResultRaw' => 'cvcResultRaw', + 'riskToken' => 'riskToken', + 'threeDAuthenticated' => 'threeDAuthenticated', + 'threeDOffered' => 'threeDOffered', + 'tokenDataType' => 'tokenDataType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'payPalCountryCode' => 'setPayPalCountryCode', + 'payPalEmailId' => 'setPayPalEmailId', + 'payPalFirstName' => 'setPayPalFirstName', + 'payPalLastName' => 'setPayPalLastName', + 'payPalPayerId' => 'setPayPalPayerId', + 'payPalPhone' => 'setPayPalPhone', + 'payPalProtectionEligibility' => 'setPayPalProtectionEligibility', + 'payPalTransactionId' => 'setPayPalTransactionId', + 'avsResultRaw' => 'setAvsResultRaw', + 'bin' => 'setBin', + 'cvcResultRaw' => 'setCvcResultRaw', + 'riskToken' => 'setRiskToken', + 'threeDAuthenticated' => 'setThreeDAuthenticated', + 'threeDOffered' => 'setThreeDOffered', + 'tokenDataType' => 'setTokenDataType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'payPalCountryCode' => 'getPayPalCountryCode', + 'payPalEmailId' => 'getPayPalEmailId', + 'payPalFirstName' => 'getPayPalFirstName', + 'payPalLastName' => 'getPayPalLastName', + 'payPalPayerId' => 'getPayPalPayerId', + 'payPalPhone' => 'getPayPalPhone', + 'payPalProtectionEligibility' => 'getPayPalProtectionEligibility', + 'payPalTransactionId' => 'getPayPalTransactionId', + 'avsResultRaw' => 'getAvsResultRaw', + 'bin' => 'getBin', + 'cvcResultRaw' => 'getCvcResultRaw', + 'riskToken' => 'getRiskToken', + 'threeDAuthenticated' => 'getThreeDAuthenticated', + 'threeDOffered' => 'getThreeDOffered', + 'tokenDataType' => 'getTokenDataType' + ]; + + /** + * 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('payPalCountryCode', $data ?? [], null); + $this->setIfExists('payPalEmailId', $data ?? [], null); + $this->setIfExists('payPalFirstName', $data ?? [], null); + $this->setIfExists('payPalLastName', $data ?? [], null); + $this->setIfExists('payPalPayerId', $data ?? [], null); + $this->setIfExists('payPalPhone', $data ?? [], null); + $this->setIfExists('payPalProtectionEligibility', $data ?? [], null); + $this->setIfExists('payPalTransactionId', $data ?? [], null); + $this->setIfExists('avsResultRaw', $data ?? [], null); + $this->setIfExists('bin', $data ?? [], null); + $this->setIfExists('cvcResultRaw', $data ?? [], null); + $this->setIfExists('riskToken', $data ?? [], null); + $this->setIfExists('threeDAuthenticated', $data ?? [], null); + $this->setIfExists('threeDOffered', $data ?? [], null); + $this->setIfExists('tokenDataType', $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 payPalCountryCode + * + * @return string|null + */ + public function getPayPalCountryCode() + { + return $this->container['payPalCountryCode']; + } + + /** + * Sets payPalCountryCode + * + * @param string|null $payPalCountryCode Shopper's country of residence in the form of ISO standard 3166 2-character country codes. + * + * @return self + */ + public function setPayPalCountryCode($payPalCountryCode) + { + if (is_null($payPalCountryCode)) { + throw new \InvalidArgumentException('non-nullable payPalCountryCode cannot be null'); + } + $this->container['payPalCountryCode'] = $payPalCountryCode; + + return $this; + } + + /** + * Gets payPalEmailId + * + * @return string|null + */ + public function getPayPalEmailId() + { + return $this->container['payPalEmailId']; + } + + /** + * Sets payPalEmailId + * + * @param string|null $payPalEmailId Shopper's email. + * + * @return self + */ + public function setPayPalEmailId($payPalEmailId) + { + if (is_null($payPalEmailId)) { + throw new \InvalidArgumentException('non-nullable payPalEmailId cannot be null'); + } + $this->container['payPalEmailId'] = $payPalEmailId; + + return $this; + } + + /** + * Gets payPalFirstName + * + * @return string|null + */ + public function getPayPalFirstName() + { + return $this->container['payPalFirstName']; + } + + /** + * Sets payPalFirstName + * + * @param string|null $payPalFirstName Shopper's first name. + * + * @return self + */ + public function setPayPalFirstName($payPalFirstName) + { + if (is_null($payPalFirstName)) { + throw new \InvalidArgumentException('non-nullable payPalFirstName cannot be null'); + } + $this->container['payPalFirstName'] = $payPalFirstName; + + return $this; + } + + /** + * Gets payPalLastName + * + * @return string|null + */ + public function getPayPalLastName() + { + return $this->container['payPalLastName']; + } + + /** + * Sets payPalLastName + * + * @param string|null $payPalLastName Shopper's last name. + * + * @return self + */ + public function setPayPalLastName($payPalLastName) + { + if (is_null($payPalLastName)) { + throw new \InvalidArgumentException('non-nullable payPalLastName cannot be null'); + } + $this->container['payPalLastName'] = $payPalLastName; + + return $this; + } + + /** + * Gets payPalPayerId + * + * @return string|null + */ + public function getPayPalPayerId() + { + return $this->container['payPalPayerId']; + } + + /** + * Sets payPalPayerId + * + * @param string|null $payPalPayerId Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters. + * + * @return self + */ + public function setPayPalPayerId($payPalPayerId) + { + if (is_null($payPalPayerId)) { + throw new \InvalidArgumentException('non-nullable payPalPayerId cannot be null'); + } + $this->container['payPalPayerId'] = $payPalPayerId; + + return $this; + } + + /** + * Gets payPalPhone + * + * @return string|null + */ + public function getPayPalPhone() + { + return $this->container['payPalPhone']; + } + + /** + * Sets payPalPhone + * + * @param string|null $payPalPhone Shopper's phone number. + * + * @return self + */ + public function setPayPalPhone($payPalPhone) + { + if (is_null($payPalPhone)) { + throw new \InvalidArgumentException('non-nullable payPalPhone cannot be null'); + } + $this->container['payPalPhone'] = $payPalPhone; + + return $this; + } + + /** + * Gets payPalProtectionEligibility + * + * @return string|null + */ + public function getPayPalProtectionEligibility() + { + return $this->container['payPalProtectionEligibility']; + } + + /** + * Sets payPalProtectionEligibility + * + * @param string|null $payPalProtectionEligibility Allowed values: * **Eligible** — Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal's Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy. + * + * @return self + */ + public function setPayPalProtectionEligibility($payPalProtectionEligibility) + { + if (is_null($payPalProtectionEligibility)) { + throw new \InvalidArgumentException('non-nullable payPalProtectionEligibility cannot be null'); + } + $this->container['payPalProtectionEligibility'] = $payPalProtectionEligibility; + + return $this; + } + + /** + * Gets payPalTransactionId + * + * @return string|null + */ + public function getPayPalTransactionId() + { + return $this->container['payPalTransactionId']; + } + + /** + * Sets payPalTransactionId + * + * @param string|null $payPalTransactionId Unique transaction ID of the payment. + * + * @return self + */ + public function setPayPalTransactionId($payPalTransactionId) + { + if (is_null($payPalTransactionId)) { + throw new \InvalidArgumentException('non-nullable payPalTransactionId cannot be null'); + } + $this->container['payPalTransactionId'] = $payPalTransactionId; + + return $this; + } + + /** + * Gets avsResultRaw + * + * @return string|null + */ + public function getAvsResultRaw() + { + return $this->container['avsResultRaw']; + } + + /** + * Sets avsResultRaw + * + * @param string|null $avsResultRaw Raw AVS result received from the acquirer, where available. Example: D + * + * @return self + */ + public function setAvsResultRaw($avsResultRaw) + { + if (is_null($avsResultRaw)) { + throw new \InvalidArgumentException('non-nullable avsResultRaw cannot be null'); + } + $this->container['avsResultRaw'] = $avsResultRaw; + + return $this; + } + + /** + * Gets bin + * + * @return string|null + */ + public function getBin() + { + return $this->container['bin']; + } + + /** + * Sets bin + * + * @param string|null $bin The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request). + * + * @return self + */ + public function setBin($bin) + { + if (is_null($bin)) { + throw new \InvalidArgumentException('non-nullable bin cannot be null'); + } + $this->container['bin'] = $bin; + + return $this; + } + + /** + * Gets cvcResultRaw + * + * @return string|null + */ + public function getCvcResultRaw() + { + return $this->container['cvcResultRaw']; + } + + /** + * Sets cvcResultRaw + * + * @param string|null $cvcResultRaw Raw CVC result received from the acquirer, where available. Example: 1 + * + * @return self + */ + public function setCvcResultRaw($cvcResultRaw) + { + if (is_null($cvcResultRaw)) { + throw new \InvalidArgumentException('non-nullable cvcResultRaw cannot be null'); + } + $this->container['cvcResultRaw'] = $cvcResultRaw; + + return $this; + } + + /** + * Gets riskToken + * + * @return string|null + */ + public function getRiskToken() + { + return $this->container['riskToken']; + } + + /** + * Sets riskToken + * + * @param string|null $riskToken Unique identifier or token for the shopper's card details. + * + * @return self + */ + public function setRiskToken($riskToken) + { + if (is_null($riskToken)) { + throw new \InvalidArgumentException('non-nullable riskToken cannot be null'); + } + $this->container['riskToken'] = $riskToken; + + return $this; + } + + /** + * Gets threeDAuthenticated + * + * @return string|null + */ + public function getThreeDAuthenticated() + { + return $this->container['threeDAuthenticated']; + } + + /** + * Sets threeDAuthenticated + * + * @param string|null $threeDAuthenticated A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true + * + * @return self + */ + public function setThreeDAuthenticated($threeDAuthenticated) + { + if (is_null($threeDAuthenticated)) { + throw new \InvalidArgumentException('non-nullable threeDAuthenticated cannot be null'); + } + $this->container['threeDAuthenticated'] = $threeDAuthenticated; + + return $this; + } + + /** + * Gets threeDOffered + * + * @return string|null + */ + public function getThreeDOffered() + { + return $this->container['threeDOffered']; + } + + /** + * Sets threeDOffered + * + * @param string|null $threeDOffered A Boolean value indicating whether 3DS was offered for this payment. Example: true + * + * @return self + */ + public function setThreeDOffered($threeDOffered) + { + if (is_null($threeDOffered)) { + throw new \InvalidArgumentException('non-nullable threeDOffered cannot be null'); + } + $this->container['threeDOffered'] = $threeDOffered; + + return $this; + } + + /** + * Gets tokenDataType + * + * @return string|null + */ + public function getTokenDataType() + { + return $this->container['tokenDataType']; + } + + /** + * Sets tokenDataType + * + * @param string|null $tokenDataType Required for PayPal payments only. The only supported value is: **paypal**. + * + * @return self + */ + public function setTokenDataType($tokenDataType) + { + if (is_null($tokenDataType)) { + throw new \InvalidArgumentException('non-nullable tokenDataType cannot be null'); + } + $this->container['tokenDataType'] = $tokenDataType; + + 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/Payment/AdditionalDataSubMerchant.php b/src/Adyen/Model/Payment/AdditionalDataSubMerchant.php new file mode 100644 index 000000000..251289946 --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataSubMerchant.php @@ -0,0 +1,690 @@ + + */ +class AdditionalDataSubMerchant implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataSubMerchant'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'subMerchantNumberOfSubSellers' => 'string', + 'subMerchantSubSellerSubSellerNrCity' => 'string', + 'subMerchantSubSellerSubSellerNrCountry' => 'string', + 'subMerchantSubSellerSubSellerNrId' => 'string', + 'subMerchantSubSellerSubSellerNrMcc' => 'string', + 'subMerchantSubSellerSubSellerNrName' => 'string', + 'subMerchantSubSellerSubSellerNrPostalCode' => 'string', + 'subMerchantSubSellerSubSellerNrState' => 'string', + 'subMerchantSubSellerSubSellerNrStreet' => 'string', + 'subMerchantSubSellerSubSellerNrTaxId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'subMerchantNumberOfSubSellers' => null, + 'subMerchantSubSellerSubSellerNrCity' => null, + 'subMerchantSubSellerSubSellerNrCountry' => null, + 'subMerchantSubSellerSubSellerNrId' => null, + 'subMerchantSubSellerSubSellerNrMcc' => null, + 'subMerchantSubSellerSubSellerNrName' => null, + 'subMerchantSubSellerSubSellerNrPostalCode' => null, + 'subMerchantSubSellerSubSellerNrState' => null, + 'subMerchantSubSellerSubSellerNrStreet' => null, + 'subMerchantSubSellerSubSellerNrTaxId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'subMerchantNumberOfSubSellers' => false, + 'subMerchantSubSellerSubSellerNrCity' => false, + 'subMerchantSubSellerSubSellerNrCountry' => false, + 'subMerchantSubSellerSubSellerNrId' => false, + 'subMerchantSubSellerSubSellerNrMcc' => false, + 'subMerchantSubSellerSubSellerNrName' => false, + 'subMerchantSubSellerSubSellerNrPostalCode' => false, + 'subMerchantSubSellerSubSellerNrState' => false, + 'subMerchantSubSellerSubSellerNrStreet' => false, + 'subMerchantSubSellerSubSellerNrTaxId' => 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 = [ + 'subMerchantNumberOfSubSellers' => 'subMerchant.numberOfSubSellers', + 'subMerchantSubSellerSubSellerNrCity' => 'subMerchant.subSeller[subSellerNr].city', + 'subMerchantSubSellerSubSellerNrCountry' => 'subMerchant.subSeller[subSellerNr].country', + 'subMerchantSubSellerSubSellerNrId' => 'subMerchant.subSeller[subSellerNr].id', + 'subMerchantSubSellerSubSellerNrMcc' => 'subMerchant.subSeller[subSellerNr].mcc', + 'subMerchantSubSellerSubSellerNrName' => 'subMerchant.subSeller[subSellerNr].name', + 'subMerchantSubSellerSubSellerNrPostalCode' => 'subMerchant.subSeller[subSellerNr].postalCode', + 'subMerchantSubSellerSubSellerNrState' => 'subMerchant.subSeller[subSellerNr].state', + 'subMerchantSubSellerSubSellerNrStreet' => 'subMerchant.subSeller[subSellerNr].street', + 'subMerchantSubSellerSubSellerNrTaxId' => 'subMerchant.subSeller[subSellerNr].taxId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'subMerchantNumberOfSubSellers' => 'setSubMerchantNumberOfSubSellers', + 'subMerchantSubSellerSubSellerNrCity' => 'setSubMerchantSubSellerSubSellerNrCity', + 'subMerchantSubSellerSubSellerNrCountry' => 'setSubMerchantSubSellerSubSellerNrCountry', + 'subMerchantSubSellerSubSellerNrId' => 'setSubMerchantSubSellerSubSellerNrId', + 'subMerchantSubSellerSubSellerNrMcc' => 'setSubMerchantSubSellerSubSellerNrMcc', + 'subMerchantSubSellerSubSellerNrName' => 'setSubMerchantSubSellerSubSellerNrName', + 'subMerchantSubSellerSubSellerNrPostalCode' => 'setSubMerchantSubSellerSubSellerNrPostalCode', + 'subMerchantSubSellerSubSellerNrState' => 'setSubMerchantSubSellerSubSellerNrState', + 'subMerchantSubSellerSubSellerNrStreet' => 'setSubMerchantSubSellerSubSellerNrStreet', + 'subMerchantSubSellerSubSellerNrTaxId' => 'setSubMerchantSubSellerSubSellerNrTaxId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'subMerchantNumberOfSubSellers' => 'getSubMerchantNumberOfSubSellers', + 'subMerchantSubSellerSubSellerNrCity' => 'getSubMerchantSubSellerSubSellerNrCity', + 'subMerchantSubSellerSubSellerNrCountry' => 'getSubMerchantSubSellerSubSellerNrCountry', + 'subMerchantSubSellerSubSellerNrId' => 'getSubMerchantSubSellerSubSellerNrId', + 'subMerchantSubSellerSubSellerNrMcc' => 'getSubMerchantSubSellerSubSellerNrMcc', + 'subMerchantSubSellerSubSellerNrName' => 'getSubMerchantSubSellerSubSellerNrName', + 'subMerchantSubSellerSubSellerNrPostalCode' => 'getSubMerchantSubSellerSubSellerNrPostalCode', + 'subMerchantSubSellerSubSellerNrState' => 'getSubMerchantSubSellerSubSellerNrState', + 'subMerchantSubSellerSubSellerNrStreet' => 'getSubMerchantSubSellerSubSellerNrStreet', + 'subMerchantSubSellerSubSellerNrTaxId' => 'getSubMerchantSubSellerSubSellerNrTaxId' + ]; + + /** + * 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('subMerchantNumberOfSubSellers', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrCity', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrCountry', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrId', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrMcc', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrName', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrPostalCode', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrState', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrStreet', $data ?? [], null); + $this->setIfExists('subMerchantSubSellerSubSellerNrTaxId', $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 subMerchantNumberOfSubSellers + * + * @return string|null + */ + public function getSubMerchantNumberOfSubSellers() + { + return $this->container['subMerchantNumberOfSubSellers']; + } + + /** + * Sets subMerchantNumberOfSubSellers + * + * @param string|null $subMerchantNumberOfSubSellers Required for transactions performed by registered payment facilitators. Indicates the number of sub-merchants contained in the request. For example, **3**. + * + * @return self + */ + public function setSubMerchantNumberOfSubSellers($subMerchantNumberOfSubSellers) + { + if (is_null($subMerchantNumberOfSubSellers)) { + throw new \InvalidArgumentException('non-nullable subMerchantNumberOfSubSellers cannot be null'); + } + $this->container['subMerchantNumberOfSubSellers'] = $subMerchantNumberOfSubSellers; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrCity + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrCity() + { + return $this->container['subMerchantSubSellerSubSellerNrCity']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrCity + * + * @param string|null $subMerchantSubSellerSubSellerNrCity Required for transactions performed by registered payment facilitators. The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrCity($subMerchantSubSellerSubSellerNrCity) + { + if (is_null($subMerchantSubSellerSubSellerNrCity)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrCity cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrCity'] = $subMerchantSubSellerSubSellerNrCity; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrCountry + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrCountry() + { + return $this->container['subMerchantSubSellerSubSellerNrCountry']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrCountry + * + * @param string|null $subMerchantSubSellerSubSellerNrCountry Required for transactions performed by registered payment facilitators. The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrCountry($subMerchantSubSellerSubSellerNrCountry) + { + if (is_null($subMerchantSubSellerSubSellerNrCountry)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrCountry cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrCountry'] = $subMerchantSubSellerSubSellerNrCountry; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrId + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrId() + { + return $this->container['subMerchantSubSellerSubSellerNrId']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrId + * + * @param string|null $subMerchantSubSellerSubSellerNrId Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrId($subMerchantSubSellerSubSellerNrId) + { + if (is_null($subMerchantSubSellerSubSellerNrId)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrId cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrId'] = $subMerchantSubSellerSubSellerNrId; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrMcc + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrMcc() + { + return $this->container['subMerchantSubSellerSubSellerNrMcc']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrMcc + * + * @param string|null $subMerchantSubSellerSubSellerNrMcc Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrMcc($subMerchantSubSellerSubSellerNrMcc) + { + if (is_null($subMerchantSubSellerSubSellerNrMcc)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrMcc cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrMcc'] = $subMerchantSubSellerSubSellerNrMcc; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrName + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrName() + { + return $this->container['subMerchantSubSellerSubSellerNrName']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrName + * + * @param string|null $subMerchantSubSellerSubSellerNrName Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrName($subMerchantSubSellerSubSellerNrName) + { + if (is_null($subMerchantSubSellerSubSellerNrName)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrName cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrName'] = $subMerchantSubSellerSubSellerNrName; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrPostalCode + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrPostalCode() + { + return $this->container['subMerchantSubSellerSubSellerNrPostalCode']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrPostalCode + * + * @param string|null $subMerchantSubSellerSubSellerNrPostalCode Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant's address, without dashes. * Format: Numeric * Fixed length: 8 digits + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrPostalCode($subMerchantSubSellerSubSellerNrPostalCode) + { + if (is_null($subMerchantSubSellerSubSellerNrPostalCode)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrPostalCode cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrPostalCode'] = $subMerchantSubSellerSubSellerNrPostalCode; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrState + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrState() + { + return $this->container['subMerchantSubSellerSubSellerNrState']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrState + * + * @param string|null $subMerchantSubSellerSubSellerNrState Required for transactions performed by registered payment facilitators. The state code of the sub-merchant's address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrState($subMerchantSubSellerSubSellerNrState) + { + if (is_null($subMerchantSubSellerSubSellerNrState)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrState cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrState'] = $subMerchantSubSellerSubSellerNrState; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrStreet + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrStreet() + { + return $this->container['subMerchantSubSellerSubSellerNrStreet']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrStreet + * + * @param string|null $subMerchantSubSellerSubSellerNrStreet Required for transactions performed by registered payment facilitators. The street name and house number of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 60 characters + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrStreet($subMerchantSubSellerSubSellerNrStreet) + { + if (is_null($subMerchantSubSellerSubSellerNrStreet)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrStreet cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrStreet'] = $subMerchantSubSellerSubSellerNrStreet; + + return $this; + } + + /** + * Gets subMerchantSubSellerSubSellerNrTaxId + * + * @return string|null + */ + public function getSubMerchantSubSellerSubSellerNrTaxId() + { + return $this->container['subMerchantSubSellerSubSellerNrTaxId']; + } + + /** + * Sets subMerchantSubSellerSubSellerNrTaxId + * + * @param string|null $subMerchantSubSellerSubSellerNrTaxId Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ + * + * @return self + */ + public function setSubMerchantSubSellerSubSellerNrTaxId($subMerchantSubSellerSubSellerNrTaxId) + { + if (is_null($subMerchantSubSellerSubSellerNrTaxId)) { + throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrTaxId cannot be null'); + } + $this->container['subMerchantSubSellerSubSellerNrTaxId'] = $subMerchantSubSellerSubSellerNrTaxId; + + 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/Payment/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Payment/AdditionalDataTemporaryServices.php new file mode 100644 index 000000000..4bb19bb9b --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataTemporaryServices.php @@ -0,0 +1,656 @@ + + */ +class AdditionalDataTemporaryServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataTemporaryServices'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enhancedSchemeDataCustomerReference' => 'string', + 'enhancedSchemeDataEmployeeName' => 'string', + 'enhancedSchemeDataJobDescription' => 'string', + 'enhancedSchemeDataRegularHoursRate' => 'string', + 'enhancedSchemeDataRegularHoursWorked' => 'string', + 'enhancedSchemeDataRequestName' => 'string', + 'enhancedSchemeDataTempStartDate' => 'string', + 'enhancedSchemeDataTempWeekEnding' => 'string', + 'enhancedSchemeDataTotalTaxAmount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enhancedSchemeDataCustomerReference' => null, + 'enhancedSchemeDataEmployeeName' => null, + 'enhancedSchemeDataJobDescription' => null, + 'enhancedSchemeDataRegularHoursRate' => null, + 'enhancedSchemeDataRegularHoursWorked' => null, + 'enhancedSchemeDataRequestName' => null, + 'enhancedSchemeDataTempStartDate' => null, + 'enhancedSchemeDataTempWeekEnding' => null, + 'enhancedSchemeDataTotalTaxAmount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'enhancedSchemeDataCustomerReference' => false, + 'enhancedSchemeDataEmployeeName' => false, + 'enhancedSchemeDataJobDescription' => false, + 'enhancedSchemeDataRegularHoursRate' => false, + 'enhancedSchemeDataRegularHoursWorked' => false, + 'enhancedSchemeDataRequestName' => false, + 'enhancedSchemeDataTempStartDate' => false, + 'enhancedSchemeDataTempWeekEnding' => false, + 'enhancedSchemeDataTotalTaxAmount' => 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 = [ + 'enhancedSchemeDataCustomerReference' => 'enhancedSchemeData.customerReference', + 'enhancedSchemeDataEmployeeName' => 'enhancedSchemeData.employeeName', + 'enhancedSchemeDataJobDescription' => 'enhancedSchemeData.jobDescription', + 'enhancedSchemeDataRegularHoursRate' => 'enhancedSchemeData.regularHoursRate', + 'enhancedSchemeDataRegularHoursWorked' => 'enhancedSchemeData.regularHoursWorked', + 'enhancedSchemeDataRequestName' => 'enhancedSchemeData.requestName', + 'enhancedSchemeDataTempStartDate' => 'enhancedSchemeData.tempStartDate', + 'enhancedSchemeDataTempWeekEnding' => 'enhancedSchemeData.tempWeekEnding', + 'enhancedSchemeDataTotalTaxAmount' => 'enhancedSchemeData.totalTaxAmount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enhancedSchemeDataCustomerReference' => 'setEnhancedSchemeDataCustomerReference', + 'enhancedSchemeDataEmployeeName' => 'setEnhancedSchemeDataEmployeeName', + 'enhancedSchemeDataJobDescription' => 'setEnhancedSchemeDataJobDescription', + 'enhancedSchemeDataRegularHoursRate' => 'setEnhancedSchemeDataRegularHoursRate', + 'enhancedSchemeDataRegularHoursWorked' => 'setEnhancedSchemeDataRegularHoursWorked', + 'enhancedSchemeDataRequestName' => 'setEnhancedSchemeDataRequestName', + 'enhancedSchemeDataTempStartDate' => 'setEnhancedSchemeDataTempStartDate', + 'enhancedSchemeDataTempWeekEnding' => 'setEnhancedSchemeDataTempWeekEnding', + 'enhancedSchemeDataTotalTaxAmount' => 'setEnhancedSchemeDataTotalTaxAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enhancedSchemeDataCustomerReference' => 'getEnhancedSchemeDataCustomerReference', + 'enhancedSchemeDataEmployeeName' => 'getEnhancedSchemeDataEmployeeName', + 'enhancedSchemeDataJobDescription' => 'getEnhancedSchemeDataJobDescription', + 'enhancedSchemeDataRegularHoursRate' => 'getEnhancedSchemeDataRegularHoursRate', + 'enhancedSchemeDataRegularHoursWorked' => 'getEnhancedSchemeDataRegularHoursWorked', + 'enhancedSchemeDataRequestName' => 'getEnhancedSchemeDataRequestName', + 'enhancedSchemeDataTempStartDate' => 'getEnhancedSchemeDataTempStartDate', + 'enhancedSchemeDataTempWeekEnding' => 'getEnhancedSchemeDataTempWeekEnding', + 'enhancedSchemeDataTotalTaxAmount' => 'getEnhancedSchemeDataTotalTaxAmount' + ]; + + /** + * 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('enhancedSchemeDataCustomerReference', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataEmployeeName', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataJobDescription', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataRegularHoursRate', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataRegularHoursWorked', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataRequestName', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataTempStartDate', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataTempWeekEnding', $data ?? [], null); + $this->setIfExists('enhancedSchemeDataTotalTaxAmount', $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 enhancedSchemeDataCustomerReference + * + * @return string|null + */ + public function getEnhancedSchemeDataCustomerReference() + { + return $this->container['enhancedSchemeDataCustomerReference']; + } + + /** + * Sets enhancedSchemeDataCustomerReference + * + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + * + * @return self + */ + public function setEnhancedSchemeDataCustomerReference($enhancedSchemeDataCustomerReference) + { + if (is_null($enhancedSchemeDataCustomerReference)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataCustomerReference cannot be null'); + } + $this->container['enhancedSchemeDataCustomerReference'] = $enhancedSchemeDataCustomerReference; + + return $this; + } + + /** + * Gets enhancedSchemeDataEmployeeName + * + * @return string|null + */ + public function getEnhancedSchemeDataEmployeeName() + { + return $this->container['enhancedSchemeDataEmployeeName']; + } + + /** + * Sets enhancedSchemeDataEmployeeName + * + * @param string|null $enhancedSchemeDataEmployeeName The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros. + * + * @return self + */ + public function setEnhancedSchemeDataEmployeeName($enhancedSchemeDataEmployeeName) + { + if (is_null($enhancedSchemeDataEmployeeName)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataEmployeeName cannot be null'); + } + $this->container['enhancedSchemeDataEmployeeName'] = $enhancedSchemeDataEmployeeName; + + return $this; + } + + /** + * Gets enhancedSchemeDataJobDescription + * + * @return string|null + */ + public function getEnhancedSchemeDataJobDescription() + { + return $this->container['enhancedSchemeDataJobDescription']; + } + + /** + * Sets enhancedSchemeDataJobDescription + * + * @param string|null $enhancedSchemeDataJobDescription The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros. + * + * @return self + */ + public function setEnhancedSchemeDataJobDescription($enhancedSchemeDataJobDescription) + { + if (is_null($enhancedSchemeDataJobDescription)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataJobDescription cannot be null'); + } + $this->container['enhancedSchemeDataJobDescription'] = $enhancedSchemeDataJobDescription; + + return $this; + } + + /** + * Gets enhancedSchemeDataRegularHoursRate + * + * @return string|null + */ + public function getEnhancedSchemeDataRegularHoursRate() + { + return $this->container['enhancedSchemeDataRegularHoursRate']; + } + + /** + * Sets enhancedSchemeDataRegularHoursRate + * + * @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 + */ + public function setEnhancedSchemeDataRegularHoursRate($enhancedSchemeDataRegularHoursRate) + { + if (is_null($enhancedSchemeDataRegularHoursRate)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataRegularHoursRate cannot be null'); + } + $this->container['enhancedSchemeDataRegularHoursRate'] = $enhancedSchemeDataRegularHoursRate; + + return $this; + } + + /** + * Gets enhancedSchemeDataRegularHoursWorked + * + * @return string|null + */ + public function getEnhancedSchemeDataRegularHoursWorked() + { + return $this->container['enhancedSchemeDataRegularHoursWorked']; + } + + /** + * Sets enhancedSchemeDataRegularHoursWorked + * + * @param string|null $enhancedSchemeDataRegularHoursWorked The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros + * + * @return self + */ + public function setEnhancedSchemeDataRegularHoursWorked($enhancedSchemeDataRegularHoursWorked) + { + if (is_null($enhancedSchemeDataRegularHoursWorked)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataRegularHoursWorked cannot be null'); + } + $this->container['enhancedSchemeDataRegularHoursWorked'] = $enhancedSchemeDataRegularHoursWorked; + + return $this; + } + + /** + * Gets enhancedSchemeDataRequestName + * + * @return string|null + */ + public function getEnhancedSchemeDataRequestName() + { + return $this->container['enhancedSchemeDataRequestName']; + } + + /** + * Sets enhancedSchemeDataRequestName + * + * @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 + */ + public function setEnhancedSchemeDataRequestName($enhancedSchemeDataRequestName) + { + if (is_null($enhancedSchemeDataRequestName)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataRequestName cannot be null'); + } + $this->container['enhancedSchemeDataRequestName'] = $enhancedSchemeDataRequestName; + + return $this; + } + + /** + * Gets enhancedSchemeDataTempStartDate + * + * @return string|null + */ + public function getEnhancedSchemeDataTempStartDate() + { + return $this->container['enhancedSchemeDataTempStartDate']; + } + + /** + * Sets enhancedSchemeDataTempStartDate + * + * @param string|null $enhancedSchemeDataTempStartDate The billing period start date. * Format: ddMMyy * maxLength: 6 + * + * @return self + */ + public function setEnhancedSchemeDataTempStartDate($enhancedSchemeDataTempStartDate) + { + if (is_null($enhancedSchemeDataTempStartDate)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTempStartDate cannot be null'); + } + $this->container['enhancedSchemeDataTempStartDate'] = $enhancedSchemeDataTempStartDate; + + return $this; + } + + /** + * Gets enhancedSchemeDataTempWeekEnding + * + * @return string|null + */ + public function getEnhancedSchemeDataTempWeekEnding() + { + return $this->container['enhancedSchemeDataTempWeekEnding']; + } + + /** + * Sets enhancedSchemeDataTempWeekEnding + * + * @param string|null $enhancedSchemeDataTempWeekEnding The billing period end date. * Format: ddMMyy * maxLength: 6 + * + * @return self + */ + public function setEnhancedSchemeDataTempWeekEnding($enhancedSchemeDataTempWeekEnding) + { + if (is_null($enhancedSchemeDataTempWeekEnding)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTempWeekEnding cannot be null'); + } + $this->container['enhancedSchemeDataTempWeekEnding'] = $enhancedSchemeDataTempWeekEnding; + + return $this; + } + + /** + * Gets enhancedSchemeDataTotalTaxAmount + * + * @return string|null + */ + public function getEnhancedSchemeDataTotalTaxAmount() + { + return $this->container['enhancedSchemeDataTotalTaxAmount']; + } + + /** + * Sets enhancedSchemeDataTotalTaxAmount + * + * @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 + */ + public function setEnhancedSchemeDataTotalTaxAmount($enhancedSchemeDataTotalTaxAmount) + { + if (is_null($enhancedSchemeDataTotalTaxAmount)) { + throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTotalTaxAmount cannot be null'); + } + $this->container['enhancedSchemeDataTotalTaxAmount'] = $enhancedSchemeDataTotalTaxAmount; + + 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/Payment/AdditionalDataWallets.php b/src/Adyen/Model/Payment/AdditionalDataWallets.php new file mode 100644 index 000000000..0998979ef --- /dev/null +++ b/src/Adyen/Model/Payment/AdditionalDataWallets.php @@ -0,0 +1,554 @@ + + */ +class AdditionalDataWallets implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalDataWallets'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'androidpayToken' => 'string', + 'masterpassTransactionId' => 'string', + 'paymentToken' => 'string', + 'paywithgoogleToken' => 'string', + 'samsungpayToken' => 'string', + 'visacheckoutCallId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'androidpayToken' => null, + 'masterpassTransactionId' => null, + 'paymentToken' => null, + 'paywithgoogleToken' => null, + 'samsungpayToken' => null, + 'visacheckoutCallId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'androidpayToken' => false, + 'masterpassTransactionId' => false, + 'paymentToken' => false, + 'paywithgoogleToken' => false, + 'samsungpayToken' => false, + 'visacheckoutCallId' => 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 = [ + 'androidpayToken' => 'androidpay.token', + 'masterpassTransactionId' => 'masterpass.transactionId', + 'paymentToken' => 'payment.token', + 'paywithgoogleToken' => 'paywithgoogle.token', + 'samsungpayToken' => 'samsungpay.token', + 'visacheckoutCallId' => 'visacheckout.callId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'androidpayToken' => 'setAndroidpayToken', + 'masterpassTransactionId' => 'setMasterpassTransactionId', + 'paymentToken' => 'setPaymentToken', + 'paywithgoogleToken' => 'setPaywithgoogleToken', + 'samsungpayToken' => 'setSamsungpayToken', + 'visacheckoutCallId' => 'setVisacheckoutCallId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'androidpayToken' => 'getAndroidpayToken', + 'masterpassTransactionId' => 'getMasterpassTransactionId', + 'paymentToken' => 'getPaymentToken', + 'paywithgoogleToken' => 'getPaywithgoogleToken', + 'samsungpayToken' => 'getSamsungpayToken', + 'visacheckoutCallId' => 'getVisacheckoutCallId' + ]; + + /** + * 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('androidpayToken', $data ?? [], null); + $this->setIfExists('masterpassTransactionId', $data ?? [], null); + $this->setIfExists('paymentToken', $data ?? [], null); + $this->setIfExists('paywithgoogleToken', $data ?? [], null); + $this->setIfExists('samsungpayToken', $data ?? [], null); + $this->setIfExists('visacheckoutCallId', $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 androidpayToken + * + * @return string|null + */ + public function getAndroidpayToken() + { + return $this->container['androidpayToken']; + } + + /** + * Sets androidpayToken + * + * @param string|null $androidpayToken The Android Pay token retrieved from the SDK. + * + * @return self + */ + public function setAndroidpayToken($androidpayToken) + { + if (is_null($androidpayToken)) { + throw new \InvalidArgumentException('non-nullable androidpayToken cannot be null'); + } + $this->container['androidpayToken'] = $androidpayToken; + + return $this; + } + + /** + * Gets masterpassTransactionId + * + * @return string|null + */ + public function getMasterpassTransactionId() + { + return $this->container['masterpassTransactionId']; + } + + /** + * Sets masterpassTransactionId + * + * @param string|null $masterpassTransactionId The Mastercard Masterpass Transaction ID retrieved from the SDK. + * + * @return self + */ + public function setMasterpassTransactionId($masterpassTransactionId) + { + if (is_null($masterpassTransactionId)) { + throw new \InvalidArgumentException('non-nullable masterpassTransactionId cannot be null'); + } + $this->container['masterpassTransactionId'] = $masterpassTransactionId; + + return $this; + } + + /** + * Gets paymentToken + * + * @return string|null + */ + public function getPaymentToken() + { + return $this->container['paymentToken']; + } + + /** + * Sets paymentToken + * + * @param string|null $paymentToken The Apple Pay token retrieved from the SDK. + * + * @return self + */ + public function setPaymentToken($paymentToken) + { + if (is_null($paymentToken)) { + throw new \InvalidArgumentException('non-nullable paymentToken cannot be null'); + } + $this->container['paymentToken'] = $paymentToken; + + return $this; + } + + /** + * Gets paywithgoogleToken + * + * @return string|null + */ + public function getPaywithgoogleToken() + { + return $this->container['paywithgoogleToken']; + } + + /** + * Sets paywithgoogleToken + * + * @param string|null $paywithgoogleToken The Google Pay token retrieved from the SDK. + * + * @return self + */ + public function setPaywithgoogleToken($paywithgoogleToken) + { + if (is_null($paywithgoogleToken)) { + throw new \InvalidArgumentException('non-nullable paywithgoogleToken cannot be null'); + } + $this->container['paywithgoogleToken'] = $paywithgoogleToken; + + return $this; + } + + /** + * Gets samsungpayToken + * + * @return string|null + */ + public function getSamsungpayToken() + { + return $this->container['samsungpayToken']; + } + + /** + * Sets samsungpayToken + * + * @param string|null $samsungpayToken The Samsung Pay token retrieved from the SDK. + * + * @return self + */ + public function setSamsungpayToken($samsungpayToken) + { + if (is_null($samsungpayToken)) { + throw new \InvalidArgumentException('non-nullable samsungpayToken cannot be null'); + } + $this->container['samsungpayToken'] = $samsungpayToken; + + return $this; + } + + /** + * Gets visacheckoutCallId + * + * @return string|null + */ + public function getVisacheckoutCallId() + { + return $this->container['visacheckoutCallId']; + } + + /** + * Sets visacheckoutCallId + * + * @param string|null $visacheckoutCallId The Visa Checkout Call ID retrieved from the SDK. + * + * @return self + */ + public function setVisacheckoutCallId($visacheckoutCallId) + { + if (is_null($visacheckoutCallId)) { + throw new \InvalidArgumentException('non-nullable visacheckoutCallId cannot be null'); + } + $this->container['visacheckoutCallId'] = $visacheckoutCallId; + + 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/Payment/Address.php b/src/Adyen/Model/Payment/Address.php new file mode 100644 index 000000000..3bdea941f --- /dev/null +++ b/src/Adyen/Model/Payment/Address.php @@ -0,0 +1,569 @@ + + */ +class Address implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'houseNumberOrName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'houseNumberOrName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'houseNumberOrName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => 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 = [ + 'city' => 'city', + 'country' => 'country', + 'houseNumberOrName' => 'houseNumberOrName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * 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('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $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['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' 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 city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * 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`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + 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/Payment/AdjustAuthorisationRequest.php b/src/Adyen/Model/Payment/AdjustAuthorisationRequest.php new file mode 100644 index 000000000..44eac28f9 --- /dev/null +++ b/src/Adyen/Model/Payment/AdjustAuthorisationRequest.php @@ -0,0 +1,733 @@ + + */ +class AdjustAuthorisationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdjustAuthorisationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'modificationAmount' => '\Adyen\Model\Payment\Amount', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'modificationAmount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'splits' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'modificationAmount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'splits' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'modificationAmount' => 'modificationAmount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'splits' => 'splits', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'modificationAmount' => 'setModificationAmount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'splits' => 'setSplits', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'modificationAmount' => 'getModificationAmount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'splits' => 'getSplits', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('modificationAmount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['modificationAmount'] === null) { + $invalidProperties[] = "'modificationAmount' can't be null"; + } + if ($this->container['originalReference'] === null) { + $invalidProperties[] = "'originalReference' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets modificationAmount + * + * @return \Adyen\Model\Payment\Amount + */ + public function getModificationAmount() + { + return $this->container['modificationAmount']; + } + + /** + * Sets modificationAmount + * + * @param \Adyen\Model\Payment\Amount $modificationAmount modificationAmount + * + * @return self + */ + public function setModificationAmount($modificationAmount) + { + if (is_null($modificationAmount)) { + throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); + } + $this->container['modificationAmount'] = $modificationAmount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string|null + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string|null $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets originalReference + * + * @return string + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\Split[]|null $splits An array of objects specifying how the amount 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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payment/Amount.php b/src/Adyen/Model/Payment/Amount.php new file mode 100644 index 000000000..1c323922a --- /dev/null +++ b/src/Adyen/Model/Payment/Amount.php @@ -0,0 +1,424 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('value', $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['value'] === null) { + $invalidProperties[] = "'value' 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 value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/Payment/ApplicationInfo.php b/src/Adyen/Model/Payment/ApplicationInfo.php new file mode 100644 index 000000000..6a3b388a5 --- /dev/null +++ b/src/Adyen/Model/Payment/ApplicationInfo.php @@ -0,0 +1,554 @@ + + */ +class ApplicationInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ApplicationInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'adyenLibrary' => '\Adyen\Model\Payment\CommonField', + 'adyenPaymentSource' => '\Adyen\Model\Payment\CommonField', + 'externalPlatform' => '\Adyen\Model\Payment\ExternalPlatform', + 'merchantApplication' => '\Adyen\Model\Payment\CommonField', + 'merchantDevice' => '\Adyen\Model\Payment\MerchantDevice', + 'shopperInteractionDevice' => '\Adyen\Model\Payment\ShopperInteractionDevice' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'adyenLibrary' => null, + 'adyenPaymentSource' => null, + 'externalPlatform' => null, + 'merchantApplication' => null, + 'merchantDevice' => null, + 'shopperInteractionDevice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'adyenLibrary' => false, + 'adyenPaymentSource' => false, + 'externalPlatform' => false, + 'merchantApplication' => false, + 'merchantDevice' => false, + 'shopperInteractionDevice' => 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 = [ + 'adyenLibrary' => 'adyenLibrary', + 'adyenPaymentSource' => 'adyenPaymentSource', + 'externalPlatform' => 'externalPlatform', + 'merchantApplication' => 'merchantApplication', + 'merchantDevice' => 'merchantDevice', + 'shopperInteractionDevice' => 'shopperInteractionDevice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'adyenLibrary' => 'setAdyenLibrary', + 'adyenPaymentSource' => 'setAdyenPaymentSource', + 'externalPlatform' => 'setExternalPlatform', + 'merchantApplication' => 'setMerchantApplication', + 'merchantDevice' => 'setMerchantDevice', + 'shopperInteractionDevice' => 'setShopperInteractionDevice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'adyenLibrary' => 'getAdyenLibrary', + 'adyenPaymentSource' => 'getAdyenPaymentSource', + 'externalPlatform' => 'getExternalPlatform', + 'merchantApplication' => 'getMerchantApplication', + 'merchantDevice' => 'getMerchantDevice', + 'shopperInteractionDevice' => 'getShopperInteractionDevice' + ]; + + /** + * 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('adyenLibrary', $data ?? [], null); + $this->setIfExists('adyenPaymentSource', $data ?? [], null); + $this->setIfExists('externalPlatform', $data ?? [], null); + $this->setIfExists('merchantApplication', $data ?? [], null); + $this->setIfExists('merchantDevice', $data ?? [], null); + $this->setIfExists('shopperInteractionDevice', $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 adyenLibrary + * + * @return \Adyen\Model\Payment\CommonField|null + */ + public function getAdyenLibrary() + { + return $this->container['adyenLibrary']; + } + + /** + * Sets adyenLibrary + * + * @param \Adyen\Model\Payment\CommonField|null $adyenLibrary adyenLibrary + * + * @return self + */ + public function setAdyenLibrary($adyenLibrary) + { + if (is_null($adyenLibrary)) { + throw new \InvalidArgumentException('non-nullable adyenLibrary cannot be null'); + } + $this->container['adyenLibrary'] = $adyenLibrary; + + return $this; + } + + /** + * Gets adyenPaymentSource + * + * @return \Adyen\Model\Payment\CommonField|null + */ + public function getAdyenPaymentSource() + { + return $this->container['adyenPaymentSource']; + } + + /** + * Sets adyenPaymentSource + * + * @param \Adyen\Model\Payment\CommonField|null $adyenPaymentSource adyenPaymentSource + * + * @return self + */ + public function setAdyenPaymentSource($adyenPaymentSource) + { + if (is_null($adyenPaymentSource)) { + throw new \InvalidArgumentException('non-nullable adyenPaymentSource cannot be null'); + } + $this->container['adyenPaymentSource'] = $adyenPaymentSource; + + return $this; + } + + /** + * Gets externalPlatform + * + * @return \Adyen\Model\Payment\ExternalPlatform|null + */ + public function getExternalPlatform() + { + return $this->container['externalPlatform']; + } + + /** + * Sets externalPlatform + * + * @param \Adyen\Model\Payment\ExternalPlatform|null $externalPlatform externalPlatform + * + * @return self + */ + public function setExternalPlatform($externalPlatform) + { + if (is_null($externalPlatform)) { + throw new \InvalidArgumentException('non-nullable externalPlatform cannot be null'); + } + $this->container['externalPlatform'] = $externalPlatform; + + return $this; + } + + /** + * Gets merchantApplication + * + * @return \Adyen\Model\Payment\CommonField|null + */ + public function getMerchantApplication() + { + return $this->container['merchantApplication']; + } + + /** + * Sets merchantApplication + * + * @param \Adyen\Model\Payment\CommonField|null $merchantApplication merchantApplication + * + * @return self + */ + public function setMerchantApplication($merchantApplication) + { + if (is_null($merchantApplication)) { + throw new \InvalidArgumentException('non-nullable merchantApplication cannot be null'); + } + $this->container['merchantApplication'] = $merchantApplication; + + return $this; + } + + /** + * Gets merchantDevice + * + * @return \Adyen\Model\Payment\MerchantDevice|null + */ + public function getMerchantDevice() + { + return $this->container['merchantDevice']; + } + + /** + * Sets merchantDevice + * + * @param \Adyen\Model\Payment\MerchantDevice|null $merchantDevice merchantDevice + * + * @return self + */ + public function setMerchantDevice($merchantDevice) + { + if (is_null($merchantDevice)) { + throw new \InvalidArgumentException('non-nullable merchantDevice cannot be null'); + } + $this->container['merchantDevice'] = $merchantDevice; + + return $this; + } + + /** + * Gets shopperInteractionDevice + * + * @return \Adyen\Model\Payment\ShopperInteractionDevice|null + */ + public function getShopperInteractionDevice() + { + return $this->container['shopperInteractionDevice']; + } + + /** + * Sets shopperInteractionDevice + * + * @param \Adyen\Model\Payment\ShopperInteractionDevice|null $shopperInteractionDevice shopperInteractionDevice + * + * @return self + */ + public function setShopperInteractionDevice($shopperInteractionDevice) + { + if (is_null($shopperInteractionDevice)) { + throw new \InvalidArgumentException('non-nullable shopperInteractionDevice cannot be null'); + } + $this->container['shopperInteractionDevice'] = $shopperInteractionDevice; + + 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/Payment/AuthenticationResultRequest.php b/src/Adyen/Model/Payment/AuthenticationResultRequest.php new file mode 100644 index 000000000..7aeeb4810 --- /dev/null +++ b/src/Adyen/Model/Payment/AuthenticationResultRequest.php @@ -0,0 +1,424 @@ + + */ +class AuthenticationResultRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthenticationResultRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantAccount' => 'string', + 'pspReference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantAccount' => null, + 'pspReference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantAccount' => false, + 'pspReference' => 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 = [ + 'merchantAccount' => 'merchantAccount', + 'pspReference' => 'pspReference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantAccount' => 'setMerchantAccount', + 'pspReference' => 'setPspReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantAccount' => 'getMerchantAccount', + 'pspReference' => 'getPspReference' + ]; + + /** + * 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('merchantAccount', $data ?? [], null); + $this->setIfExists('pspReference', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['pspReference'] === null) { + $invalidProperties[] = "'pspReference' 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 merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account identifier, with which the authentication was processed. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets pspReference + * + * @return string + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string $pspReference The pspReference identifier for the transaction. + * + * @return self + */ + public function setPspReference($pspReference) + { + if (is_null($pspReference)) { + throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); + } + $this->container['pspReference'] = $pspReference; + + 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/Payment/AuthenticationResultResponse.php b/src/Adyen/Model/Payment/AuthenticationResultResponse.php new file mode 100644 index 000000000..42d68c679 --- /dev/null +++ b/src/Adyen/Model/Payment/AuthenticationResultResponse.php @@ -0,0 +1,418 @@ + + */ +class AuthenticationResultResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthenticationResultResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'threeDS1Result' => '\Adyen\Model\Payment\ThreeDS1Result', + 'threeDS2Result' => '\Adyen\Model\Payment\ThreeDS2Result' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'threeDS1Result' => null, + 'threeDS2Result' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'threeDS1Result' => false, + 'threeDS2Result' => 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 = [ + 'threeDS1Result' => 'threeDS1Result', + 'threeDS2Result' => 'threeDS2Result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'threeDS1Result' => 'setThreeDS1Result', + 'threeDS2Result' => 'setThreeDS2Result' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'threeDS1Result' => 'getThreeDS1Result', + 'threeDS2Result' => 'getThreeDS2Result' + ]; + + /** + * 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('threeDS1Result', $data ?? [], null); + $this->setIfExists('threeDS2Result', $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 threeDS1Result + * + * @return \Adyen\Model\Payment\ThreeDS1Result|null + */ + public function getThreeDS1Result() + { + return $this->container['threeDS1Result']; + } + + /** + * Sets threeDS1Result + * + * @param \Adyen\Model\Payment\ThreeDS1Result|null $threeDS1Result threeDS1Result + * + * @return self + */ + public function setThreeDS1Result($threeDS1Result) + { + if (is_null($threeDS1Result)) { + throw new \InvalidArgumentException('non-nullable threeDS1Result cannot be null'); + } + $this->container['threeDS1Result'] = $threeDS1Result; + + return $this; + } + + /** + * Gets threeDS2Result + * + * @return \Adyen\Model\Payment\ThreeDS2Result|null + */ + public function getThreeDS2Result() + { + return $this->container['threeDS2Result']; + } + + /** + * Sets threeDS2Result + * + * @param \Adyen\Model\Payment\ThreeDS2Result|null $threeDS2Result threeDS2Result + * + * @return self + */ + public function setThreeDS2Result($threeDS2Result) + { + if (is_null($threeDS2Result)) { + throw new \InvalidArgumentException('non-nullable threeDS2Result cannot be null'); + } + $this->container['threeDS2Result'] = $threeDS2Result; + + 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/Payment/BankAccount.php b/src/Adyen/Model/Payment/BankAccount.php new file mode 100644 index 000000000..23b4035f6 --- /dev/null +++ b/src/Adyen/Model/Payment/BankAccount.php @@ -0,0 +1,656 @@ + + */ +class BankAccount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankAccount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankCity' => 'string', + 'bankLocationId' => 'string', + 'bankName' => 'string', + 'bic' => 'string', + 'countryCode' => 'string', + 'iban' => 'string', + 'ownerName' => 'string', + 'taxId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bankAccountNumber' => null, + 'bankCity' => null, + 'bankLocationId' => null, + 'bankName' => null, + 'bic' => null, + 'countryCode' => null, + 'iban' => null, + 'ownerName' => null, + 'taxId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankCity' => false, + 'bankLocationId' => false, + 'bankName' => false, + 'bic' => false, + 'countryCode' => false, + 'iban' => false, + 'ownerName' => 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 = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankCity' => 'bankCity', + 'bankLocationId' => 'bankLocationId', + 'bankName' => 'bankName', + 'bic' => 'bic', + 'countryCode' => 'countryCode', + 'iban' => 'iban', + 'ownerName' => 'ownerName', + 'taxId' => 'taxId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankCity' => 'setBankCity', + 'bankLocationId' => 'setBankLocationId', + 'bankName' => 'setBankName', + 'bic' => 'setBic', + 'countryCode' => 'setCountryCode', + 'iban' => 'setIban', + 'ownerName' => 'setOwnerName', + 'taxId' => 'setTaxId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankCity' => 'getBankCity', + 'bankLocationId' => 'getBankLocationId', + 'bankName' => 'getBankName', + 'bic' => 'getBic', + 'countryCode' => 'getCountryCode', + 'iban' => 'getIban', + 'ownerName' => 'getOwnerName', + '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('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankCity', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); + $this->setIfExists('bankName', $data ?? [], null); + $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('countryCode', $data ?? [], null); + $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('ownerName', $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 bankAccountNumber + * + * @return string|null + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string|null $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + if (is_null($bankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); + } + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankCity + * + * @return string|null + */ + public function getBankCity() + { + return $this->container['bankCity']; + } + + /** + * Sets bankCity + * + * @param string|null $bankCity The bank city. + * + * @return self + */ + public function setBankCity($bankCity) + { + if (is_null($bankCity)) { + throw new \InvalidArgumentException('non-nullable bankCity cannot be null'); + } + $this->container['bankCity'] = $bankCity; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The location id of the bank. The field value is `nil` in most cases. + * + * @return self + */ + public function setBankLocationId($bankLocationId) + { + if (is_null($bankLocationId)) { + throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + } + $this->container['bankLocationId'] = $bankLocationId; + + return $this; + } + + /** + * Gets bankName + * + * @return string|null + */ + public function getBankName() + { + return $this->container['bankName']; + } + + /** + * Sets bankName + * + * @param string|null $bankName The name of the bank. + * + * @return self + */ + public function setBankName($bankName) + { + if (is_null($bankName)) { + throw new \InvalidArgumentException('non-nullable bankName cannot be null'); + } + $this->container['bankName'] = $bankName; + + return $this; + } + + /** + * Gets bic + * + * @return string|null + */ + public function getBic() + { + return $this->container['bic']; + } + + /** + * Sets bic + * + * @param string|null $bic The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. + * + * @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 countryCode + * + * @return string|null + */ + public function getCountryCode() + { + return $this->container['countryCode']; + } + + /** + * Sets countryCode + * + * @param string|null $countryCode Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). + * + * @return self + */ + public function setCountryCode($countryCode) + { + if (is_null($countryCode)) { + throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); + } + $this->container['countryCode'] = $countryCode; + + return $this; + } + + /** + * Gets iban + * + * @return string|null + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string|null $iban The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets ownerName + * + * @return string|null + */ + public function getOwnerName() + { + return $this->container['ownerName']; + } + + /** + * Sets ownerName + * + * @param string|null $ownerName The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. + * + * @return self + */ + public function setOwnerName($ownerName) + { + if (is_null($ownerName)) { + throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); + } + $this->container['ownerName'] = $ownerName; + + return $this; + } + + /** + * Gets taxId + * + * @return string|null + */ + public function getTaxId() + { + return $this->container['taxId']; + } + + /** + * Sets taxId + * + * @param string|null $taxId The bank account holder's tax ID. + * + * @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/Payment/BrowserInfo.php b/src/Adyen/Model/Payment/BrowserInfo.php new file mode 100644 index 000000000..12d2d259e --- /dev/null +++ b/src/Adyen/Model/Payment/BrowserInfo.php @@ -0,0 +1,672 @@ + + */ +class BrowserInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BrowserInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acceptHeader' => 'string', + 'colorDepth' => 'int', + 'javaEnabled' => 'bool', + 'javaScriptEnabled' => 'bool', + 'language' => 'string', + 'screenHeight' => 'int', + 'screenWidth' => 'int', + 'timeZoneOffset' => 'int', + 'userAgent' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acceptHeader' => null, + 'colorDepth' => 'int32', + 'javaEnabled' => null, + 'javaScriptEnabled' => null, + 'language' => null, + 'screenHeight' => 'int32', + 'screenWidth' => 'int32', + 'timeZoneOffset' => 'int32', + 'userAgent' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acceptHeader' => false, + 'colorDepth' => true, + 'javaEnabled' => false, + 'javaScriptEnabled' => false, + 'language' => false, + 'screenHeight' => true, + 'screenWidth' => true, + 'timeZoneOffset' => true, + 'userAgent' => 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 = [ + 'acceptHeader' => 'acceptHeader', + 'colorDepth' => 'colorDepth', + 'javaEnabled' => 'javaEnabled', + 'javaScriptEnabled' => 'javaScriptEnabled', + 'language' => 'language', + 'screenHeight' => 'screenHeight', + 'screenWidth' => 'screenWidth', + 'timeZoneOffset' => 'timeZoneOffset', + 'userAgent' => 'userAgent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acceptHeader' => 'setAcceptHeader', + 'colorDepth' => 'setColorDepth', + 'javaEnabled' => 'setJavaEnabled', + 'javaScriptEnabled' => 'setJavaScriptEnabled', + 'language' => 'setLanguage', + 'screenHeight' => 'setScreenHeight', + 'screenWidth' => 'setScreenWidth', + 'timeZoneOffset' => 'setTimeZoneOffset', + 'userAgent' => 'setUserAgent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acceptHeader' => 'getAcceptHeader', + 'colorDepth' => 'getColorDepth', + 'javaEnabled' => 'getJavaEnabled', + 'javaScriptEnabled' => 'getJavaScriptEnabled', + 'language' => 'getLanguage', + 'screenHeight' => 'getScreenHeight', + 'screenWidth' => 'getScreenWidth', + 'timeZoneOffset' => 'getTimeZoneOffset', + 'userAgent' => 'getUserAgent' + ]; + + /** + * 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('acceptHeader', $data ?? [], null); + $this->setIfExists('colorDepth', $data ?? [], null); + $this->setIfExists('javaEnabled', $data ?? [], null); + $this->setIfExists('javaScriptEnabled', $data ?? [], true); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('screenHeight', $data ?? [], null); + $this->setIfExists('screenWidth', $data ?? [], null); + $this->setIfExists('timeZoneOffset', $data ?? [], null); + $this->setIfExists('userAgent', $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['acceptHeader'] === null) { + $invalidProperties[] = "'acceptHeader' can't be null"; + } + if ($this->container['colorDepth'] === null) { + $invalidProperties[] = "'colorDepth' can't be null"; + } + if ($this->container['javaEnabled'] === null) { + $invalidProperties[] = "'javaEnabled' can't be null"; + } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } + if ($this->container['screenHeight'] === null) { + $invalidProperties[] = "'screenHeight' can't be null"; + } + if ($this->container['screenWidth'] === null) { + $invalidProperties[] = "'screenWidth' can't be null"; + } + if ($this->container['timeZoneOffset'] === null) { + $invalidProperties[] = "'timeZoneOffset' can't be null"; + } + if ($this->container['userAgent'] === null) { + $invalidProperties[] = "'userAgent' 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 acceptHeader + * + * @return string + */ + public function getAcceptHeader() + { + return $this->container['acceptHeader']; + } + + /** + * Sets acceptHeader + * + * @param string $acceptHeader The accept header value of the shopper's browser. + * + * @return self + */ + public function setAcceptHeader($acceptHeader) + { + if (is_null($acceptHeader)) { + throw new \InvalidArgumentException('non-nullable acceptHeader cannot be null'); + } + $this->container['acceptHeader'] = $acceptHeader; + + return $this; + } + + /** + * Gets colorDepth + * + * @return int + */ + public function getColorDepth() + { + return $this->container['colorDepth']; + } + + /** + * Sets colorDepth + * + * @param int $colorDepth The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. + * + * @return self + */ + public function setColorDepth($colorDepth) + { + // Do nothing for nullable integers + $this->container['colorDepth'] = $colorDepth; + + return $this; + } + + /** + * Gets javaEnabled + * + * @return bool + */ + public function getJavaEnabled() + { + return $this->container['javaEnabled']; + } + + /** + * Sets javaEnabled + * + * @param bool $javaEnabled Boolean value indicating if the shopper's browser is able to execute Java. + * + * @return self + */ + public function setJavaEnabled($javaEnabled) + { + if (is_null($javaEnabled)) { + throw new \InvalidArgumentException('non-nullable javaEnabled cannot be null'); + } + $this->container['javaEnabled'] = $javaEnabled; + + return $this; + } + + /** + * Gets javaScriptEnabled + * + * @return bool|null + */ + public function getJavaScriptEnabled() + { + return $this->container['javaScriptEnabled']; + } + + /** + * Sets javaScriptEnabled + * + * @param bool|null $javaScriptEnabled Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present. + * + * @return self + */ + public function setJavaScriptEnabled($javaScriptEnabled) + { + if (is_null($javaScriptEnabled)) { + throw new \InvalidArgumentException('non-nullable javaScriptEnabled cannot be null'); + } + $this->container['javaScriptEnabled'] = $javaScriptEnabled; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47). + * + * @return self + */ + public function setLanguage($language) + { + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); + } + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets screenHeight + * + * @return int + */ + public function getScreenHeight() + { + return $this->container['screenHeight']; + } + + /** + * Sets screenHeight + * + * @param int $screenHeight The total height of the shopper's device screen in pixels. + * + * @return self + */ + public function setScreenHeight($screenHeight) + { + // Do nothing for nullable integers + $this->container['screenHeight'] = $screenHeight; + + return $this; + } + + /** + * Gets screenWidth + * + * @return int + */ + public function getScreenWidth() + { + return $this->container['screenWidth']; + } + + /** + * Sets screenWidth + * + * @param int $screenWidth The total width of the shopper's device screen in pixels. + * + * @return self + */ + public function setScreenWidth($screenWidth) + { + // Do nothing for nullable integers + $this->container['screenWidth'] = $screenWidth; + + return $this; + } + + /** + * Gets timeZoneOffset + * + * @return int + */ + public function getTimeZoneOffset() + { + return $this->container['timeZoneOffset']; + } + + /** + * Sets timeZoneOffset + * + * @param int $timeZoneOffset Time difference between UTC time and the shopper's browser local time, in minutes. + * + * @return self + */ + public function setTimeZoneOffset($timeZoneOffset) + { + // Do nothing for nullable integers + $this->container['timeZoneOffset'] = $timeZoneOffset; + + return $this; + } + + /** + * Gets userAgent + * + * @return string + */ + public function getUserAgent() + { + return $this->container['userAgent']; + } + + /** + * Sets userAgent + * + * @param string $userAgent The user agent value of the shopper's browser. + * + * @return self + */ + public function setUserAgent($userAgent) + { + if (is_null($userAgent)) { + throw new \InvalidArgumentException('non-nullable userAgent cannot be null'); + } + $this->container['userAgent'] = $userAgent; + + 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/Payment/CancelOrRefundRequest.php b/src/Adyen/Model/Payment/CancelOrRefundRequest.php new file mode 100644 index 000000000..24cf16714 --- /dev/null +++ b/src/Adyen/Model/Payment/CancelOrRefundRequest.php @@ -0,0 +1,662 @@ + + */ +class CancelOrRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CancelOrRefundRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['originalReference'] === null) { + $invalidProperties[] = "'originalReference' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string|null + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string|null $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets originalReference + * + * @return string + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payment/CancelRequest.php b/src/Adyen/Model/Payment/CancelRequest.php new file mode 100644 index 000000000..c85fcfb46 --- /dev/null +++ b/src/Adyen/Model/Payment/CancelRequest.php @@ -0,0 +1,696 @@ + + */ +class CancelRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CancelRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'splits' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'splits' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'splits' => 'splits', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'splits' => 'setSplits', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'splits' => 'getSplits', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['originalReference'] === null) { + $invalidProperties[] = "'originalReference' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string|null + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string|null $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets originalReference + * + * @return string + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\Split[]|null $splits An array of objects specifying how the amount 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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payment/CaptureRequest.php b/src/Adyen/Model/Payment/CaptureRequest.php new file mode 100644 index 000000000..fdead8d65 --- /dev/null +++ b/src/Adyen/Model/Payment/CaptureRequest.php @@ -0,0 +1,733 @@ + + */ +class CaptureRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CaptureRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'modificationAmount' => '\Adyen\Model\Payment\Amount', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'modificationAmount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'splits' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'modificationAmount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'splits' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'modificationAmount' => 'modificationAmount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'splits' => 'splits', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'modificationAmount' => 'setModificationAmount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'splits' => 'setSplits', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'modificationAmount' => 'getModificationAmount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'splits' => 'getSplits', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('modificationAmount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['modificationAmount'] === null) { + $invalidProperties[] = "'modificationAmount' can't be null"; + } + if ($this->container['originalReference'] === null) { + $invalidProperties[] = "'originalReference' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets modificationAmount + * + * @return \Adyen\Model\Payment\Amount + */ + public function getModificationAmount() + { + return $this->container['modificationAmount']; + } + + /** + * Sets modificationAmount + * + * @param \Adyen\Model\Payment\Amount $modificationAmount modificationAmount + * + * @return self + */ + public function setModificationAmount($modificationAmount) + { + if (is_null($modificationAmount)) { + throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); + } + $this->container['modificationAmount'] = $modificationAmount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string|null + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string|null $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets originalReference + * + * @return string + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\Split[]|null $splits An array of objects specifying how the amount 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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payment/Card.php b/src/Adyen/Model/Payment/Card.php new file mode 100644 index 000000000..3ac7b44b6 --- /dev/null +++ b/src/Adyen/Model/Payment/Card.php @@ -0,0 +1,622 @@ + + */ +class Card implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Card'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cvc' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'holderName' => 'string', + 'issueNumber' => 'string', + 'number' => 'string', + 'startMonth' => 'string', + 'startYear' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cvc' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'holderName' => null, + 'issueNumber' => null, + 'number' => null, + 'startMonth' => null, + 'startYear' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cvc' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'holderName' => false, + 'issueNumber' => false, + 'number' => false, + 'startMonth' => false, + 'startYear' => 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 = [ + 'cvc' => 'cvc', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'holderName' => 'holderName', + 'issueNumber' => 'issueNumber', + 'number' => 'number', + 'startMonth' => 'startMonth', + 'startYear' => 'startYear' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cvc' => 'setCvc', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'holderName' => 'setHolderName', + 'issueNumber' => 'setIssueNumber', + 'number' => 'setNumber', + 'startMonth' => 'setStartMonth', + 'startYear' => 'setStartYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cvc' => 'getCvc', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'holderName' => 'getHolderName', + 'issueNumber' => 'getIssueNumber', + 'number' => 'getNumber', + 'startMonth' => 'getStartMonth', + 'startYear' => 'getStartYear' + ]; + + /** + * 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('cvc', $data ?? [], null); + $this->setIfExists('expiryMonth', $data ?? [], null); + $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('issueNumber', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('startMonth', $data ?? [], null); + $this->setIfExists('startYear', $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 cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. + * + * @return self + */ + public function setCvc($cvc) + { + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); + } + $this->container['cvc'] = $cvc; + + return $this; + } + + /** + * Gets expiryMonth + * + * @return string|null + */ + public function getExpiryMonth() + { + return $this->container['expiryMonth']; + } + + /** + * Sets expiryMonth + * + * @param string|null $expiryMonth The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November + * + * @return self + */ + public function setExpiryMonth($expiryMonth) + { + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); + } + $this->container['expiryMonth'] = $expiryMonth; + + return $this; + } + + /** + * Gets expiryYear + * + * @return string|null + */ + public function getExpiryYear() + { + return $this->container['expiryYear']; + } + + /** + * Sets expiryYear + * + * @param string|null $expiryYear The card expiry year. Format: 4 digits. For example: 2020 + * + * @return self + */ + public function setExpiryYear($expiryYear) + { + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); + } + $this->container['expiryYear'] = $expiryYear; + + return $this; + } + + /** + * Gets holderName + * + * @return string|null + */ + public function getHolderName() + { + return $this->container['holderName']; + } + + /** + * Sets holderName + * + * @param string|null $holderName The name of the cardholder, as printed on the card. + * + * @return self + */ + public function setHolderName($holderName) + { + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); + } + $this->container['holderName'] = $holderName; + + return $this; + } + + /** + * Gets issueNumber + * + * @return string|null + */ + public function getIssueNumber() + { + return $this->container['issueNumber']; + } + + /** + * Sets issueNumber + * + * @param string|null $issueNumber The issue number of the card (for some UK debit cards only). + * + * @return self + */ + public function setIssueNumber($issueNumber) + { + if (is_null($issueNumber)) { + throw new \InvalidArgumentException('non-nullable issueNumber cannot be null'); + } + $this->container['issueNumber'] = $issueNumber; + + return $this; + } + + /** + * Gets number + * + * @return string|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string|null $number The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets startMonth + * + * @return string|null + */ + public function getStartMonth() + { + return $this->container['startMonth']; + } + + /** + * Sets startMonth + * + * @param string|null $startMonth The month component of the start date (for some UK debit cards only). + * + * @return self + */ + public function setStartMonth($startMonth) + { + if (is_null($startMonth)) { + throw new \InvalidArgumentException('non-nullable startMonth cannot be null'); + } + $this->container['startMonth'] = $startMonth; + + return $this; + } + + /** + * Gets startYear + * + * @return string|null + */ + public function getStartYear() + { + return $this->container['startYear']; + } + + /** + * Sets startYear + * + * @param string|null $startYear The year component of the start date (for some UK debit cards only). + * + * @return self + */ + public function setStartYear($startYear) + { + if (is_null($startYear)) { + throw new \InvalidArgumentException('non-nullable startYear cannot be null'); + } + $this->container['startYear'] = $startYear; + + 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/Payment/CommonField.php b/src/Adyen/Model/Payment/CommonField.php new file mode 100644 index 000000000..f0f8e99ea --- /dev/null +++ b/src/Adyen/Model/Payment/CommonField.php @@ -0,0 +1,418 @@ + + */ +class CommonField implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CommonField'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'version' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'name' => false, + 'version' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'version' => 'getVersion' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('version', $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 name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the field. For example, Name of External Platform. + * + * @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 version + * + * @return string|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string|null $version Version of the field. For example, Version of External Platform. + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/Payment/DeviceRenderOptions.php b/src/Adyen/Model/Payment/DeviceRenderOptions.php new file mode 100644 index 000000000..57b03a790 --- /dev/null +++ b/src/Adyen/Model/Payment/DeviceRenderOptions.php @@ -0,0 +1,482 @@ + + */ +class DeviceRenderOptions implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DeviceRenderOptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sdkInterface' => 'string', + 'sdkUiType' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sdkInterface' => null, + 'sdkUiType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'sdkInterface' => false, + 'sdkUiType' => 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 = [ + 'sdkInterface' => 'sdkInterface', + 'sdkUiType' => 'sdkUiType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sdkInterface' => 'setSdkInterface', + 'sdkUiType' => 'setSdkUiType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sdkInterface' => 'getSdkInterface', + 'sdkUiType' => 'getSdkUiType' + ]; + + /** + * 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 SDK_INTERFACE_NATIVE = 'native'; + public const SDK_INTERFACE_HTML = 'html'; + public const SDK_INTERFACE_BOTH = 'both'; + public const SDK_UI_TYPE_MULTI_SELECT = 'multiSelect'; + public const SDK_UI_TYPE_OTHER_HTML = 'otherHtml'; + public const SDK_UI_TYPE_OUT_OF_BAND = 'outOfBand'; + public const SDK_UI_TYPE_SINGLE_SELECT = 'singleSelect'; + public const SDK_UI_TYPE_TEXT = 'text'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSdkInterfaceAllowableValues() + { + return [ + self::SDK_INTERFACE_NATIVE, + self::SDK_INTERFACE_HTML, + self::SDK_INTERFACE_BOTH, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSdkUiTypeAllowableValues() + { + return [ + self::SDK_UI_TYPE_MULTI_SELECT, + self::SDK_UI_TYPE_OTHER_HTML, + self::SDK_UI_TYPE_OUT_OF_BAND, + self::SDK_UI_TYPE_SINGLE_SELECT, + self::SDK_UI_TYPE_TEXT, + ]; + } + /** + * 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('sdkInterface', $data ?? [], 'both'); + $this->setIfExists('sdkUiType', $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->getSdkInterfaceAllowableValues(); + if (!is_null($this->container['sdkInterface']) && !in_array($this->container['sdkInterface'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'sdkInterface', must be one of '%s'", + $this->container['sdkInterface'], + 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 sdkInterface + * + * @return string|null + */ + public function getSdkInterface() + { + return $this->container['sdkInterface']; + } + + /** + * Sets sdkInterface + * + * @param string|null $sdkInterface Supported SDK interface types. Allowed values: * native * html * both + * + * @return self + */ + public function setSdkInterface($sdkInterface) + { + if (is_null($sdkInterface)) { + throw new \InvalidArgumentException('non-nullable sdkInterface cannot be null'); + } + $allowedValues = $this->getSdkInterfaceAllowableValues(); + if (!in_array($sdkInterface, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'sdkInterface', must be one of '%s'", + $sdkInterface, + implode("', '", $allowedValues) + ) + ); + } + $this->container['sdkInterface'] = $sdkInterface; + + return $this; + } + + /** + * Gets sdkUiType + * + * @return string[]|null + */ + public function getSdkUiType() + { + return $this->container['sdkUiType']; + } + + /** + * Sets sdkUiType + * + * @param string[]|null $sdkUiType UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect + * + * @return self + */ + public function setSdkUiType($sdkUiType) + { + if (is_null($sdkUiType)) { + throw new \InvalidArgumentException('non-nullable sdkUiType cannot be null'); + } + $allowedValues = $this->getSdkUiTypeAllowableValues(); + if (array_diff($sdkUiType, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'sdkUiType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['sdkUiType'] = $sdkUiType; + + 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/Payment/DonationRequest.php b/src/Adyen/Model/Payment/DonationRequest.php new file mode 100644 index 000000000..51b64d6c0 --- /dev/null +++ b/src/Adyen/Model/Payment/DonationRequest.php @@ -0,0 +1,563 @@ + + */ +class DonationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DonationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'donationAccount' => 'string', + 'merchantAccount' => 'string', + 'modificationAmount' => '\Adyen\Model\Payment\Amount', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'donationAccount' => null, + 'merchantAccount' => null, + 'modificationAmount' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'donationAccount' => false, + 'merchantAccount' => false, + 'modificationAmount' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => 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 = [ + 'donationAccount' => 'donationAccount', + 'merchantAccount' => 'merchantAccount', + 'modificationAmount' => 'modificationAmount', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'donationAccount' => 'setDonationAccount', + 'merchantAccount' => 'setMerchantAccount', + 'modificationAmount' => 'setModificationAmount', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'donationAccount' => 'getDonationAccount', + 'merchantAccount' => 'getMerchantAccount', + 'modificationAmount' => 'getModificationAmount', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference' + ]; + + /** + * 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('donationAccount', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('modificationAmount', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $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['donationAccount'] === null) { + $invalidProperties[] = "'donationAccount' can't be null"; + } + if ($this->container['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['modificationAmount'] === null) { + $invalidProperties[] = "'modificationAmount' 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 donationAccount + * + * @return string + */ + public function getDonationAccount() + { + return $this->container['donationAccount']; + } + + /** + * Sets donationAccount + * + * @param string $donationAccount The Adyen account name of the charity. + * + * @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 merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets modificationAmount + * + * @return \Adyen\Model\Payment\Amount + */ + public function getModificationAmount() + { + return $this->container['modificationAmount']; + } + + /** + * Sets modificationAmount + * + * @param \Adyen\Model\Payment\Amount $modificationAmount modificationAmount + * + * @return self + */ + public function setModificationAmount($modificationAmount) + { + if (is_null($modificationAmount)) { + throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); + } + $this->container['modificationAmount'] = $modificationAmount; + + return $this; + } + + /** + * Gets originalReference + * + * @return string|null + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string|null $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/Payment/ExternalPlatform.php b/src/Adyen/Model/Payment/ExternalPlatform.php new file mode 100644 index 000000000..e6a37e453 --- /dev/null +++ b/src/Adyen/Model/Payment/ExternalPlatform.php @@ -0,0 +1,452 @@ + + */ +class ExternalPlatform implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ExternalPlatform'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'integrator' => 'string', + 'name' => 'string', + 'version' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'integrator' => null, + 'name' => null, + 'version' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'integrator' => false, + 'name' => false, + 'version' => 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 = [ + 'integrator' => 'integrator', + 'name' => 'name', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'integrator' => 'setIntegrator', + 'name' => 'setName', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'integrator' => 'getIntegrator', + 'name' => 'getName', + 'version' => 'getVersion' + ]; + + /** + * 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('integrator', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('version', $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 integrator + * + * @return string|null + */ + public function getIntegrator() + { + return $this->container['integrator']; + } + + /** + * Sets integrator + * + * @param string|null $integrator External platform integrator. + * + * @return self + */ + public function setIntegrator($integrator) + { + if (is_null($integrator)) { + throw new \InvalidArgumentException('non-nullable integrator cannot be null'); + } + $this->container['integrator'] = $integrator; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the field. For example, Name of External Platform. + * + * @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 version + * + * @return string|null + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string|null $version Version of the field. For example, Version of External Platform. + * + * @return self + */ + public function setVersion($version) + { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + 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/Payment/ForexQuote.php b/src/Adyen/Model/Payment/ForexQuote.php new file mode 100644 index 000000000..93c0968f6 --- /dev/null +++ b/src/Adyen/Model/Payment/ForexQuote.php @@ -0,0 +1,762 @@ + + */ +class ForexQuote implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ForexQuote'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'account' => 'string', + 'accountType' => 'string', + 'baseAmount' => '\Adyen\Model\Payment\Amount', + 'basePoints' => 'int', + 'buy' => '\Adyen\Model\Payment\Amount', + 'interbank' => '\Adyen\Model\Payment\Amount', + 'reference' => 'string', + 'sell' => '\Adyen\Model\Payment\Amount', + 'signature' => 'string', + 'source' => 'string', + 'type' => 'string', + 'validTill' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'account' => null, + 'accountType' => null, + 'baseAmount' => null, + 'basePoints' => 'int32', + 'buy' => null, + 'interbank' => null, + 'reference' => null, + 'sell' => null, + 'signature' => null, + 'source' => null, + 'type' => null, + 'validTill' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'account' => false, + 'accountType' => false, + 'baseAmount' => false, + 'basePoints' => true, + 'buy' => false, + 'interbank' => false, + 'reference' => false, + 'sell' => false, + 'signature' => false, + 'source' => false, + 'type' => false, + 'validTill' => 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 = [ + 'account' => 'account', + 'accountType' => 'accountType', + 'baseAmount' => 'baseAmount', + 'basePoints' => 'basePoints', + 'buy' => 'buy', + 'interbank' => 'interbank', + 'reference' => 'reference', + 'sell' => 'sell', + 'signature' => 'signature', + 'source' => 'source', + 'type' => 'type', + 'validTill' => 'validTill' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'account' => 'setAccount', + 'accountType' => 'setAccountType', + 'baseAmount' => 'setBaseAmount', + 'basePoints' => 'setBasePoints', + 'buy' => 'setBuy', + 'interbank' => 'setInterbank', + 'reference' => 'setReference', + 'sell' => 'setSell', + 'signature' => 'setSignature', + 'source' => 'setSource', + 'type' => 'setType', + 'validTill' => 'setValidTill' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'account' => 'getAccount', + 'accountType' => 'getAccountType', + 'baseAmount' => 'getBaseAmount', + 'basePoints' => 'getBasePoints', + 'buy' => 'getBuy', + 'interbank' => 'getInterbank', + 'reference' => 'getReference', + 'sell' => 'getSell', + 'signature' => 'getSignature', + 'source' => 'getSource', + 'type' => 'getType', + 'validTill' => 'getValidTill' + ]; + + /** + * 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('account', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('baseAmount', $data ?? [], null); + $this->setIfExists('basePoints', $data ?? [], null); + $this->setIfExists('buy', $data ?? [], null); + $this->setIfExists('interbank', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('sell', $data ?? [], null); + $this->setIfExists('signature', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('validTill', $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['basePoints'] === null) { + $invalidProperties[] = "'basePoints' can't be null"; + } + if ($this->container['validTill'] === null) { + $invalidProperties[] = "'validTill' 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 account + * + * @return string|null + */ + public function getAccount() + { + return $this->container['account']; + } + + /** + * Sets account + * + * @param string|null $account The account name. + * + * @return self + */ + public function setAccount($account) + { + if (is_null($account)) { + throw new \InvalidArgumentException('non-nullable account cannot be null'); + } + $this->container['account'] = $account; + + return $this; + } + + /** + * Gets accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The account type. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets baseAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getBaseAmount() + { + return $this->container['baseAmount']; + } + + /** + * Sets baseAmount + * + * @param \Adyen\Model\Payment\Amount|null $baseAmount baseAmount + * + * @return self + */ + public function setBaseAmount($baseAmount) + { + if (is_null($baseAmount)) { + throw new \InvalidArgumentException('non-nullable baseAmount cannot be null'); + } + $this->container['baseAmount'] = $baseAmount; + + return $this; + } + + /** + * Gets basePoints + * + * @return int + */ + public function getBasePoints() + { + return $this->container['basePoints']; + } + + /** + * Sets basePoints + * + * @param int $basePoints The base points. + * + * @return self + */ + public function setBasePoints($basePoints) + { + // Do nothing for nullable integers + $this->container['basePoints'] = $basePoints; + + return $this; + } + + /** + * Gets buy + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getBuy() + { + return $this->container['buy']; + } + + /** + * Sets buy + * + * @param \Adyen\Model\Payment\Amount|null $buy buy + * + * @return self + */ + public function setBuy($buy) + { + if (is_null($buy)) { + throw new \InvalidArgumentException('non-nullable buy cannot be null'); + } + $this->container['buy'] = $buy; + + return $this; + } + + /** + * Gets interbank + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getInterbank() + { + return $this->container['interbank']; + } + + /** + * Sets interbank + * + * @param \Adyen\Model\Payment\Amount|null $interbank interbank + * + * @return self + */ + public function setInterbank($interbank) + { + if (is_null($interbank)) { + throw new \InvalidArgumentException('non-nullable interbank cannot be null'); + } + $this->container['interbank'] = $interbank; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference assigned to the forex quote request. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets sell + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getSell() + { + return $this->container['sell']; + } + + /** + * Sets sell + * + * @param \Adyen\Model\Payment\Amount|null $sell sell + * + * @return self + */ + public function setSell($sell) + { + if (is_null($sell)) { + throw new \InvalidArgumentException('non-nullable sell cannot be null'); + } + $this->container['sell'] = $sell; + + return $this; + } + + /** + * Gets signature + * + * @return string|null + */ + public function getSignature() + { + return $this->container['signature']; + } + + /** + * Sets signature + * + * @param string|null $signature The signature to validate the integrity. + * + * @return self + */ + public function setSignature($signature) + { + if (is_null($signature)) { + throw new \InvalidArgumentException('non-nullable signature cannot be null'); + } + $this->container['signature'] = $signature; + + return $this; + } + + /** + * Gets source + * + * @return string|null + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source The source of the forex quote. + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of forex. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets validTill + * + * @return \DateTime + */ + public function getValidTill() + { + return $this->container['validTill']; + } + + /** + * Sets validTill + * + * @param \DateTime $validTill The date until which the forex quote is valid. + * + * @return self + */ + public function setValidTill($validTill) + { + if (is_null($validTill)) { + throw new \InvalidArgumentException('non-nullable validTill cannot be null'); + } + $this->container['validTill'] = $validTill; + + 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/Payment/FraudCheckResult.php b/src/Adyen/Model/Payment/FraudCheckResult.php new file mode 100644 index 000000000..7a4e7b902 --- /dev/null +++ b/src/Adyen/Model/Payment/FraudCheckResult.php @@ -0,0 +1,457 @@ + + */ +class FraudCheckResult implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FraudCheckResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountScore' => 'int', + 'checkId' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountScore' => 'int32', + 'checkId' => 'int32', + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountScore' => true, + 'checkId' => true, + 'name' => 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 = [ + 'accountScore' => 'accountScore', + 'checkId' => 'checkId', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountScore' => 'setAccountScore', + 'checkId' => 'setCheckId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountScore' => 'getAccountScore', + 'checkId' => 'getCheckId', + 'name' => 'getName' + ]; + + /** + * 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('accountScore', $data ?? [], null); + $this->setIfExists('checkId', $data ?? [], null); + $this->setIfExists('name', $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['accountScore'] === null) { + $invalidProperties[] = "'accountScore' can't be null"; + } + if ($this->container['checkId'] === null) { + $invalidProperties[] = "'checkId' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' 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 accountScore + * + * @return int + */ + public function getAccountScore() + { + return $this->container['accountScore']; + } + + /** + * Sets accountScore + * + * @param int $accountScore The fraud score generated by the risk check. + * + * @return self + */ + public function setAccountScore($accountScore) + { + // Do nothing for nullable integers + $this->container['accountScore'] = $accountScore; + + return $this; + } + + /** + * Gets checkId + * + * @return int + */ + public function getCheckId() + { + return $this->container['checkId']; + } + + /** + * Sets checkId + * + * @param int $checkId The ID of the risk check. + * + * @return self + */ + public function setCheckId($checkId) + { + // Do nothing for nullable integers + $this->container['checkId'] = $checkId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the risk check. + * + * @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; + } + /** + * 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/Payment/FraudCheckResultWrapper.php b/src/Adyen/Model/Payment/FraudCheckResultWrapper.php new file mode 100644 index 000000000..c8dd0f034 --- /dev/null +++ b/src/Adyen/Model/Payment/FraudCheckResultWrapper.php @@ -0,0 +1,384 @@ + + */ +class FraudCheckResultWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FraudCheckResultWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fraudCheckResult' => '\Adyen\Model\Payment\FraudCheckResult' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fraudCheckResult' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'fraudCheckResult' => 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 = [ + 'fraudCheckResult' => 'FraudCheckResult' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fraudCheckResult' => 'setFraudCheckResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fraudCheckResult' => 'getFraudCheckResult' + ]; + + /** + * 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('fraudCheckResult', $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 fraudCheckResult + * + * @return \Adyen\Model\Payment\FraudCheckResult|null + */ + public function getFraudCheckResult() + { + return $this->container['fraudCheckResult']; + } + + /** + * Sets fraudCheckResult + * + * @param \Adyen\Model\Payment\FraudCheckResult|null $fraudCheckResult fraudCheckResult + * + * @return self + */ + public function setFraudCheckResult($fraudCheckResult) + { + if (is_null($fraudCheckResult)) { + throw new \InvalidArgumentException('non-nullable fraudCheckResult cannot be null'); + } + $this->container['fraudCheckResult'] = $fraudCheckResult; + + 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/Payment/FraudResult.php b/src/Adyen/Model/Payment/FraudResult.php new file mode 100644 index 000000000..304e4ce13 --- /dev/null +++ b/src/Adyen/Model/Payment/FraudResult.php @@ -0,0 +1,419 @@ + + */ +class FraudResult implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FraudResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountScore' => 'int', + 'results' => '\Adyen\Model\Payment\FraudCheckResultWrapper[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountScore' => 'int32', + 'results' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountScore' => true, + 'results' => 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 = [ + 'accountScore' => 'accountScore', + 'results' => 'results' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountScore' => 'setAccountScore', + 'results' => 'setResults' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountScore' => 'getAccountScore', + 'results' => 'getResults' + ]; + + /** + * 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('accountScore', $data ?? [], null); + $this->setIfExists('results', $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['accountScore'] === null) { + $invalidProperties[] = "'accountScore' 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 accountScore + * + * @return int + */ + public function getAccountScore() + { + return $this->container['accountScore']; + } + + /** + * Sets accountScore + * + * @param int $accountScore The total fraud score generated by the risk checks. + * + * @return self + */ + public function setAccountScore($accountScore) + { + // Do nothing for nullable integers + $this->container['accountScore'] = $accountScore; + + return $this; + } + + /** + * Gets results + * + * @return \Adyen\Model\Payment\FraudCheckResultWrapper[]|null + */ + public function getResults() + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \Adyen\Model\Payment\FraudCheckResultWrapper[]|null $results The result of the individual risk checks. + * + * @return self + */ + public function setResults($results) + { + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); + } + $this->container['results'] = $results; + + 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/Payment/FundDestination.php b/src/Adyen/Model/Payment/FundDestination.php new file mode 100644 index 000000000..e26d92822 --- /dev/null +++ b/src/Adyen/Model/Payment/FundDestination.php @@ -0,0 +1,656 @@ + + */ +class FundDestination implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FundDestination'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'billingAddress' => '\Adyen\Model\Payment\Address', + 'card' => '\Adyen\Model\Payment\Card', + 'selectedRecurringDetailReference' => 'string', + 'shopperEmail' => 'string', + 'shopperName' => '\Adyen\Model\Payment\Name', + 'shopperReference' => 'string', + 'subMerchant' => '\Adyen\Model\Payment\SubMerchant', + 'telephoneNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'billingAddress' => null, + 'card' => null, + 'selectedRecurringDetailReference' => null, + 'shopperEmail' => null, + 'shopperName' => null, + 'shopperReference' => null, + 'subMerchant' => null, + 'telephoneNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'billingAddress' => false, + 'card' => false, + 'selectedRecurringDetailReference' => false, + 'shopperEmail' => false, + 'shopperName' => false, + 'shopperReference' => false, + 'subMerchant' => false, + 'telephoneNumber' => 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 = [ + 'additionalData' => 'additionalData', + 'billingAddress' => 'billingAddress', + 'card' => 'card', + 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', + 'shopperEmail' => 'shopperEmail', + 'shopperName' => 'shopperName', + 'shopperReference' => 'shopperReference', + 'subMerchant' => 'subMerchant', + 'telephoneNumber' => 'telephoneNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'billingAddress' => 'setBillingAddress', + 'card' => 'setCard', + 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', + 'shopperEmail' => 'setShopperEmail', + 'shopperName' => 'setShopperName', + 'shopperReference' => 'setShopperReference', + 'subMerchant' => 'setSubMerchant', + 'telephoneNumber' => 'setTelephoneNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'billingAddress' => 'getBillingAddress', + 'card' => 'getCard', + 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', + 'shopperEmail' => 'getShopperEmail', + 'shopperName' => 'getShopperName', + 'shopperReference' => 'getShopperReference', + 'subMerchant' => 'getSubMerchant', + 'telephoneNumber' => 'getTelephoneNumber' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); + $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('shopperReference', $data ?? [], null); + $this->setIfExists('subMerchant', $data ?? [], null); + $this->setIfExists('telephoneNumber', $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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData a map of name/value pairs for passing in additional/industry-specific data + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets billingAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param \Adyen\Model\Payment\Address|null $billingAddress billingAddress + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets card + * + * @return \Adyen\Model\Payment\Card|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \Adyen\Model\Payment\Card|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + throw new \InvalidArgumentException('non-nullable card cannot be null'); + } + $this->container['card'] = $card; + + return $this; + } + + /** + * Gets selectedRecurringDetailReference + * + * @return string|null + */ + public function getSelectedRecurringDetailReference() + { + return $this->container['selectedRecurringDetailReference']; + } + + /** + * Sets selectedRecurringDetailReference + * + * @param string|null $selectedRecurringDetailReference The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * + * @return self + */ + public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) + { + if (is_null($selectedRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); + } + $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail the email address of the person + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets shopperName + * + * @return \Adyen\Model\Payment\Name|null + */ + public function getShopperName() + { + return $this->container['shopperName']; + } + + /** + * Sets shopperName + * + * @param \Adyen\Model\Payment\Name|null $shopperName shopperName + * + * @return self + */ + public function setShopperName($shopperName) + { + if (is_null($shopperName)) { + throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); + } + $this->container['shopperName'] = $shopperName; + + return $this; + } + + /** + * Gets shopperReference + * + * @return string|null + */ + public function getShopperReference() + { + return $this->container['shopperReference']; + } + + /** + * Sets shopperReference + * + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * + * @return self + */ + public function setShopperReference($shopperReference) + { + if (is_null($shopperReference)) { + throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); + } + $this->container['shopperReference'] = $shopperReference; + + return $this; + } + + /** + * Gets subMerchant + * + * @return \Adyen\Model\Payment\SubMerchant|null + */ + public function getSubMerchant() + { + return $this->container['subMerchant']; + } + + /** + * Sets subMerchant + * + * @param \Adyen\Model\Payment\SubMerchant|null $subMerchant subMerchant + * + * @return self + */ + public function setSubMerchant($subMerchant) + { + if (is_null($subMerchant)) { + throw new \InvalidArgumentException('non-nullable subMerchant cannot be null'); + } + $this->container['subMerchant'] = $subMerchant; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber the telephone number of the person + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + /** + * 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/Payment/FundSource.php b/src/Adyen/Model/Payment/FundSource.php new file mode 100644 index 000000000..dc52e4923 --- /dev/null +++ b/src/Adyen/Model/Payment/FundSource.php @@ -0,0 +1,554 @@ + + */ +class FundSource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FundSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'billingAddress' => '\Adyen\Model\Payment\Address', + 'card' => '\Adyen\Model\Payment\Card', + 'shopperEmail' => 'string', + 'shopperName' => '\Adyen\Model\Payment\Name', + 'telephoneNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'billingAddress' => null, + 'card' => null, + 'shopperEmail' => null, + 'shopperName' => null, + 'telephoneNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'billingAddress' => false, + 'card' => false, + 'shopperEmail' => false, + 'shopperName' => false, + 'telephoneNumber' => 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 = [ + 'additionalData' => 'additionalData', + 'billingAddress' => 'billingAddress', + 'card' => 'card', + 'shopperEmail' => 'shopperEmail', + 'shopperName' => 'shopperName', + 'telephoneNumber' => 'telephoneNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'billingAddress' => 'setBillingAddress', + 'card' => 'setCard', + 'shopperEmail' => 'setShopperEmail', + 'shopperName' => 'setShopperName', + 'telephoneNumber' => 'setTelephoneNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'billingAddress' => 'getBillingAddress', + 'card' => 'getCard', + 'shopperEmail' => 'getShopperEmail', + 'shopperName' => 'getShopperName', + 'telephoneNumber' => 'getTelephoneNumber' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('telephoneNumber', $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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData A map of name-value pairs for passing additional or industry-specific data. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets billingAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param \Adyen\Model\Payment\Address|null $billingAddress billingAddress + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets card + * + * @return \Adyen\Model\Payment\Card|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \Adyen\Model\Payment\Card|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + throw new \InvalidArgumentException('non-nullable card cannot be null'); + } + $this->container['card'] = $card; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail Email address of the person. + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets shopperName + * + * @return \Adyen\Model\Payment\Name|null + */ + public function getShopperName() + { + return $this->container['shopperName']; + } + + /** + * Sets shopperName + * + * @param \Adyen\Model\Payment\Name|null $shopperName shopperName + * + * @return self + */ + public function setShopperName($shopperName) + { + if (is_null($shopperName)) { + throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); + } + $this->container['shopperName'] = $shopperName; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber Phone number of the person + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + /** + * 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/Payment/Installments.php b/src/Adyen/Model/Payment/Installments.php new file mode 100644 index 000000000..7382fce17 --- /dev/null +++ b/src/Adyen/Model/Payment/Installments.php @@ -0,0 +1,452 @@ + + */ +class Installments implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Installments'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'plan' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'plan' => null, + 'value' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'plan' => false, + 'value' => 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 = [ + 'plan' => 'plan', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'plan' => 'setPlan', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'plan' => 'getPlan', + 'value' => 'getValue' + ]; + + /** + * 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 PLAN_REGULAR = 'regular'; + public const PLAN_REVOLVING = 'revolving'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlanAllowableValues() + { + return [ + self::PLAN_REGULAR, + self::PLAN_REVOLVING, + ]; + } + /** + * 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('plan', $data ?? [], null); + $this->setIfExists('value', $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->getPlanAllowableValues(); + if (!is_null($this->container['plan']) && !in_array($this->container['plan'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'plan', must be one of '%s'", + $this->container['plan'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' 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 plan + * + * @return string|null + */ + public function getPlan() + { + return $this->container['plan']; + } + + /** + * Sets plan + * + * @param string|null $plan The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + * + * @return self + */ + public function setPlan($plan) + { + if (is_null($plan)) { + throw new \InvalidArgumentException('non-nullable plan cannot be null'); + } + $allowedValues = $this->getPlanAllowableValues(); + if (!in_array($plan, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'plan', must be one of '%s'", + $plan, + implode("', '", $allowedValues) + ) + ); + } + $this->container['plan'] = $plan; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + * + * @return self + */ + public function setValue($value) + { + // Do nothing for nullable integers + $this->container['value'] = $value; + + 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/Payment/Mandate.php b/src/Adyen/Model/Payment/Mandate.php new file mode 100644 index 000000000..1fb9d019c --- /dev/null +++ b/src/Adyen/Model/Payment/Mandate.php @@ -0,0 +1,744 @@ + + */ +class Mandate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Mandate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => 'string', + 'amountRule' => 'string', + 'billingAttemptsRule' => 'string', + 'billingDay' => 'string', + 'endsAt' => 'string', + 'frequency' => 'string', + 'remarks' => 'string', + 'startsAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'amountRule' => null, + 'billingAttemptsRule' => null, + 'billingDay' => null, + 'endsAt' => null, + 'frequency' => null, + 'remarks' => null, + 'startsAt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => false, + 'amountRule' => false, + 'billingAttemptsRule' => false, + 'billingDay' => false, + 'endsAt' => false, + 'frequency' => false, + 'remarks' => false, + 'startsAt' => 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', + 'amountRule' => 'amountRule', + 'billingAttemptsRule' => 'billingAttemptsRule', + 'billingDay' => 'billingDay', + 'endsAt' => 'endsAt', + 'frequency' => 'frequency', + 'remarks' => 'remarks', + 'startsAt' => 'startsAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'amountRule' => 'setAmountRule', + 'billingAttemptsRule' => 'setBillingAttemptsRule', + 'billingDay' => 'setBillingDay', + 'endsAt' => 'setEndsAt', + 'frequency' => 'setFrequency', + 'remarks' => 'setRemarks', + 'startsAt' => 'setStartsAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'amountRule' => 'getAmountRule', + 'billingAttemptsRule' => 'getBillingAttemptsRule', + 'billingDay' => 'getBillingDay', + 'endsAt' => 'getEndsAt', + 'frequency' => 'getFrequency', + 'remarks' => 'getRemarks', + 'startsAt' => 'getStartsAt' + ]; + + /** + * 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 AMOUNT_RULE_MAX = 'max'; + public const AMOUNT_RULE_EXACT = 'exact'; + public const BILLING_ATTEMPTS_RULE_ON = 'on'; + public const BILLING_ATTEMPTS_RULE_BEFORE = 'before'; + public const BILLING_ATTEMPTS_RULE_AFTER = 'after'; + public const FREQUENCY_ADHOC = 'adhoc'; + public const FREQUENCY_DAILY = 'daily'; + public const FREQUENCY_WEEKLY = 'weekly'; + public const FREQUENCY_BI_WEEKLY = 'biWeekly'; + public const FREQUENCY_MONTHLY = 'monthly'; + public const FREQUENCY_QUARTERLY = 'quarterly'; + public const FREQUENCY_HALF_YEARLY = 'halfYearly'; + public const FREQUENCY_YEARLY = 'yearly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAmountRuleAllowableValues() + { + return [ + self::AMOUNT_RULE_MAX, + self::AMOUNT_RULE_EXACT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBillingAttemptsRuleAllowableValues() + { + return [ + self::BILLING_ATTEMPTS_RULE_ON, + self::BILLING_ATTEMPTS_RULE_BEFORE, + self::BILLING_ATTEMPTS_RULE_AFTER, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFrequencyAllowableValues() + { + return [ + self::FREQUENCY_ADHOC, + self::FREQUENCY_DAILY, + self::FREQUENCY_WEEKLY, + self::FREQUENCY_BI_WEEKLY, + self::FREQUENCY_MONTHLY, + self::FREQUENCY_QUARTERLY, + self::FREQUENCY_HALF_YEARLY, + self::FREQUENCY_YEARLY, + ]; + } + /** + * 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('amountRule', $data ?? [], null); + $this->setIfExists('billingAttemptsRule', $data ?? [], null); + $this->setIfExists('billingDay', $data ?? [], null); + $this->setIfExists('endsAt', $data ?? [], null); + $this->setIfExists('frequency', $data ?? [], null); + $this->setIfExists('remarks', $data ?? [], null); + $this->setIfExists('startsAt', $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"; + } + $allowedValues = $this->getAmountRuleAllowableValues(); + if (!is_null($this->container['amountRule']) && !in_array($this->container['amountRule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'amountRule', must be one of '%s'", + $this->container['amountRule'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getBillingAttemptsRuleAllowableValues(); + if (!is_null($this->container['billingAttemptsRule']) && !in_array($this->container['billingAttemptsRule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'billingAttemptsRule', must be one of '%s'", + $this->container['billingAttemptsRule'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['endsAt'] === null) { + $invalidProperties[] = "'endsAt' can't be null"; + } + if ($this->container['frequency'] === null) { + $invalidProperties[] = "'frequency' can't be null"; + } + $allowedValues = $this->getFrequencyAllowableValues(); + if (!is_null($this->container['frequency']) && !in_array($this->container['frequency'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'frequency', must be one of '%s'", + $this->container['frequency'], + 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 string + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string $amount The billing amount (in minor units) of the recurring transactions. + * + * @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 amountRule + * + * @return string|null + */ + public function getAmountRule() + { + return $this->container['amountRule']; + } + + /** + * Sets amountRule + * + * @param string|null $amountRule The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. + * + * @return self + */ + public function setAmountRule($amountRule) + { + if (is_null($amountRule)) { + throw new \InvalidArgumentException('non-nullable amountRule cannot be null'); + } + $allowedValues = $this->getAmountRuleAllowableValues(); + if (!in_array($amountRule, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'amountRule', must be one of '%s'", + $amountRule, + implode("', '", $allowedValues) + ) + ); + } + $this->container['amountRule'] = $amountRule; + + return $this; + } + + /** + * Gets billingAttemptsRule + * + * @return string|null + */ + public function getBillingAttemptsRule() + { + return $this->container['billingAttemptsRule']; + } + + /** + * Sets billingAttemptsRule + * + * @param string|null $billingAttemptsRule The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. + * + * @return self + */ + public function setBillingAttemptsRule($billingAttemptsRule) + { + if (is_null($billingAttemptsRule)) { + throw new \InvalidArgumentException('non-nullable billingAttemptsRule cannot be null'); + } + $allowedValues = $this->getBillingAttemptsRuleAllowableValues(); + if (!in_array($billingAttemptsRule, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'billingAttemptsRule', must be one of '%s'", + $billingAttemptsRule, + implode("', '", $allowedValues) + ) + ); + } + $this->container['billingAttemptsRule'] = $billingAttemptsRule; + + return $this; + } + + /** + * Gets billingDay + * + * @return string|null + */ + public function getBillingDay() + { + return $this->container['billingDay']; + } + + /** + * Sets billingDay + * + * @param string|null $billingDay The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. + * + * @return self + */ + public function setBillingDay($billingDay) + { + if (is_null($billingDay)) { + throw new \InvalidArgumentException('non-nullable billingDay cannot be null'); + } + $this->container['billingDay'] = $billingDay; + + return $this; + } + + /** + * Gets endsAt + * + * @return string + */ + public function getEndsAt() + { + return $this->container['endsAt']; + } + + /** + * Sets endsAt + * + * @param string $endsAt End date of the billing plan, in YYYY-MM-DD format. + * + * @return self + */ + public function setEndsAt($endsAt) + { + if (is_null($endsAt)) { + throw new \InvalidArgumentException('non-nullable endsAt cannot be null'); + } + $this->container['endsAt'] = $endsAt; + + return $this; + } + + /** + * Gets frequency + * + * @return string + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string $frequency The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * + * @return self + */ + public function setFrequency($frequency) + { + if (is_null($frequency)) { + throw new \InvalidArgumentException('non-nullable frequency cannot be null'); + } + $allowedValues = $this->getFrequencyAllowableValues(); + if (!in_array($frequency, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'frequency', must be one of '%s'", + $frequency, + implode("', '", $allowedValues) + ) + ); + } + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets remarks + * + * @return string|null + */ + public function getRemarks() + { + return $this->container['remarks']; + } + + /** + * Sets remarks + * + * @param string|null $remarks The message shown by UPI to the shopper on the approval screen. + * + * @return self + */ + public function setRemarks($remarks) + { + if (is_null($remarks)) { + throw new \InvalidArgumentException('non-nullable remarks cannot be null'); + } + $this->container['remarks'] = $remarks; + + return $this; + } + + /** + * Gets startsAt + * + * @return string|null + */ + public function getStartsAt() + { + return $this->container['startsAt']; + } + + /** + * Sets startsAt + * + * @param string|null $startsAt Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. + * + * @return self + */ + public function setStartsAt($startsAt) + { + if (is_null($startsAt)) { + throw new \InvalidArgumentException('non-nullable startsAt cannot be null'); + } + $this->container['startsAt'] = $startsAt; + + 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/Payment/MerchantDevice.php b/src/Adyen/Model/Payment/MerchantDevice.php new file mode 100644 index 000000000..aa09a16dc --- /dev/null +++ b/src/Adyen/Model/Payment/MerchantDevice.php @@ -0,0 +1,452 @@ + + */ +class MerchantDevice implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MerchantDevice'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'os' => 'string', + 'osVersion' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'os' => null, + 'osVersion' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'os' => false, + 'osVersion' => false, + 'reference' => 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 = [ + 'os' => 'os', + 'osVersion' => 'osVersion', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'os' => 'setOs', + 'osVersion' => 'setOsVersion', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'os' => 'getOs', + 'osVersion' => 'getOsVersion', + 'reference' => 'getReference' + ]; + + /** + * 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('os', $data ?? [], null); + $this->setIfExists('osVersion', $data ?? [], null); + $this->setIfExists('reference', $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 os + * + * @return string|null + */ + public function getOs() + { + return $this->container['os']; + } + + /** + * Sets os + * + * @param string|null $os Operating system running on the merchant device. + * + * @return self + */ + public function setOs($os) + { + if (is_null($os)) { + throw new \InvalidArgumentException('non-nullable os cannot be null'); + } + $this->container['os'] = $os; + + return $this; + } + + /** + * Gets osVersion + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion Version of the operating system on the merchant device. + * + * @return self + */ + public function setOsVersion($osVersion) + { + if (is_null($osVersion)) { + throw new \InvalidArgumentException('non-nullable osVersion cannot be null'); + } + $this->container['osVersion'] = $osVersion; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Merchant device reference. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/Payment/MerchantRiskIndicator.php b/src/Adyen/Model/Payment/MerchantRiskIndicator.php new file mode 100644 index 000000000..8673ddc70 --- /dev/null +++ b/src/Adyen/Model/Payment/MerchantRiskIndicator.php @@ -0,0 +1,906 @@ + + */ +class MerchantRiskIndicator implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MerchantRiskIndicator'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'addressMatch' => 'bool', + 'deliveryAddressIndicator' => 'string', + 'deliveryEmail' => 'string', + 'deliveryEmailAddress' => 'string', + 'deliveryTimeframe' => 'string', + 'giftCardAmount' => '\Adyen\Model\Payment\Amount', + 'giftCardCount' => 'int', + 'giftCardCurr' => 'string', + 'preOrderDate' => '\DateTime', + 'preOrderPurchase' => 'bool', + 'preOrderPurchaseInd' => 'string', + 'reorderItems' => 'bool', + 'reorderItemsInd' => 'string', + 'shipIndicator' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'addressMatch' => null, + 'deliveryAddressIndicator' => null, + 'deliveryEmail' => null, + 'deliveryEmailAddress' => null, + 'deliveryTimeframe' => null, + 'giftCardAmount' => null, + 'giftCardCount' => 'int32', + 'giftCardCurr' => null, + 'preOrderDate' => 'date-time', + 'preOrderPurchase' => null, + 'preOrderPurchaseInd' => null, + 'reorderItems' => null, + 'reorderItemsInd' => null, + 'shipIndicator' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'addressMatch' => false, + 'deliveryAddressIndicator' => false, + 'deliveryEmail' => false, + 'deliveryEmailAddress' => false, + 'deliveryTimeframe' => false, + 'giftCardAmount' => false, + 'giftCardCount' => true, + 'giftCardCurr' => false, + 'preOrderDate' => false, + 'preOrderPurchase' => false, + 'preOrderPurchaseInd' => false, + 'reorderItems' => false, + 'reorderItemsInd' => false, + 'shipIndicator' => 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 = [ + 'addressMatch' => 'addressMatch', + 'deliveryAddressIndicator' => 'deliveryAddressIndicator', + 'deliveryEmail' => 'deliveryEmail', + 'deliveryEmailAddress' => 'deliveryEmailAddress', + 'deliveryTimeframe' => 'deliveryTimeframe', + 'giftCardAmount' => 'giftCardAmount', + 'giftCardCount' => 'giftCardCount', + 'giftCardCurr' => 'giftCardCurr', + 'preOrderDate' => 'preOrderDate', + 'preOrderPurchase' => 'preOrderPurchase', + 'preOrderPurchaseInd' => 'preOrderPurchaseInd', + 'reorderItems' => 'reorderItems', + 'reorderItemsInd' => 'reorderItemsInd', + 'shipIndicator' => 'shipIndicator' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'addressMatch' => 'setAddressMatch', + 'deliveryAddressIndicator' => 'setDeliveryAddressIndicator', + 'deliveryEmail' => 'setDeliveryEmail', + 'deliveryEmailAddress' => 'setDeliveryEmailAddress', + 'deliveryTimeframe' => 'setDeliveryTimeframe', + 'giftCardAmount' => 'setGiftCardAmount', + 'giftCardCount' => 'setGiftCardCount', + 'giftCardCurr' => 'setGiftCardCurr', + 'preOrderDate' => 'setPreOrderDate', + 'preOrderPurchase' => 'setPreOrderPurchase', + 'preOrderPurchaseInd' => 'setPreOrderPurchaseInd', + 'reorderItems' => 'setReorderItems', + 'reorderItemsInd' => 'setReorderItemsInd', + 'shipIndicator' => 'setShipIndicator' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'addressMatch' => 'getAddressMatch', + 'deliveryAddressIndicator' => 'getDeliveryAddressIndicator', + 'deliveryEmail' => 'getDeliveryEmail', + 'deliveryEmailAddress' => 'getDeliveryEmailAddress', + 'deliveryTimeframe' => 'getDeliveryTimeframe', + 'giftCardAmount' => 'getGiftCardAmount', + 'giftCardCount' => 'getGiftCardCount', + 'giftCardCurr' => 'getGiftCardCurr', + 'preOrderDate' => 'getPreOrderDate', + 'preOrderPurchase' => 'getPreOrderPurchase', + 'preOrderPurchaseInd' => 'getPreOrderPurchaseInd', + 'reorderItems' => 'getReorderItems', + 'reorderItemsInd' => 'getReorderItemsInd', + 'shipIndicator' => 'getShipIndicator' + ]; + + /** + * 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 DELIVERY_ADDRESS_INDICATOR_SHIP_TO_BILLING_ADDRESS = 'shipToBillingAddress'; + public const DELIVERY_ADDRESS_INDICATOR_SHIP_TO_VERIFIED_ADDRESS = 'shipToVerifiedAddress'; + public const DELIVERY_ADDRESS_INDICATOR_SHIP_TO_NEW_ADDRESS = 'shipToNewAddress'; + public const DELIVERY_ADDRESS_INDICATOR_SHIP_TO_STORE = 'shipToStore'; + public const DELIVERY_ADDRESS_INDICATOR_DIGITAL_GOODS = 'digitalGoods'; + public const DELIVERY_ADDRESS_INDICATOR_GOODS_NOT_SHIPPED = 'goodsNotShipped'; + public const DELIVERY_ADDRESS_INDICATOR_OTHER = 'other'; + public const DELIVERY_TIMEFRAME_ELECTRONIC_DELIVERY = 'electronicDelivery'; + public const DELIVERY_TIMEFRAME_SAME_DAY_SHIPPING = 'sameDayShipping'; + public const DELIVERY_TIMEFRAME_OVERNIGHT_SHIPPING = 'overnightShipping'; + public const DELIVERY_TIMEFRAME_TWO_OR_MORE_DAYS_SHIPPING = 'twoOrMoreDaysShipping'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeliveryAddressIndicatorAllowableValues() + { + return [ + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_BILLING_ADDRESS, + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_VERIFIED_ADDRESS, + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_NEW_ADDRESS, + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_STORE, + self::DELIVERY_ADDRESS_INDICATOR_DIGITAL_GOODS, + self::DELIVERY_ADDRESS_INDICATOR_GOODS_NOT_SHIPPED, + self::DELIVERY_ADDRESS_INDICATOR_OTHER, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeliveryTimeframeAllowableValues() + { + return [ + self::DELIVERY_TIMEFRAME_ELECTRONIC_DELIVERY, + self::DELIVERY_TIMEFRAME_SAME_DAY_SHIPPING, + self::DELIVERY_TIMEFRAME_OVERNIGHT_SHIPPING, + self::DELIVERY_TIMEFRAME_TWO_OR_MORE_DAYS_SHIPPING, + ]; + } + /** + * 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('addressMatch', $data ?? [], null); + $this->setIfExists('deliveryAddressIndicator', $data ?? [], null); + $this->setIfExists('deliveryEmail', $data ?? [], null); + $this->setIfExists('deliveryEmailAddress', $data ?? [], null); + $this->setIfExists('deliveryTimeframe', $data ?? [], null); + $this->setIfExists('giftCardAmount', $data ?? [], null); + $this->setIfExists('giftCardCount', $data ?? [], null); + $this->setIfExists('giftCardCurr', $data ?? [], null); + $this->setIfExists('preOrderDate', $data ?? [], null); + $this->setIfExists('preOrderPurchase', $data ?? [], null); + $this->setIfExists('preOrderPurchaseInd', $data ?? [], null); + $this->setIfExists('reorderItems', $data ?? [], null); + $this->setIfExists('reorderItemsInd', $data ?? [], null); + $this->setIfExists('shipIndicator', $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->getDeliveryAddressIndicatorAllowableValues(); + if (!is_null($this->container['deliveryAddressIndicator']) && !in_array($this->container['deliveryAddressIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deliveryAddressIndicator', must be one of '%s'", + $this->container['deliveryAddressIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDeliveryTimeframeAllowableValues(); + if (!is_null($this->container['deliveryTimeframe']) && !in_array($this->container['deliveryTimeframe'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deliveryTimeframe', must be one of '%s'", + $this->container['deliveryTimeframe'], + 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 addressMatch + * + * @return bool|null + */ + public function getAddressMatch() + { + return $this->container['addressMatch']; + } + + /** + * Sets addressMatch + * + * @param bool|null $addressMatch Whether the chosen delivery address is identical to the billing address. + * + * @return self + */ + public function setAddressMatch($addressMatch) + { + if (is_null($addressMatch)) { + throw new \InvalidArgumentException('non-nullable addressMatch cannot be null'); + } + $this->container['addressMatch'] = $addressMatch; + + return $this; + } + + /** + * Gets deliveryAddressIndicator + * + * @return string|null + */ + public function getDeliveryAddressIndicator() + { + return $this->container['deliveryAddressIndicator']; + } + + /** + * Sets deliveryAddressIndicator + * + * @param string|null $deliveryAddressIndicator Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` + * + * @return self + */ + public function setDeliveryAddressIndicator($deliveryAddressIndicator) + { + if (is_null($deliveryAddressIndicator)) { + throw new \InvalidArgumentException('non-nullable deliveryAddressIndicator cannot be null'); + } + $allowedValues = $this->getDeliveryAddressIndicatorAllowableValues(); + if (!in_array($deliveryAddressIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deliveryAddressIndicator', must be one of '%s'", + $deliveryAddressIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deliveryAddressIndicator'] = $deliveryAddressIndicator; + + return $this; + } + + /** + * Gets deliveryEmail + * + * @return string|null + * @deprecated + */ + public function getDeliveryEmail() + { + return $this->container['deliveryEmail']; + } + + /** + * Sets deliveryEmail + * + * @param string|null $deliveryEmail The delivery email address (for digital goods). + * + * @return self + * @deprecated + */ + public function setDeliveryEmail($deliveryEmail) + { + if (is_null($deliveryEmail)) { + throw new \InvalidArgumentException('non-nullable deliveryEmail cannot be null'); + } + $this->container['deliveryEmail'] = $deliveryEmail; + + return $this; + } + + /** + * Gets deliveryEmailAddress + * + * @return string|null + */ + public function getDeliveryEmailAddress() + { + return $this->container['deliveryEmailAddress']; + } + + /** + * Sets deliveryEmailAddress + * + * @param string|null $deliveryEmailAddress For Electronic delivery, the email address to which the merchandise was delivered. Maximum length: 254 characters. + * + * @return self + */ + public function setDeliveryEmailAddress($deliveryEmailAddress) + { + if (is_null($deliveryEmailAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryEmailAddress cannot be null'); + } + $this->container['deliveryEmailAddress'] = $deliveryEmailAddress; + + return $this; + } + + /** + * Gets deliveryTimeframe + * + * @return string|null + */ + public function getDeliveryTimeframe() + { + return $this->container['deliveryTimeframe']; + } + + /** + * Sets deliveryTimeframe + * + * @param string|null $deliveryTimeframe The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` + * + * @return self + */ + public function setDeliveryTimeframe($deliveryTimeframe) + { + if (is_null($deliveryTimeframe)) { + throw new \InvalidArgumentException('non-nullable deliveryTimeframe cannot be null'); + } + $allowedValues = $this->getDeliveryTimeframeAllowableValues(); + if (!in_array($deliveryTimeframe, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deliveryTimeframe', must be one of '%s'", + $deliveryTimeframe, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deliveryTimeframe'] = $deliveryTimeframe; + + return $this; + } + + /** + * Gets giftCardAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getGiftCardAmount() + { + return $this->container['giftCardAmount']; + } + + /** + * Sets giftCardAmount + * + * @param \Adyen\Model\Payment\Amount|null $giftCardAmount giftCardAmount + * + * @return self + */ + public function setGiftCardAmount($giftCardAmount) + { + if (is_null($giftCardAmount)) { + throw new \InvalidArgumentException('non-nullable giftCardAmount cannot be null'); + } + $this->container['giftCardAmount'] = $giftCardAmount; + + return $this; + } + + /** + * Gets giftCardCount + * + * @return int|null + */ + public function getGiftCardCount() + { + return $this->container['giftCardCount']; + } + + /** + * Sets giftCardCount + * + * @param int|null $giftCardCount For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. + * + * @return self + */ + public function setGiftCardCount($giftCardCount) + { + // Do nothing for nullable integers + $this->container['giftCardCount'] = $giftCardCount; + + return $this; + } + + /** + * Gets giftCardCurr + * + * @return string|null + */ + public function getGiftCardCurr() + { + return $this->container['giftCardCurr']; + } + + /** + * Sets giftCardCurr + * + * @param string|null $giftCardCurr For prepaid or gift card purchase, [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) three-digit currency code of the gift card, other than those listed in Table A.5 of the EMVCo 3D Secure Protocol and Core Functions Specification. + * + * @return self + */ + public function setGiftCardCurr($giftCardCurr) + { + if (is_null($giftCardCurr)) { + throw new \InvalidArgumentException('non-nullable giftCardCurr cannot be null'); + } + $this->container['giftCardCurr'] = $giftCardCurr; + + return $this; + } + + /** + * Gets preOrderDate + * + * @return \DateTime|null + */ + public function getPreOrderDate() + { + return $this->container['preOrderDate']; + } + + /** + * Sets preOrderDate + * + * @param \DateTime|null $preOrderDate For pre-order purchases, the expected date this product will be available to the shopper. + * + * @return self + */ + public function setPreOrderDate($preOrderDate) + { + if (is_null($preOrderDate)) { + throw new \InvalidArgumentException('non-nullable preOrderDate cannot be null'); + } + $this->container['preOrderDate'] = $preOrderDate; + + return $this; + } + + /** + * Gets preOrderPurchase + * + * @return bool|null + */ + public function getPreOrderPurchase() + { + return $this->container['preOrderPurchase']; + } + + /** + * Sets preOrderPurchase + * + * @param bool|null $preOrderPurchase Indicator for whether this transaction is for pre-ordering a product. + * + * @return self + */ + public function setPreOrderPurchase($preOrderPurchase) + { + if (is_null($preOrderPurchase)) { + throw new \InvalidArgumentException('non-nullable preOrderPurchase cannot be null'); + } + $this->container['preOrderPurchase'] = $preOrderPurchase; + + return $this; + } + + /** + * Gets preOrderPurchaseInd + * + * @return string|null + */ + public function getPreOrderPurchaseInd() + { + return $this->container['preOrderPurchaseInd']; + } + + /** + * Sets preOrderPurchaseInd + * + * @param string|null $preOrderPurchaseInd Indicates whether Cardholder is placing an order for merchandise with a future availability or release date. + * + * @return self + */ + public function setPreOrderPurchaseInd($preOrderPurchaseInd) + { + if (is_null($preOrderPurchaseInd)) { + throw new \InvalidArgumentException('non-nullable preOrderPurchaseInd cannot be null'); + } + $this->container['preOrderPurchaseInd'] = $preOrderPurchaseInd; + + return $this; + } + + /** + * Gets reorderItems + * + * @return bool|null + */ + public function getReorderItems() + { + return $this->container['reorderItems']; + } + + /** + * Sets reorderItems + * + * @param bool|null $reorderItems Indicator for whether the shopper has already purchased the same items in the past. + * + * @return self + */ + public function setReorderItems($reorderItems) + { + if (is_null($reorderItems)) { + throw new \InvalidArgumentException('non-nullable reorderItems cannot be null'); + } + $this->container['reorderItems'] = $reorderItems; + + return $this; + } + + /** + * Gets reorderItemsInd + * + * @return string|null + */ + public function getReorderItemsInd() + { + return $this->container['reorderItemsInd']; + } + + /** + * Sets reorderItemsInd + * + * @param string|null $reorderItemsInd Indicates whether the cardholder is reordering previously purchased merchandise. + * + * @return self + */ + public function setReorderItemsInd($reorderItemsInd) + { + if (is_null($reorderItemsInd)) { + throw new \InvalidArgumentException('non-nullable reorderItemsInd cannot be null'); + } + $this->container['reorderItemsInd'] = $reorderItemsInd; + + return $this; + } + + /** + * Gets shipIndicator + * + * @return string|null + */ + public function getShipIndicator() + { + return $this->container['shipIndicator']; + } + + /** + * Sets shipIndicator + * + * @param string|null $shipIndicator Indicates shipping method chosen for the transaction. + * + * @return self + */ + public function setShipIndicator($shipIndicator) + { + if (is_null($shipIndicator)) { + throw new \InvalidArgumentException('non-nullable shipIndicator cannot be null'); + } + $this->container['shipIndicator'] = $shipIndicator; + + 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/Payment/ModelInterface.php b/src/Adyen/Model/Payment/ModelInterface.php new file mode 100644 index 000000000..68056b478 --- /dev/null +++ b/src/Adyen/Model/Payment/ModelInterface.php @@ -0,0 +1,92 @@ + + */ +class ModificationResult implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ModificationResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'pspReference' => 'string', + 'response' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'pspReference' => null, + 'response' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'pspReference' => false, + 'response' => 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 = [ + 'additionalData' => 'additionalData', + 'pspReference' => 'pspReference', + 'response' => 'response' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'pspReference' => 'setPspReference', + 'response' => 'setResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'pspReference' => 'getPspReference', + 'response' => 'getResponse' + ]; + + /** + * 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 RESPONSE_CAPTURE_RECEIVED = '[capture-received]'; + public const RESPONSE_CANCEL_RECEIVED = '[cancel-received]'; + public const RESPONSE_REFUND_RECEIVED = '[refund-received]'; + public const RESPONSE_CANCEL_OR_REFUND_RECEIVED = '[cancelOrRefund-received]'; + public const RESPONSE_ADJUST_AUTHORISATION_RECEIVED = '[adjustAuthorisation-received]'; + public const RESPONSE_DONATION_RECEIVED = '[donation-received]'; + public const RESPONSE_TECHNICAL_CANCEL_RECEIVED = '[technical-cancel-received]'; + public const RESPONSE_VOID_PENDING_REFUND_RECEIVED = '[voidPendingRefund-received]'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getResponseAllowableValues() + { + return [ + self::RESPONSE_CAPTURE_RECEIVED, + self::RESPONSE_CANCEL_RECEIVED, + self::RESPONSE_REFUND_RECEIVED, + self::RESPONSE_CANCEL_OR_REFUND_RECEIVED, + self::RESPONSE_ADJUST_AUTHORISATION_RECEIVED, + self::RESPONSE_DONATION_RECEIVED, + self::RESPONSE_TECHNICAL_CANCEL_RECEIVED, + self::RESPONSE_VOID_PENDING_REFUND_RECEIVED, + ]; + } + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('pspReference', $data ?? [], null); + $this->setIfExists('response', $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['pspReference'] === null) { + $invalidProperties[] = "'pspReference' can't be null"; + } + if ($this->container['response'] === null) { + $invalidProperties[] = "'response' can't be null"; + } + $allowedValues = $this->getResponseAllowableValues(); + if (!is_null($this->container['response']) && !in_array($this->container['response'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'response', must be one of '%s'", + $this->container['response'], + 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be returned in a particular modification response. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets pspReference + * + * @return string + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string $pspReference Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. + * + * @return self + */ + public function setPspReference($pspReference) + { + if (is_null($pspReference)) { + throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); + } + $this->container['pspReference'] = $pspReference; + + return $this; + } + + /** + * Gets response + * + * @return string + */ + public function getResponse() + { + return $this->container['response']; + } + + /** + * Sets response + * + * @param string $response Indicates if the modification request has been received for processing. + * + * @return self + */ + public function setResponse($response) + { + if (is_null($response)) { + throw new \InvalidArgumentException('non-nullable response cannot be null'); + } + $allowedValues = $this->getResponseAllowableValues(); + if (!in_array($response, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'response', must be one of '%s'", + $response, + implode("', '", $allowedValues) + ) + ); + } + $this->container['response'] = $response; + + 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/Payment/Name.php b/src/Adyen/Model/Payment/Name.php new file mode 100644 index 000000000..97b0864ed --- /dev/null +++ b/src/Adyen/Model/Payment/Name.php @@ -0,0 +1,424 @@ + + */ +class Name implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Name'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'lastName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'lastName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'lastName' => 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 = [ + 'firstName' => 'firstName', + 'lastName' => 'lastName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('lastName', $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['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' 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 firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName The first name. + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName The last name. + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + 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/Payment/ObjectSerializer.php b/src/Adyen/Model/Payment/ObjectSerializer.php new file mode 100644 index 000000000..109315b2a --- /dev/null +++ b/src/Adyen/Model/Payment/ObjectSerializer.php @@ -0,0 +1,316 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/Payment/PaymentRequest.php b/src/Adyen/Model/Payment/PaymentRequest.php new file mode 100644 index 000000000..56ba96cc7 --- /dev/null +++ b/src/Adyen/Model/Payment/PaymentRequest.php @@ -0,0 +1,2295 @@ + + */ +class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountInfo' => '\Adyen\Model\Payment\AccountInfo', + 'additionalAmount' => '\Adyen\Model\Payment\Amount', + 'additionalData' => 'array', + 'amount' => '\Adyen\Model\Payment\Amount', + 'applicationInfo' => '\Adyen\Model\Payment\ApplicationInfo', + 'bankAccount' => '\Adyen\Model\Payment\BankAccount', + 'billingAddress' => '\Adyen\Model\Payment\Address', + 'browserInfo' => '\Adyen\Model\Payment\BrowserInfo', + 'captureDelayHours' => 'int', + 'card' => '\Adyen\Model\Payment\Card', + 'dateOfBirth' => '\DateTime', + 'dccQuote' => '\Adyen\Model\Payment\ForexQuote', + 'deliveryAddress' => '\Adyen\Model\Payment\Address', + 'deliveryDate' => '\DateTime', + 'deviceFingerprint' => 'string', + 'entityType' => 'string', + 'fraudOffset' => 'int', + 'fundDestination' => '\Adyen\Model\Payment\FundDestination', + 'fundSource' => '\Adyen\Model\Payment\FundSource', + 'fundingSource' => 'string', + 'installments' => '\Adyen\Model\Payment\Installments', + 'localizedShopperStatement' => 'array', + 'mandate' => '\Adyen\Model\Payment\Mandate', + 'mcc' => 'string', + 'merchantAccount' => 'string', + 'merchantOrderReference' => 'string', + 'merchantRiskIndicator' => '\Adyen\Model\Payment\MerchantRiskIndicator', + 'metadata' => 'array', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'nationality' => 'string', + 'orderReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'recurring' => '\Adyen\Model\Payment\Recurring', + 'recurringProcessingModel' => 'string', + 'reference' => 'string', + 'selectedBrand' => 'string', + 'selectedRecurringDetailReference' => 'string', + 'sessionId' => 'string', + 'shopperEmail' => 'string', + 'shopperIP' => 'string', + 'shopperInteraction' => 'string', + 'shopperLocale' => 'string', + 'shopperName' => '\Adyen\Model\Payment\Name', + 'shopperReference' => 'string', + 'shopperStatement' => 'string', + 'socialSecurityNumber' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'store' => 'string', + 'telephoneNumber' => 'string', + 'threeDS2RequestData' => '\Adyen\Model\Payment\ThreeDS2RequestData', + 'threeDSAuthenticationOnly' => 'bool', + 'totalsGroup' => 'string', + 'trustedShopper' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountInfo' => null, + 'additionalAmount' => null, + 'additionalData' => null, + 'amount' => null, + 'applicationInfo' => null, + 'bankAccount' => null, + 'billingAddress' => null, + 'browserInfo' => null, + 'captureDelayHours' => 'int32', + 'card' => null, + 'dateOfBirth' => 'date', + 'dccQuote' => null, + 'deliveryAddress' => null, + 'deliveryDate' => 'date-time', + 'deviceFingerprint' => null, + 'entityType' => null, + 'fraudOffset' => 'int32', + 'fundDestination' => null, + 'fundSource' => null, + 'fundingSource' => null, + 'installments' => null, + 'localizedShopperStatement' => null, + 'mandate' => null, + 'mcc' => null, + 'merchantAccount' => null, + 'merchantOrderReference' => null, + 'merchantRiskIndicator' => null, + 'metadata' => null, + 'mpiData' => null, + 'nationality' => null, + 'orderReference' => null, + 'platformChargebackLogic' => null, + 'recurring' => null, + 'recurringProcessingModel' => null, + 'reference' => null, + 'selectedBrand' => null, + 'selectedRecurringDetailReference' => null, + 'sessionId' => null, + 'shopperEmail' => null, + 'shopperIP' => null, + 'shopperInteraction' => null, + 'shopperLocale' => null, + 'shopperName' => null, + 'shopperReference' => null, + 'shopperStatement' => null, + 'socialSecurityNumber' => null, + 'splits' => null, + 'store' => null, + 'telephoneNumber' => null, + 'threeDS2RequestData' => null, + 'threeDSAuthenticationOnly' => null, + 'totalsGroup' => null, + 'trustedShopper' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountInfo' => false, + 'additionalAmount' => false, + 'additionalData' => false, + 'amount' => false, + 'applicationInfo' => false, + 'bankAccount' => false, + 'billingAddress' => false, + 'browserInfo' => false, + 'captureDelayHours' => true, + 'card' => false, + 'dateOfBirth' => false, + 'dccQuote' => false, + 'deliveryAddress' => false, + 'deliveryDate' => false, + 'deviceFingerprint' => false, + 'entityType' => false, + 'fraudOffset' => true, + 'fundDestination' => false, + 'fundSource' => false, + 'fundingSource' => false, + 'installments' => false, + 'localizedShopperStatement' => false, + 'mandate' => false, + 'mcc' => false, + 'merchantAccount' => false, + 'merchantOrderReference' => false, + 'merchantRiskIndicator' => false, + 'metadata' => false, + 'mpiData' => false, + 'nationality' => false, + 'orderReference' => false, + 'platformChargebackLogic' => false, + 'recurring' => false, + 'recurringProcessingModel' => false, + 'reference' => false, + 'selectedBrand' => false, + 'selectedRecurringDetailReference' => false, + 'sessionId' => false, + 'shopperEmail' => false, + 'shopperIP' => false, + 'shopperInteraction' => false, + 'shopperLocale' => false, + 'shopperName' => false, + 'shopperReference' => false, + 'shopperStatement' => false, + 'socialSecurityNumber' => false, + 'splits' => false, + 'store' => false, + 'telephoneNumber' => false, + 'threeDS2RequestData' => false, + 'threeDSAuthenticationOnly' => false, + 'totalsGroup' => false, + 'trustedShopper' => 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 = [ + 'accountInfo' => 'accountInfo', + 'additionalAmount' => 'additionalAmount', + 'additionalData' => 'additionalData', + 'amount' => 'amount', + 'applicationInfo' => 'applicationInfo', + 'bankAccount' => 'bankAccount', + 'billingAddress' => 'billingAddress', + 'browserInfo' => 'browserInfo', + 'captureDelayHours' => 'captureDelayHours', + 'card' => 'card', + 'dateOfBirth' => 'dateOfBirth', + 'dccQuote' => 'dccQuote', + 'deliveryAddress' => 'deliveryAddress', + 'deliveryDate' => 'deliveryDate', + 'deviceFingerprint' => 'deviceFingerprint', + 'entityType' => 'entityType', + 'fraudOffset' => 'fraudOffset', + 'fundDestination' => 'fundDestination', + 'fundSource' => 'fundSource', + 'fundingSource' => 'fundingSource', + 'installments' => 'installments', + 'localizedShopperStatement' => 'localizedShopperStatement', + 'mandate' => 'mandate', + 'mcc' => 'mcc', + 'merchantAccount' => 'merchantAccount', + 'merchantOrderReference' => 'merchantOrderReference', + 'merchantRiskIndicator' => 'merchantRiskIndicator', + 'metadata' => 'metadata', + 'mpiData' => 'mpiData', + 'nationality' => 'nationality', + 'orderReference' => 'orderReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'recurring' => 'recurring', + 'recurringProcessingModel' => 'recurringProcessingModel', + 'reference' => 'reference', + 'selectedBrand' => 'selectedBrand', + 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', + 'sessionId' => 'sessionId', + 'shopperEmail' => 'shopperEmail', + 'shopperIP' => 'shopperIP', + 'shopperInteraction' => 'shopperInteraction', + 'shopperLocale' => 'shopperLocale', + 'shopperName' => 'shopperName', + 'shopperReference' => 'shopperReference', + 'shopperStatement' => 'shopperStatement', + 'socialSecurityNumber' => 'socialSecurityNumber', + 'splits' => 'splits', + 'store' => 'store', + 'telephoneNumber' => 'telephoneNumber', + 'threeDS2RequestData' => 'threeDS2RequestData', + 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', + 'totalsGroup' => 'totalsGroup', + 'trustedShopper' => 'trustedShopper' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountInfo' => 'setAccountInfo', + 'additionalAmount' => 'setAdditionalAmount', + 'additionalData' => 'setAdditionalData', + 'amount' => 'setAmount', + 'applicationInfo' => 'setApplicationInfo', + 'bankAccount' => 'setBankAccount', + 'billingAddress' => 'setBillingAddress', + 'browserInfo' => 'setBrowserInfo', + 'captureDelayHours' => 'setCaptureDelayHours', + 'card' => 'setCard', + 'dateOfBirth' => 'setDateOfBirth', + 'dccQuote' => 'setDccQuote', + 'deliveryAddress' => 'setDeliveryAddress', + 'deliveryDate' => 'setDeliveryDate', + 'deviceFingerprint' => 'setDeviceFingerprint', + 'entityType' => 'setEntityType', + 'fraudOffset' => 'setFraudOffset', + 'fundDestination' => 'setFundDestination', + 'fundSource' => 'setFundSource', + 'fundingSource' => 'setFundingSource', + 'installments' => 'setInstallments', + 'localizedShopperStatement' => 'setLocalizedShopperStatement', + 'mandate' => 'setMandate', + 'mcc' => 'setMcc', + 'merchantAccount' => 'setMerchantAccount', + 'merchantOrderReference' => 'setMerchantOrderReference', + 'merchantRiskIndicator' => 'setMerchantRiskIndicator', + 'metadata' => 'setMetadata', + 'mpiData' => 'setMpiData', + 'nationality' => 'setNationality', + 'orderReference' => 'setOrderReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'recurring' => 'setRecurring', + 'recurringProcessingModel' => 'setRecurringProcessingModel', + 'reference' => 'setReference', + 'selectedBrand' => 'setSelectedBrand', + 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', + 'sessionId' => 'setSessionId', + 'shopperEmail' => 'setShopperEmail', + 'shopperIP' => 'setShopperIP', + 'shopperInteraction' => 'setShopperInteraction', + 'shopperLocale' => 'setShopperLocale', + 'shopperName' => 'setShopperName', + 'shopperReference' => 'setShopperReference', + 'shopperStatement' => 'setShopperStatement', + 'socialSecurityNumber' => 'setSocialSecurityNumber', + 'splits' => 'setSplits', + 'store' => 'setStore', + 'telephoneNumber' => 'setTelephoneNumber', + 'threeDS2RequestData' => 'setThreeDS2RequestData', + 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', + 'totalsGroup' => 'setTotalsGroup', + 'trustedShopper' => 'setTrustedShopper' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountInfo' => 'getAccountInfo', + 'additionalAmount' => 'getAdditionalAmount', + 'additionalData' => 'getAdditionalData', + 'amount' => 'getAmount', + 'applicationInfo' => 'getApplicationInfo', + 'bankAccount' => 'getBankAccount', + 'billingAddress' => 'getBillingAddress', + 'browserInfo' => 'getBrowserInfo', + 'captureDelayHours' => 'getCaptureDelayHours', + 'card' => 'getCard', + 'dateOfBirth' => 'getDateOfBirth', + 'dccQuote' => 'getDccQuote', + 'deliveryAddress' => 'getDeliveryAddress', + 'deliveryDate' => 'getDeliveryDate', + 'deviceFingerprint' => 'getDeviceFingerprint', + 'entityType' => 'getEntityType', + 'fraudOffset' => 'getFraudOffset', + 'fundDestination' => 'getFundDestination', + 'fundSource' => 'getFundSource', + 'fundingSource' => 'getFundingSource', + 'installments' => 'getInstallments', + 'localizedShopperStatement' => 'getLocalizedShopperStatement', + 'mandate' => 'getMandate', + 'mcc' => 'getMcc', + 'merchantAccount' => 'getMerchantAccount', + 'merchantOrderReference' => 'getMerchantOrderReference', + 'merchantRiskIndicator' => 'getMerchantRiskIndicator', + 'metadata' => 'getMetadata', + 'mpiData' => 'getMpiData', + 'nationality' => 'getNationality', + 'orderReference' => 'getOrderReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'recurring' => 'getRecurring', + 'recurringProcessingModel' => 'getRecurringProcessingModel', + 'reference' => 'getReference', + 'selectedBrand' => 'getSelectedBrand', + 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', + 'sessionId' => 'getSessionId', + 'shopperEmail' => 'getShopperEmail', + 'shopperIP' => 'getShopperIP', + 'shopperInteraction' => 'getShopperInteraction', + 'shopperLocale' => 'getShopperLocale', + 'shopperName' => 'getShopperName', + 'shopperReference' => 'getShopperReference', + 'shopperStatement' => 'getShopperStatement', + 'socialSecurityNumber' => 'getSocialSecurityNumber', + 'splits' => 'getSplits', + 'store' => 'getStore', + 'telephoneNumber' => 'getTelephoneNumber', + 'threeDS2RequestData' => 'getThreeDS2RequestData', + 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', + 'totalsGroup' => 'getTotalsGroup', + 'trustedShopper' => 'getTrustedShopper' + ]; + + /** + * 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 ENTITY_TYPE_NATURAL_PERSON = 'NaturalPerson'; + public const ENTITY_TYPE_COMPANY_NAME = 'CompanyName'; + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; + public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; + public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + 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'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEntityTypeAllowableValues() + { + return [ + self::ENTITY_TYPE_NATURAL_PERSON, + self::ENTITY_TYPE_COMPANY_NAME, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringProcessingModelAllowableValues() + { + return [ + self::RECURRING_PROCESSING_MODEL_CARD_ON_FILE, + self::RECURRING_PROCESSING_MODEL_SUBSCRIPTION, + self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, + ]; + } + /** + * 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, + ]; + } + /** + * 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('accountInfo', $data ?? [], null); + $this->setIfExists('additionalAmount', $data ?? [], null); + $this->setIfExists('additionalData', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('applicationInfo', $data ?? [], null); + $this->setIfExists('bankAccount', $data ?? [], null); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('browserInfo', $data ?? [], null); + $this->setIfExists('captureDelayHours', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('dccQuote', $data ?? [], null); + $this->setIfExists('deliveryAddress', $data ?? [], null); + $this->setIfExists('deliveryDate', $data ?? [], null); + $this->setIfExists('deviceFingerprint', $data ?? [], null); + $this->setIfExists('entityType', $data ?? [], null); + $this->setIfExists('fraudOffset', $data ?? [], null); + $this->setIfExists('fundDestination', $data ?? [], null); + $this->setIfExists('fundSource', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('installments', $data ?? [], null); + $this->setIfExists('localizedShopperStatement', $data ?? [], null); + $this->setIfExists('mandate', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('merchantOrderReference', $data ?? [], null); + $this->setIfExists('merchantRiskIndicator', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('nationality', $data ?? [], null); + $this->setIfExists('orderReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('recurring', $data ?? [], null); + $this->setIfExists('recurringProcessingModel', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('selectedBrand', $data ?? [], null); + $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); + $this->setIfExists('sessionId', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('shopperIP', $data ?? [], null); + $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('shopperLocale', $data ?? [], null); + $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('shopperReference', $data ?? [], null); + $this->setIfExists('shopperStatement', $data ?? [], null); + $this->setIfExists('socialSecurityNumber', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('threeDS2RequestData', $data ?? [], null); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('totalsGroup', $data ?? [], null); + $this->setIfExists('trustedShopper', $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"; + } + $allowedValues = $this->getEntityTypeAllowableValues(); + if (!is_null($this->container['entityType']) && !in_array($this->container['entityType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'entityType', must be one of '%s'", + $this->container['entityType'], + implode("', '", $allowedValues) + ); + } + + $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $this->container['recurringProcessingModel'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['reference'] === null) { + $invalidProperties[] = "'reference' 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) + ); + } + + 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 accountInfo + * + * @return \Adyen\Model\Payment\AccountInfo|null + */ + public function getAccountInfo() + { + return $this->container['accountInfo']; + } + + /** + * Sets accountInfo + * + * @param \Adyen\Model\Payment\AccountInfo|null $accountInfo accountInfo + * + * @return self + */ + public function setAccountInfo($accountInfo) + { + if (is_null($accountInfo)) { + throw new \InvalidArgumentException('non-nullable accountInfo cannot be null'); + } + $this->container['accountInfo'] = $accountInfo; + + return $this; + } + + /** + * Gets additionalAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getAdditionalAmount() + { + return $this->container['additionalAmount']; + } + + /** + * Sets additionalAmount + * + * @param \Adyen\Model\Payment\Amount|null $additionalAmount additionalAmount + * + * @return self + */ + public function setAdditionalAmount($additionalAmount) + { + if (is_null($additionalAmount)) { + throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); + } + $this->container['additionalAmount'] = $additionalAmount; + + return $this; + } + + /** + * Gets additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\Payment\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Payment\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; + } + + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Payment\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Payment\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + + /** + * Gets bankAccount + * + * @return \Adyen\Model\Payment\BankAccount|null + */ + public function getBankAccount() + { + return $this->container['bankAccount']; + } + + /** + * Sets bankAccount + * + * @param \Adyen\Model\Payment\BankAccount|null $bankAccount bankAccount + * + * @return self + */ + public function setBankAccount($bankAccount) + { + if (is_null($bankAccount)) { + throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); + } + $this->container['bankAccount'] = $bankAccount; + + return $this; + } + + /** + * Gets billingAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param \Adyen\Model\Payment\Address|null $billingAddress billingAddress + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets browserInfo + * + * @return \Adyen\Model\Payment\BrowserInfo|null + */ + public function getBrowserInfo() + { + return $this->container['browserInfo']; + } + + /** + * Sets browserInfo + * + * @param \Adyen\Model\Payment\BrowserInfo|null $browserInfo browserInfo + * + * @return self + */ + public function setBrowserInfo($browserInfo) + { + if (is_null($browserInfo)) { + throw new \InvalidArgumentException('non-nullable browserInfo cannot be null'); + } + $this->container['browserInfo'] = $browserInfo; + + return $this; + } + + /** + * Gets captureDelayHours + * + * @return int|null + */ + public function getCaptureDelayHours() + { + return $this->container['captureDelayHours']; + } + + /** + * Sets captureDelayHours + * + * @param int|null $captureDelayHours The delay between the authorisation and scheduled auto-capture, specified in hours. + * + * @return self + */ + public function setCaptureDelayHours($captureDelayHours) + { + // Do nothing for nullable integers + $this->container['captureDelayHours'] = $captureDelayHours; + + return $this; + } + + /** + * Gets card + * + * @return \Adyen\Model\Payment\Card|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \Adyen\Model\Payment\Card|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + throw new \InvalidArgumentException('non-nullable card cannot be null'); + } + $this->container['card'] = $card; + + return $this; + } + + /** + * Gets dateOfBirth + * + * @return \DateTime|null + */ + public function getDateOfBirth() + { + return $this->container['dateOfBirth']; + } + + /** + * Sets dateOfBirth + * + * @param \DateTime|null $dateOfBirth The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD + * + * @return self + */ + public function setDateOfBirth($dateOfBirth) + { + if (is_null($dateOfBirth)) { + throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets dccQuote + * + * @return \Adyen\Model\Payment\ForexQuote|null + */ + public function getDccQuote() + { + return $this->container['dccQuote']; + } + + /** + * Sets dccQuote + * + * @param \Adyen\Model\Payment\ForexQuote|null $dccQuote dccQuote + * + * @return self + */ + public function setDccQuote($dccQuote) + { + if (is_null($dccQuote)) { + throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); + } + $this->container['dccQuote'] = $dccQuote; + + return $this; + } + + /** + * Gets deliveryAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getDeliveryAddress() + { + return $this->container['deliveryAddress']; + } + + /** + * Sets deliveryAddress + * + * @param \Adyen\Model\Payment\Address|null $deliveryAddress deliveryAddress + * + * @return self + */ + public function setDeliveryAddress($deliveryAddress) + { + if (is_null($deliveryAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + } + $this->container['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + /** + * Gets deliveryDate + * + * @return \DateTime|null + */ + public function getDeliveryDate() + { + return $this->container['deliveryDate']; + } + + /** + * Sets deliveryDate + * + * @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 + */ + public function setDeliveryDate($deliveryDate) + { + if (is_null($deliveryDate)) { + throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); + } + $this->container['deliveryDate'] = $deliveryDate; + + return $this; + } + + /** + * Gets deviceFingerprint + * + * @return string|null + */ + public function getDeviceFingerprint() + { + return $this->container['deviceFingerprint']; + } + + /** + * Sets deviceFingerprint + * + * @param string|null $deviceFingerprint A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). + * + * @return self + */ + public function setDeviceFingerprint($deviceFingerprint) + { + if (is_null($deviceFingerprint)) { + throw new \InvalidArgumentException('non-nullable deviceFingerprint cannot be null'); + } + $this->container['deviceFingerprint'] = $deviceFingerprint; + + return $this; + } + + /** + * Gets entityType + * + * @return string|null + */ + public function getEntityType() + { + return $this->container['entityType']; + } + + /** + * Sets entityType + * + * @param string|null $entityType The type of the entity the payment is processed for. + * + * @return self + */ + public function setEntityType($entityType) + { + if (is_null($entityType)) { + throw new \InvalidArgumentException('non-nullable entityType cannot be null'); + } + $allowedValues = $this->getEntityTypeAllowableValues(); + if (!in_array($entityType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'entityType', must be one of '%s'", + $entityType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['entityType'] = $entityType; + + return $this; + } + + /** + * Gets fraudOffset + * + * @return int|null + */ + public function getFraudOffset() + { + return $this->container['fraudOffset']; + } + + /** + * Sets fraudOffset + * + * @param int|null $fraudOffset An integer value that is added to the normal fraud score. The value can be either positive or negative. + * + * @return self + */ + public function setFraudOffset($fraudOffset) + { + // Do nothing for nullable integers + $this->container['fraudOffset'] = $fraudOffset; + + return $this; + } + + /** + * Gets fundDestination + * + * @return \Adyen\Model\Payment\FundDestination|null + */ + public function getFundDestination() + { + return $this->container['fundDestination']; + } + + /** + * Sets fundDestination + * + * @param \Adyen\Model\Payment\FundDestination|null $fundDestination fundDestination + * + * @return self + */ + public function setFundDestination($fundDestination) + { + if (is_null($fundDestination)) { + throw new \InvalidArgumentException('non-nullable fundDestination cannot be null'); + } + $this->container['fundDestination'] = $fundDestination; + + return $this; + } + + /** + * Gets fundSource + * + * @return \Adyen\Model\Payment\FundSource|null + */ + public function getFundSource() + { + return $this->container['fundSource']; + } + + /** + * Sets fundSource + * + * @param \Adyen\Model\Payment\FundSource|null $fundSource fundSource + * + * @return self + */ + public function setFundSource($fundSource) + { + if (is_null($fundSource)) { + throw new \InvalidArgumentException('non-nullable fundSource cannot be null'); + } + $this->container['fundSource'] = $fundSource; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets installments + * + * @return \Adyen\Model\Payment\Installments|null + */ + public function getInstallments() + { + return $this->container['installments']; + } + + /** + * Sets installments + * + * @param \Adyen\Model\Payment\Installments|null $installments installments + * + * @return self + */ + public function setInstallments($installments) + { + if (is_null($installments)) { + throw new \InvalidArgumentException('non-nullable installments cannot be null'); + } + $this->container['installments'] = $installments; + + return $this; + } + + /** + * Gets localizedShopperStatement + * + * @return array|null + */ + public function getLocalizedShopperStatement() + { + return $this->container['localizedShopperStatement']; + } + + /** + * Sets localizedShopperStatement + * + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. + * + * @return self + */ + public function setLocalizedShopperStatement($localizedShopperStatement) + { + if (is_null($localizedShopperStatement)) { + throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); + } + $this->container['localizedShopperStatement'] = $localizedShopperStatement; + + return $this; + } + + /** + * Gets mandate + * + * @return \Adyen\Model\Payment\Mandate|null + */ + public function getMandate() + { + return $this->container['mandate']; + } + + /** + * Sets mandate + * + * @param \Adyen\Model\Payment\Mandate|null $mandate mandate + * + * @return self + */ + public function setMandate($mandate) + { + if (is_null($mandate)) { + throw new \InvalidArgumentException('non-nullable mandate cannot be null'); + } + $this->container['mandate'] = $mandate; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + * + * @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 merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets merchantOrderReference + * + * @return string|null + */ + public function getMerchantOrderReference() + { + return $this->container['merchantOrderReference']; + } + + /** + * Sets merchantOrderReference + * + * @param string|null $merchantOrderReference This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. + * + * @return self + */ + public function setMerchantOrderReference($merchantOrderReference) + { + if (is_null($merchantOrderReference)) { + throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); + } + $this->container['merchantOrderReference'] = $merchantOrderReference; + + return $this; + } + + /** + * Gets merchantRiskIndicator + * + * @return \Adyen\Model\Payment\MerchantRiskIndicator|null + */ + public function getMerchantRiskIndicator() + { + return $this->container['merchantRiskIndicator']; + } + + /** + * Sets merchantRiskIndicator + * + * @param \Adyen\Model\Payment\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator + * + * @return self + */ + public function setMerchantRiskIndicator($merchantRiskIndicator) + { + if (is_null($merchantRiskIndicator)) { + throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); + } + $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. + * + * @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 mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets nationality + * + * @return string|null + */ + public function getNationality() + { + return $this->container['nationality']; + } + + /** + * Sets nationality + * + * @param string|null $nationality The two-character country code of the shopper's nationality. + * + * @return self + */ + public function setNationality($nationality) + { + if (is_null($nationality)) { + throw new \InvalidArgumentException('non-nullable nationality cannot be null'); + } + $this->container['nationality'] = $nationality; + + return $this; + } + + /** + * Gets orderReference + * + * @return string|null + */ + public function getOrderReference() + { + return $this->container['orderReference']; + } + + /** + * Sets orderReference + * + * @param string|null $orderReference When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. + * + * @return self + */ + public function setOrderReference($orderReference) + { + if (is_null($orderReference)) { + throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); + } + $this->container['orderReference'] = $orderReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 recurring + * + * @return \Adyen\Model\Payment\Recurring|null + */ + public function getRecurring() + { + return $this->container['recurring']; + } + + /** + * Sets recurring + * + * @param \Adyen\Model\Payment\Recurring|null $recurring recurring + * + * @return self + */ + public function setRecurring($recurring) + { + if (is_null($recurring)) { + throw new \InvalidArgumentException('non-nullable recurring cannot be null'); + } + $this->container['recurring'] = $recurring; + + return $this; + } + + /** + * Gets recurringProcessingModel + * + * @return string|null + */ + public function getRecurringProcessingModel() + { + return $this->container['recurringProcessingModel']; + } + + /** + * Sets recurringProcessingModel + * + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed 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 have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * + * @return self + */ + public function setRecurringProcessingModel($recurringProcessingModel) + { + if (is_null($recurringProcessingModel)) { + throw new \InvalidArgumentException('non-nullable recurringProcessingModel cannot be null'); + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!in_array($recurringProcessingModel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $recurringProcessingModel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurringProcessingModel'] = $recurringProcessingModel; + + return $this; + } + + /** + * Gets reference + * + * @return string + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets selectedBrand + * + * @return string|null + */ + public function getSelectedBrand() + { + return $this->container['selectedBrand']; + } + + /** + * Sets selectedBrand + * + * @param string|null $selectedBrand Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. + * + * @return self + */ + public function setSelectedBrand($selectedBrand) + { + if (is_null($selectedBrand)) { + throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); + } + $this->container['selectedBrand'] = $selectedBrand; + + return $this; + } + + /** + * Gets selectedRecurringDetailReference + * + * @return string|null + */ + public function getSelectedRecurringDetailReference() + { + return $this->container['selectedRecurringDetailReference']; + } + + /** + * Sets selectedRecurringDetailReference + * + * @param string|null $selectedRecurringDetailReference The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * + * @return self + */ + public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) + { + if (is_null($selectedRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); + } + $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; + + return $this; + } + + /** + * Gets sessionId + * + * @return string|null + */ + public function getSessionId() + { + return $this->container['sessionId']; + } + + /** + * Sets sessionId + * + * @param string|null $sessionId A session ID used to identify a payment session. + * + * @return self + */ + public function setSessionId($sessionId) + { + if (is_null($sessionId)) { + throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); + } + $this->container['sessionId'] = $sessionId; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets shopperIP + * + * @return string|null + */ + public function getShopperIP() + { + return $this->container['shopperIP']; + } + + /** + * Sets shopperIP + * + * @param string|null $shopperIP The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + * + * @return self + */ + public function setShopperIP($shopperIP) + { + if (is_null($shopperIP)) { + throw new \InvalidArgumentException('non-nullable shopperIP cannot be null'); + } + $this->container['shopperIP'] = $shopperIP; + + return $this; + } + + /** + * Gets shopperInteraction + * + * @return string|null + */ + public function getShopperInteraction() + { + return $this->container['shopperInteraction']; + } + + /** + * Sets shopperInteraction + * + * @param string|null $shopperInteraction Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + * + * @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 shopperLocale + * + * @return string|null + */ + public function getShopperLocale() + { + return $this->container['shopperLocale']; + } + + /** + * Sets shopperLocale + * + * @param string|null $shopperLocale The combination of a language code and a country code to specify the language to be used in the payment. + * + * @return self + */ + public function setShopperLocale($shopperLocale) + { + if (is_null($shopperLocale)) { + throw new \InvalidArgumentException('non-nullable shopperLocale cannot be null'); + } + $this->container['shopperLocale'] = $shopperLocale; + + return $this; + } + + /** + * Gets shopperName + * + * @return \Adyen\Model\Payment\Name|null + */ + public function getShopperName() + { + return $this->container['shopperName']; + } + + /** + * Sets shopperName + * + * @param \Adyen\Model\Payment\Name|null $shopperName shopperName + * + * @return self + */ + public function setShopperName($shopperName) + { + if (is_null($shopperName)) { + throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); + } + $this->container['shopperName'] = $shopperName; + + return $this; + } + + /** + * Gets shopperReference + * + * @return string|null + */ + public function getShopperReference() + { + return $this->container['shopperReference']; + } + + /** + * Sets shopperReference + * + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * + * @return self + */ + public function setShopperReference($shopperReference) + { + if (is_null($shopperReference)) { + throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); + } + $this->container['shopperReference'] = $shopperReference; + + return $this; + } + + /** + * Gets shopperStatement + * + * @return string|null + */ + public function getShopperStatement() + { + return $this->container['shopperStatement']; + } + + /** + * Sets shopperStatement + * + * @param string|null $shopperStatement The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. + * + * @return self + */ + public function setShopperStatement($shopperStatement) + { + if (is_null($shopperStatement)) { + throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); + } + $this->container['shopperStatement'] = $shopperStatement; + + return $this; + } + + /** + * Gets socialSecurityNumber + * + * @return string|null + */ + public function getSocialSecurityNumber() + { + return $this->container['socialSecurityNumber']; + } + + /** + * Sets socialSecurityNumber + * + * @param string|null $socialSecurityNumber The shopper's social security number. + * + * @return self + */ + public function setSocialSecurityNumber($socialSecurityNumber) + { + if (is_null($socialSecurityNumber)) { + throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); + } + $this->container['socialSecurityNumber'] = $socialSecurityNumber; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber The shopper's telephone number. + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + + /** + * Gets threeDS2RequestData + * + * @return \Adyen\Model\Payment\ThreeDS2RequestData|null + */ + public function getThreeDS2RequestData() + { + return $this->container['threeDS2RequestData']; + } + + /** + * Sets threeDS2RequestData + * + * @param \Adyen\Model\Payment\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * + * @return self + */ + public function setThreeDS2RequestData($threeDS2RequestData) + { + if (is_null($threeDS2RequestData)) { + throw new \InvalidArgumentException('non-nullable threeDS2RequestData cannot be null'); + } + $this->container['threeDS2RequestData'] = $threeDS2RequestData; + + return $this; + } + + /** + * Gets threeDSAuthenticationOnly + * + * @return bool|null + */ + public function getThreeDSAuthenticationOnly() + { + return $this->container['threeDSAuthenticationOnly']; + } + + /** + * Sets threeDSAuthenticationOnly + * + * @param bool|null $threeDSAuthenticationOnly 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 + */ + public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) + { + if (is_null($threeDSAuthenticationOnly)) { + throw new \InvalidArgumentException('non-nullable threeDSAuthenticationOnly cannot be null'); + } + $this->container['threeDSAuthenticationOnly'] = $threeDSAuthenticationOnly; + + return $this; + } + + /** + * Gets totalsGroup + * + * @return string|null + */ + public function getTotalsGroup() + { + return $this->container['totalsGroup']; + } + + /** + * Sets totalsGroup + * + * @param string|null $totalsGroup The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). + * + * @return self + */ + public function setTotalsGroup($totalsGroup) + { + if (is_null($totalsGroup)) { + throw new \InvalidArgumentException('non-nullable totalsGroup cannot be null'); + } + $this->container['totalsGroup'] = $totalsGroup; + + return $this; + } + + /** + * Gets trustedShopper + * + * @return bool|null + */ + public function getTrustedShopper() + { + return $this->container['trustedShopper']; + } + + /** + * Sets trustedShopper + * + * @param bool|null $trustedShopper Set to true if the payment should be routed to a trusted MID. + * + * @return self + */ + public function setTrustedShopper($trustedShopper) + { + if (is_null($trustedShopper)) { + throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); + } + $this->container['trustedShopper'] = $trustedShopper; + + 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/Payment/PaymentRequest3d.php b/src/Adyen/Model/Payment/PaymentRequest3d.php new file mode 100644 index 000000000..594931734 --- /dev/null +++ b/src/Adyen/Model/Payment/PaymentRequest3d.php @@ -0,0 +1,1957 @@ + + */ +class PaymentRequest3d implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentRequest3d'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountInfo' => '\Adyen\Model\Payment\AccountInfo', + 'additionalAmount' => '\Adyen\Model\Payment\Amount', + 'additionalData' => 'array', + 'amount' => '\Adyen\Model\Payment\Amount', + 'applicationInfo' => '\Adyen\Model\Payment\ApplicationInfo', + 'billingAddress' => '\Adyen\Model\Payment\Address', + 'browserInfo' => '\Adyen\Model\Payment\BrowserInfo', + 'captureDelayHours' => 'int', + 'dateOfBirth' => '\DateTime', + 'dccQuote' => '\Adyen\Model\Payment\ForexQuote', + 'deliveryAddress' => '\Adyen\Model\Payment\Address', + 'deliveryDate' => '\DateTime', + 'deviceFingerprint' => 'string', + 'fraudOffset' => 'int', + 'installments' => '\Adyen\Model\Payment\Installments', + 'localizedShopperStatement' => 'array', + 'mcc' => 'string', + 'md' => 'string', + 'merchantAccount' => 'string', + 'merchantOrderReference' => 'string', + 'merchantRiskIndicator' => '\Adyen\Model\Payment\MerchantRiskIndicator', + 'metadata' => 'array', + 'orderReference' => 'string', + 'paResponse' => 'string', + 'recurring' => '\Adyen\Model\Payment\Recurring', + 'recurringProcessingModel' => 'string', + 'reference' => 'string', + 'selectedBrand' => 'string', + 'selectedRecurringDetailReference' => 'string', + 'sessionId' => 'string', + 'shopperEmail' => 'string', + 'shopperIP' => 'string', + 'shopperInteraction' => 'string', + 'shopperLocale' => 'string', + 'shopperName' => '\Adyen\Model\Payment\Name', + 'shopperReference' => 'string', + 'shopperStatement' => 'string', + 'socialSecurityNumber' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'store' => 'string', + 'telephoneNumber' => 'string', + 'threeDS2RequestData' => '\Adyen\Model\Payment\ThreeDS2RequestData', + 'threeDSAuthenticationOnly' => 'bool', + 'totalsGroup' => 'string', + 'trustedShopper' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountInfo' => null, + 'additionalAmount' => null, + 'additionalData' => null, + 'amount' => null, + 'applicationInfo' => null, + 'billingAddress' => null, + 'browserInfo' => null, + 'captureDelayHours' => 'int32', + 'dateOfBirth' => 'date', + 'dccQuote' => null, + 'deliveryAddress' => null, + 'deliveryDate' => 'date-time', + 'deviceFingerprint' => null, + 'fraudOffset' => 'int32', + 'installments' => null, + 'localizedShopperStatement' => null, + 'mcc' => null, + 'md' => null, + 'merchantAccount' => null, + 'merchantOrderReference' => null, + 'merchantRiskIndicator' => null, + 'metadata' => null, + 'orderReference' => null, + 'paResponse' => null, + 'recurring' => null, + 'recurringProcessingModel' => null, + 'reference' => null, + 'selectedBrand' => null, + 'selectedRecurringDetailReference' => null, + 'sessionId' => null, + 'shopperEmail' => null, + 'shopperIP' => null, + 'shopperInteraction' => null, + 'shopperLocale' => null, + 'shopperName' => null, + 'shopperReference' => null, + 'shopperStatement' => null, + 'socialSecurityNumber' => null, + 'splits' => null, + 'store' => null, + 'telephoneNumber' => null, + 'threeDS2RequestData' => null, + 'threeDSAuthenticationOnly' => null, + 'totalsGroup' => null, + 'trustedShopper' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountInfo' => false, + 'additionalAmount' => false, + 'additionalData' => false, + 'amount' => false, + 'applicationInfo' => false, + 'billingAddress' => false, + 'browserInfo' => false, + 'captureDelayHours' => true, + 'dateOfBirth' => false, + 'dccQuote' => false, + 'deliveryAddress' => false, + 'deliveryDate' => false, + 'deviceFingerprint' => false, + 'fraudOffset' => true, + 'installments' => false, + 'localizedShopperStatement' => false, + 'mcc' => false, + 'md' => false, + 'merchantAccount' => false, + 'merchantOrderReference' => false, + 'merchantRiskIndicator' => false, + 'metadata' => false, + 'orderReference' => false, + 'paResponse' => false, + 'recurring' => false, + 'recurringProcessingModel' => false, + 'reference' => false, + 'selectedBrand' => false, + 'selectedRecurringDetailReference' => false, + 'sessionId' => false, + 'shopperEmail' => false, + 'shopperIP' => false, + 'shopperInteraction' => false, + 'shopperLocale' => false, + 'shopperName' => false, + 'shopperReference' => false, + 'shopperStatement' => false, + 'socialSecurityNumber' => false, + 'splits' => false, + 'store' => false, + 'telephoneNumber' => false, + 'threeDS2RequestData' => false, + 'threeDSAuthenticationOnly' => false, + 'totalsGroup' => false, + 'trustedShopper' => 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 = [ + 'accountInfo' => 'accountInfo', + 'additionalAmount' => 'additionalAmount', + 'additionalData' => 'additionalData', + 'amount' => 'amount', + 'applicationInfo' => 'applicationInfo', + 'billingAddress' => 'billingAddress', + 'browserInfo' => 'browserInfo', + 'captureDelayHours' => 'captureDelayHours', + 'dateOfBirth' => 'dateOfBirth', + 'dccQuote' => 'dccQuote', + 'deliveryAddress' => 'deliveryAddress', + 'deliveryDate' => 'deliveryDate', + 'deviceFingerprint' => 'deviceFingerprint', + 'fraudOffset' => 'fraudOffset', + 'installments' => 'installments', + 'localizedShopperStatement' => 'localizedShopperStatement', + 'mcc' => 'mcc', + 'md' => 'md', + 'merchantAccount' => 'merchantAccount', + 'merchantOrderReference' => 'merchantOrderReference', + 'merchantRiskIndicator' => 'merchantRiskIndicator', + 'metadata' => 'metadata', + 'orderReference' => 'orderReference', + 'paResponse' => 'paResponse', + 'recurring' => 'recurring', + 'recurringProcessingModel' => 'recurringProcessingModel', + 'reference' => 'reference', + 'selectedBrand' => 'selectedBrand', + 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', + 'sessionId' => 'sessionId', + 'shopperEmail' => 'shopperEmail', + 'shopperIP' => 'shopperIP', + 'shopperInteraction' => 'shopperInteraction', + 'shopperLocale' => 'shopperLocale', + 'shopperName' => 'shopperName', + 'shopperReference' => 'shopperReference', + 'shopperStatement' => 'shopperStatement', + 'socialSecurityNumber' => 'socialSecurityNumber', + 'splits' => 'splits', + 'store' => 'store', + 'telephoneNumber' => 'telephoneNumber', + 'threeDS2RequestData' => 'threeDS2RequestData', + 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', + 'totalsGroup' => 'totalsGroup', + 'trustedShopper' => 'trustedShopper' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountInfo' => 'setAccountInfo', + 'additionalAmount' => 'setAdditionalAmount', + 'additionalData' => 'setAdditionalData', + 'amount' => 'setAmount', + 'applicationInfo' => 'setApplicationInfo', + 'billingAddress' => 'setBillingAddress', + 'browserInfo' => 'setBrowserInfo', + 'captureDelayHours' => 'setCaptureDelayHours', + 'dateOfBirth' => 'setDateOfBirth', + 'dccQuote' => 'setDccQuote', + 'deliveryAddress' => 'setDeliveryAddress', + 'deliveryDate' => 'setDeliveryDate', + 'deviceFingerprint' => 'setDeviceFingerprint', + 'fraudOffset' => 'setFraudOffset', + 'installments' => 'setInstallments', + 'localizedShopperStatement' => 'setLocalizedShopperStatement', + 'mcc' => 'setMcc', + 'md' => 'setMd', + 'merchantAccount' => 'setMerchantAccount', + 'merchantOrderReference' => 'setMerchantOrderReference', + 'merchantRiskIndicator' => 'setMerchantRiskIndicator', + 'metadata' => 'setMetadata', + 'orderReference' => 'setOrderReference', + 'paResponse' => 'setPaResponse', + 'recurring' => 'setRecurring', + 'recurringProcessingModel' => 'setRecurringProcessingModel', + 'reference' => 'setReference', + 'selectedBrand' => 'setSelectedBrand', + 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', + 'sessionId' => 'setSessionId', + 'shopperEmail' => 'setShopperEmail', + 'shopperIP' => 'setShopperIP', + 'shopperInteraction' => 'setShopperInteraction', + 'shopperLocale' => 'setShopperLocale', + 'shopperName' => 'setShopperName', + 'shopperReference' => 'setShopperReference', + 'shopperStatement' => 'setShopperStatement', + 'socialSecurityNumber' => 'setSocialSecurityNumber', + 'splits' => 'setSplits', + 'store' => 'setStore', + 'telephoneNumber' => 'setTelephoneNumber', + 'threeDS2RequestData' => 'setThreeDS2RequestData', + 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', + 'totalsGroup' => 'setTotalsGroup', + 'trustedShopper' => 'setTrustedShopper' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountInfo' => 'getAccountInfo', + 'additionalAmount' => 'getAdditionalAmount', + 'additionalData' => 'getAdditionalData', + 'amount' => 'getAmount', + 'applicationInfo' => 'getApplicationInfo', + 'billingAddress' => 'getBillingAddress', + 'browserInfo' => 'getBrowserInfo', + 'captureDelayHours' => 'getCaptureDelayHours', + 'dateOfBirth' => 'getDateOfBirth', + 'dccQuote' => 'getDccQuote', + 'deliveryAddress' => 'getDeliveryAddress', + 'deliveryDate' => 'getDeliveryDate', + 'deviceFingerprint' => 'getDeviceFingerprint', + 'fraudOffset' => 'getFraudOffset', + 'installments' => 'getInstallments', + 'localizedShopperStatement' => 'getLocalizedShopperStatement', + 'mcc' => 'getMcc', + 'md' => 'getMd', + 'merchantAccount' => 'getMerchantAccount', + 'merchantOrderReference' => 'getMerchantOrderReference', + 'merchantRiskIndicator' => 'getMerchantRiskIndicator', + 'metadata' => 'getMetadata', + 'orderReference' => 'getOrderReference', + 'paResponse' => 'getPaResponse', + 'recurring' => 'getRecurring', + 'recurringProcessingModel' => 'getRecurringProcessingModel', + 'reference' => 'getReference', + 'selectedBrand' => 'getSelectedBrand', + 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', + 'sessionId' => 'getSessionId', + 'shopperEmail' => 'getShopperEmail', + 'shopperIP' => 'getShopperIP', + 'shopperInteraction' => 'getShopperInteraction', + 'shopperLocale' => 'getShopperLocale', + 'shopperName' => 'getShopperName', + 'shopperReference' => 'getShopperReference', + 'shopperStatement' => 'getShopperStatement', + 'socialSecurityNumber' => 'getSocialSecurityNumber', + 'splits' => 'getSplits', + 'store' => 'getStore', + 'telephoneNumber' => 'getTelephoneNumber', + 'threeDS2RequestData' => 'getThreeDS2RequestData', + 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', + 'totalsGroup' => 'getTotalsGroup', + 'trustedShopper' => 'getTrustedShopper' + ]; + + /** + * 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 RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; + public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; + public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + 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'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringProcessingModelAllowableValues() + { + return [ + self::RECURRING_PROCESSING_MODEL_CARD_ON_FILE, + self::RECURRING_PROCESSING_MODEL_SUBSCRIPTION, + self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, + ]; + } + /** + * 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, + ]; + } + /** + * 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('accountInfo', $data ?? [], null); + $this->setIfExists('additionalAmount', $data ?? [], null); + $this->setIfExists('additionalData', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('applicationInfo', $data ?? [], null); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('browserInfo', $data ?? [], null); + $this->setIfExists('captureDelayHours', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('dccQuote', $data ?? [], null); + $this->setIfExists('deliveryAddress', $data ?? [], null); + $this->setIfExists('deliveryDate', $data ?? [], null); + $this->setIfExists('deviceFingerprint', $data ?? [], null); + $this->setIfExists('fraudOffset', $data ?? [], null); + $this->setIfExists('installments', $data ?? [], null); + $this->setIfExists('localizedShopperStatement', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('md', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('merchantOrderReference', $data ?? [], null); + $this->setIfExists('merchantRiskIndicator', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('orderReference', $data ?? [], null); + $this->setIfExists('paResponse', $data ?? [], null); + $this->setIfExists('recurring', $data ?? [], null); + $this->setIfExists('recurringProcessingModel', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('selectedBrand', $data ?? [], null); + $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); + $this->setIfExists('sessionId', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('shopperIP', $data ?? [], null); + $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('shopperLocale', $data ?? [], null); + $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('shopperReference', $data ?? [], null); + $this->setIfExists('shopperStatement', $data ?? [], null); + $this->setIfExists('socialSecurityNumber', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('threeDS2RequestData', $data ?? [], null); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('totalsGroup', $data ?? [], null); + $this->setIfExists('trustedShopper', $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['md'] === null) { + $invalidProperties[] = "'md' can't be null"; + } + if ($this->container['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['paResponse'] === null) { + $invalidProperties[] = "'paResponse' can't be null"; + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $this->container['recurringProcessingModel'], + implode("', '", $allowedValues) + ); + } + + $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) + ); + } + + 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 accountInfo + * + * @return \Adyen\Model\Payment\AccountInfo|null + */ + public function getAccountInfo() + { + return $this->container['accountInfo']; + } + + /** + * Sets accountInfo + * + * @param \Adyen\Model\Payment\AccountInfo|null $accountInfo accountInfo + * + * @return self + */ + public function setAccountInfo($accountInfo) + { + if (is_null($accountInfo)) { + throw new \InvalidArgumentException('non-nullable accountInfo cannot be null'); + } + $this->container['accountInfo'] = $accountInfo; + + return $this; + } + + /** + * Gets additionalAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getAdditionalAmount() + { + return $this->container['additionalAmount']; + } + + /** + * Sets additionalAmount + * + * @param \Adyen\Model\Payment\Amount|null $additionalAmount additionalAmount + * + * @return self + */ + public function setAdditionalAmount($additionalAmount) + { + if (is_null($additionalAmount)) { + throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); + } + $this->container['additionalAmount'] = $additionalAmount; + + return $this; + } + + /** + * Gets additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Payment\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 applicationInfo + * + * @return \Adyen\Model\Payment\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Payment\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + + /** + * Gets billingAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param \Adyen\Model\Payment\Address|null $billingAddress billingAddress + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets browserInfo + * + * @return \Adyen\Model\Payment\BrowserInfo|null + */ + public function getBrowserInfo() + { + return $this->container['browserInfo']; + } + + /** + * Sets browserInfo + * + * @param \Adyen\Model\Payment\BrowserInfo|null $browserInfo browserInfo + * + * @return self + */ + public function setBrowserInfo($browserInfo) + { + if (is_null($browserInfo)) { + throw new \InvalidArgumentException('non-nullable browserInfo cannot be null'); + } + $this->container['browserInfo'] = $browserInfo; + + return $this; + } + + /** + * Gets captureDelayHours + * + * @return int|null + */ + public function getCaptureDelayHours() + { + return $this->container['captureDelayHours']; + } + + /** + * Sets captureDelayHours + * + * @param int|null $captureDelayHours The delay between the authorisation and scheduled auto-capture, specified in hours. + * + * @return self + */ + public function setCaptureDelayHours($captureDelayHours) + { + // Do nothing for nullable integers + $this->container['captureDelayHours'] = $captureDelayHours; + + return $this; + } + + /** + * Gets dateOfBirth + * + * @return \DateTime|null + */ + public function getDateOfBirth() + { + return $this->container['dateOfBirth']; + } + + /** + * Sets dateOfBirth + * + * @param \DateTime|null $dateOfBirth The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD + * + * @return self + */ + public function setDateOfBirth($dateOfBirth) + { + if (is_null($dateOfBirth)) { + throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets dccQuote + * + * @return \Adyen\Model\Payment\ForexQuote|null + */ + public function getDccQuote() + { + return $this->container['dccQuote']; + } + + /** + * Sets dccQuote + * + * @param \Adyen\Model\Payment\ForexQuote|null $dccQuote dccQuote + * + * @return self + */ + public function setDccQuote($dccQuote) + { + if (is_null($dccQuote)) { + throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); + } + $this->container['dccQuote'] = $dccQuote; + + return $this; + } + + /** + * Gets deliveryAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getDeliveryAddress() + { + return $this->container['deliveryAddress']; + } + + /** + * Sets deliveryAddress + * + * @param \Adyen\Model\Payment\Address|null $deliveryAddress deliveryAddress + * + * @return self + */ + public function setDeliveryAddress($deliveryAddress) + { + if (is_null($deliveryAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + } + $this->container['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + /** + * Gets deliveryDate + * + * @return \DateTime|null + */ + public function getDeliveryDate() + { + return $this->container['deliveryDate']; + } + + /** + * Sets deliveryDate + * + * @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 + */ + public function setDeliveryDate($deliveryDate) + { + if (is_null($deliveryDate)) { + throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); + } + $this->container['deliveryDate'] = $deliveryDate; + + return $this; + } + + /** + * Gets deviceFingerprint + * + * @return string|null + */ + public function getDeviceFingerprint() + { + return $this->container['deviceFingerprint']; + } + + /** + * Sets deviceFingerprint + * + * @param string|null $deviceFingerprint A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). + * + * @return self + */ + public function setDeviceFingerprint($deviceFingerprint) + { + if (is_null($deviceFingerprint)) { + throw new \InvalidArgumentException('non-nullable deviceFingerprint cannot be null'); + } + $this->container['deviceFingerprint'] = $deviceFingerprint; + + return $this; + } + + /** + * Gets fraudOffset + * + * @return int|null + */ + public function getFraudOffset() + { + return $this->container['fraudOffset']; + } + + /** + * Sets fraudOffset + * + * @param int|null $fraudOffset An integer value that is added to the normal fraud score. The value can be either positive or negative. + * + * @return self + */ + public function setFraudOffset($fraudOffset) + { + // Do nothing for nullable integers + $this->container['fraudOffset'] = $fraudOffset; + + return $this; + } + + /** + * Gets installments + * + * @return \Adyen\Model\Payment\Installments|null + */ + public function getInstallments() + { + return $this->container['installments']; + } + + /** + * Sets installments + * + * @param \Adyen\Model\Payment\Installments|null $installments installments + * + * @return self + */ + public function setInstallments($installments) + { + if (is_null($installments)) { + throw new \InvalidArgumentException('non-nullable installments cannot be null'); + } + $this->container['installments'] = $installments; + + return $this; + } + + /** + * Gets localizedShopperStatement + * + * @return array|null + */ + public function getLocalizedShopperStatement() + { + return $this->container['localizedShopperStatement']; + } + + /** + * Sets localizedShopperStatement + * + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. + * + * @return self + */ + public function setLocalizedShopperStatement($localizedShopperStatement) + { + if (is_null($localizedShopperStatement)) { + throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); + } + $this->container['localizedShopperStatement'] = $localizedShopperStatement; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + * + * @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 md + * + * @return string + */ + public function getMd() + { + return $this->container['md']; + } + + /** + * Sets md + * + * @param string $md The payment session identifier returned by the card issuer. + * + * @return self + */ + public function setMd($md) + { + if (is_null($md)) { + throw new \InvalidArgumentException('non-nullable md cannot be null'); + } + $this->container['md'] = $md; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets merchantOrderReference + * + * @return string|null + */ + public function getMerchantOrderReference() + { + return $this->container['merchantOrderReference']; + } + + /** + * Sets merchantOrderReference + * + * @param string|null $merchantOrderReference This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. + * + * @return self + */ + public function setMerchantOrderReference($merchantOrderReference) + { + if (is_null($merchantOrderReference)) { + throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); + } + $this->container['merchantOrderReference'] = $merchantOrderReference; + + return $this; + } + + /** + * Gets merchantRiskIndicator + * + * @return \Adyen\Model\Payment\MerchantRiskIndicator|null + */ + public function getMerchantRiskIndicator() + { + return $this->container['merchantRiskIndicator']; + } + + /** + * Sets merchantRiskIndicator + * + * @param \Adyen\Model\Payment\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator + * + * @return self + */ + public function setMerchantRiskIndicator($merchantRiskIndicator) + { + if (is_null($merchantRiskIndicator)) { + throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); + } + $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. + * + * @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 orderReference + * + * @return string|null + */ + public function getOrderReference() + { + return $this->container['orderReference']; + } + + /** + * Sets orderReference + * + * @param string|null $orderReference When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. + * + * @return self + */ + public function setOrderReference($orderReference) + { + if (is_null($orderReference)) { + throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); + } + $this->container['orderReference'] = $orderReference; + + return $this; + } + + /** + * Gets paResponse + * + * @return string + */ + public function getPaResponse() + { + return $this->container['paResponse']; + } + + /** + * Sets paResponse + * + * @param string $paResponse Payment authorisation response returned by the card issuer. The `paResponse` field holds the PaRes value received from the card issuer. + * + * @return self + */ + public function setPaResponse($paResponse) + { + if (is_null($paResponse)) { + throw new \InvalidArgumentException('non-nullable paResponse cannot be null'); + } + $this->container['paResponse'] = $paResponse; + + return $this; + } + + /** + * Gets recurring + * + * @return \Adyen\Model\Payment\Recurring|null + */ + public function getRecurring() + { + return $this->container['recurring']; + } + + /** + * Sets recurring + * + * @param \Adyen\Model\Payment\Recurring|null $recurring recurring + * + * @return self + */ + public function setRecurring($recurring) + { + if (is_null($recurring)) { + throw new \InvalidArgumentException('non-nullable recurring cannot be null'); + } + $this->container['recurring'] = $recurring; + + return $this; + } + + /** + * Gets recurringProcessingModel + * + * @return string|null + */ + public function getRecurringProcessingModel() + { + return $this->container['recurringProcessingModel']; + } + + /** + * Sets recurringProcessingModel + * + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed 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 have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * + * @return self + */ + public function setRecurringProcessingModel($recurringProcessingModel) + { + if (is_null($recurringProcessingModel)) { + throw new \InvalidArgumentException('non-nullable recurringProcessingModel cannot be null'); + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!in_array($recurringProcessingModel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $recurringProcessingModel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurringProcessingModel'] = $recurringProcessingModel; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets selectedBrand + * + * @return string|null + */ + public function getSelectedBrand() + { + return $this->container['selectedBrand']; + } + + /** + * Sets selectedBrand + * + * @param string|null $selectedBrand Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. + * + * @return self + */ + public function setSelectedBrand($selectedBrand) + { + if (is_null($selectedBrand)) { + throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); + } + $this->container['selectedBrand'] = $selectedBrand; + + return $this; + } + + /** + * Gets selectedRecurringDetailReference + * + * @return string|null + */ + public function getSelectedRecurringDetailReference() + { + return $this->container['selectedRecurringDetailReference']; + } + + /** + * Sets selectedRecurringDetailReference + * + * @param string|null $selectedRecurringDetailReference The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * + * @return self + */ + public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) + { + if (is_null($selectedRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); + } + $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; + + return $this; + } + + /** + * Gets sessionId + * + * @return string|null + */ + public function getSessionId() + { + return $this->container['sessionId']; + } + + /** + * Sets sessionId + * + * @param string|null $sessionId A session ID used to identify a payment session. + * + * @return self + */ + public function setSessionId($sessionId) + { + if (is_null($sessionId)) { + throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); + } + $this->container['sessionId'] = $sessionId; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets shopperIP + * + * @return string|null + */ + public function getShopperIP() + { + return $this->container['shopperIP']; + } + + /** + * Sets shopperIP + * + * @param string|null $shopperIP The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + * + * @return self + */ + public function setShopperIP($shopperIP) + { + if (is_null($shopperIP)) { + throw new \InvalidArgumentException('non-nullable shopperIP cannot be null'); + } + $this->container['shopperIP'] = $shopperIP; + + return $this; + } + + /** + * Gets shopperInteraction + * + * @return string|null + */ + public function getShopperInteraction() + { + return $this->container['shopperInteraction']; + } + + /** + * Sets shopperInteraction + * + * @param string|null $shopperInteraction Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + * + * @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 shopperLocale + * + * @return string|null + */ + public function getShopperLocale() + { + return $this->container['shopperLocale']; + } + + /** + * Sets shopperLocale + * + * @param string|null $shopperLocale The combination of a language code and a country code to specify the language to be used in the payment. + * + * @return self + */ + public function setShopperLocale($shopperLocale) + { + if (is_null($shopperLocale)) { + throw new \InvalidArgumentException('non-nullable shopperLocale cannot be null'); + } + $this->container['shopperLocale'] = $shopperLocale; + + return $this; + } + + /** + * Gets shopperName + * + * @return \Adyen\Model\Payment\Name|null + */ + public function getShopperName() + { + return $this->container['shopperName']; + } + + /** + * Sets shopperName + * + * @param \Adyen\Model\Payment\Name|null $shopperName shopperName + * + * @return self + */ + public function setShopperName($shopperName) + { + if (is_null($shopperName)) { + throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); + } + $this->container['shopperName'] = $shopperName; + + return $this; + } + + /** + * Gets shopperReference + * + * @return string|null + */ + public function getShopperReference() + { + return $this->container['shopperReference']; + } + + /** + * Sets shopperReference + * + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * + * @return self + */ + public function setShopperReference($shopperReference) + { + if (is_null($shopperReference)) { + throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); + } + $this->container['shopperReference'] = $shopperReference; + + return $this; + } + + /** + * Gets shopperStatement + * + * @return string|null + */ + public function getShopperStatement() + { + return $this->container['shopperStatement']; + } + + /** + * Sets shopperStatement + * + * @param string|null $shopperStatement The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. + * + * @return self + */ + public function setShopperStatement($shopperStatement) + { + if (is_null($shopperStatement)) { + throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); + } + $this->container['shopperStatement'] = $shopperStatement; + + return $this; + } + + /** + * Gets socialSecurityNumber + * + * @return string|null + */ + public function getSocialSecurityNumber() + { + return $this->container['socialSecurityNumber']; + } + + /** + * Sets socialSecurityNumber + * + * @param string|null $socialSecurityNumber The shopper's social security number. + * + * @return self + */ + public function setSocialSecurityNumber($socialSecurityNumber) + { + if (is_null($socialSecurityNumber)) { + throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); + } + $this->container['socialSecurityNumber'] = $socialSecurityNumber; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber The shopper's telephone number. + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + + /** + * Gets threeDS2RequestData + * + * @return \Adyen\Model\Payment\ThreeDS2RequestData|null + */ + public function getThreeDS2RequestData() + { + return $this->container['threeDS2RequestData']; + } + + /** + * Sets threeDS2RequestData + * + * @param \Adyen\Model\Payment\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * + * @return self + */ + public function setThreeDS2RequestData($threeDS2RequestData) + { + if (is_null($threeDS2RequestData)) { + throw new \InvalidArgumentException('non-nullable threeDS2RequestData cannot be null'); + } + $this->container['threeDS2RequestData'] = $threeDS2RequestData; + + return $this; + } + + /** + * Gets threeDSAuthenticationOnly + * + * @return bool|null + */ + public function getThreeDSAuthenticationOnly() + { + return $this->container['threeDSAuthenticationOnly']; + } + + /** + * Sets threeDSAuthenticationOnly + * + * @param bool|null $threeDSAuthenticationOnly 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 + */ + public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) + { + if (is_null($threeDSAuthenticationOnly)) { + throw new \InvalidArgumentException('non-nullable threeDSAuthenticationOnly cannot be null'); + } + $this->container['threeDSAuthenticationOnly'] = $threeDSAuthenticationOnly; + + return $this; + } + + /** + * Gets totalsGroup + * + * @return string|null + */ + public function getTotalsGroup() + { + return $this->container['totalsGroup']; + } + + /** + * Sets totalsGroup + * + * @param string|null $totalsGroup The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). + * + * @return self + */ + public function setTotalsGroup($totalsGroup) + { + if (is_null($totalsGroup)) { + throw new \InvalidArgumentException('non-nullable totalsGroup cannot be null'); + } + $this->container['totalsGroup'] = $totalsGroup; + + return $this; + } + + /** + * Gets trustedShopper + * + * @return bool|null + */ + public function getTrustedShopper() + { + return $this->container['trustedShopper']; + } + + /** + * Sets trustedShopper + * + * @param bool|null $trustedShopper Set to true if the payment should be routed to a trusted MID. + * + * @return self + */ + public function setTrustedShopper($trustedShopper) + { + if (is_null($trustedShopper)) { + throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); + } + $this->container['trustedShopper'] = $trustedShopper; + + 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/Payment/PaymentRequest3ds2.php b/src/Adyen/Model/Payment/PaymentRequest3ds2.php new file mode 100644 index 000000000..8f4492370 --- /dev/null +++ b/src/Adyen/Model/Payment/PaymentRequest3ds2.php @@ -0,0 +1,1957 @@ + + */ +class PaymentRequest3ds2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentRequest3ds2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountInfo' => '\Adyen\Model\Payment\AccountInfo', + 'additionalAmount' => '\Adyen\Model\Payment\Amount', + 'additionalData' => 'array', + 'amount' => '\Adyen\Model\Payment\Amount', + 'applicationInfo' => '\Adyen\Model\Payment\ApplicationInfo', + 'billingAddress' => '\Adyen\Model\Payment\Address', + 'browserInfo' => '\Adyen\Model\Payment\BrowserInfo', + 'captureDelayHours' => 'int', + 'dateOfBirth' => '\DateTime', + 'dccQuote' => '\Adyen\Model\Payment\ForexQuote', + 'deliveryAddress' => '\Adyen\Model\Payment\Address', + 'deliveryDate' => '\DateTime', + 'deviceFingerprint' => 'string', + 'fraudOffset' => 'int', + 'installments' => '\Adyen\Model\Payment\Installments', + 'localizedShopperStatement' => 'array', + 'mcc' => 'string', + 'merchantAccount' => 'string', + 'merchantOrderReference' => 'string', + 'merchantRiskIndicator' => '\Adyen\Model\Payment\MerchantRiskIndicator', + 'metadata' => 'array', + 'orderReference' => 'string', + 'recurring' => '\Adyen\Model\Payment\Recurring', + 'recurringProcessingModel' => 'string', + 'reference' => 'string', + 'selectedBrand' => 'string', + 'selectedRecurringDetailReference' => 'string', + 'sessionId' => 'string', + 'shopperEmail' => 'string', + 'shopperIP' => 'string', + 'shopperInteraction' => 'string', + 'shopperLocale' => 'string', + 'shopperName' => '\Adyen\Model\Payment\Name', + 'shopperReference' => 'string', + 'shopperStatement' => 'string', + 'socialSecurityNumber' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'store' => 'string', + 'telephoneNumber' => 'string', + 'threeDS2RequestData' => '\Adyen\Model\Payment\ThreeDS2RequestData', + 'threeDS2Result' => '\Adyen\Model\Payment\ThreeDS2Result', + 'threeDS2Token' => 'string', + 'threeDSAuthenticationOnly' => 'bool', + 'totalsGroup' => 'string', + 'trustedShopper' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountInfo' => null, + 'additionalAmount' => null, + 'additionalData' => null, + 'amount' => null, + 'applicationInfo' => null, + 'billingAddress' => null, + 'browserInfo' => null, + 'captureDelayHours' => 'int32', + 'dateOfBirth' => 'date', + 'dccQuote' => null, + 'deliveryAddress' => null, + 'deliveryDate' => 'date-time', + 'deviceFingerprint' => null, + 'fraudOffset' => 'int32', + 'installments' => null, + 'localizedShopperStatement' => null, + 'mcc' => null, + 'merchantAccount' => null, + 'merchantOrderReference' => null, + 'merchantRiskIndicator' => null, + 'metadata' => null, + 'orderReference' => null, + 'recurring' => null, + 'recurringProcessingModel' => null, + 'reference' => null, + 'selectedBrand' => null, + 'selectedRecurringDetailReference' => null, + 'sessionId' => null, + 'shopperEmail' => null, + 'shopperIP' => null, + 'shopperInteraction' => null, + 'shopperLocale' => null, + 'shopperName' => null, + 'shopperReference' => null, + 'shopperStatement' => null, + 'socialSecurityNumber' => null, + 'splits' => null, + 'store' => null, + 'telephoneNumber' => null, + 'threeDS2RequestData' => null, + 'threeDS2Result' => null, + 'threeDS2Token' => null, + 'threeDSAuthenticationOnly' => null, + 'totalsGroup' => null, + 'trustedShopper' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountInfo' => false, + 'additionalAmount' => false, + 'additionalData' => false, + 'amount' => false, + 'applicationInfo' => false, + 'billingAddress' => false, + 'browserInfo' => false, + 'captureDelayHours' => true, + 'dateOfBirth' => false, + 'dccQuote' => false, + 'deliveryAddress' => false, + 'deliveryDate' => false, + 'deviceFingerprint' => false, + 'fraudOffset' => true, + 'installments' => false, + 'localizedShopperStatement' => false, + 'mcc' => false, + 'merchantAccount' => false, + 'merchantOrderReference' => false, + 'merchantRiskIndicator' => false, + 'metadata' => false, + 'orderReference' => false, + 'recurring' => false, + 'recurringProcessingModel' => false, + 'reference' => false, + 'selectedBrand' => false, + 'selectedRecurringDetailReference' => false, + 'sessionId' => false, + 'shopperEmail' => false, + 'shopperIP' => false, + 'shopperInteraction' => false, + 'shopperLocale' => false, + 'shopperName' => false, + 'shopperReference' => false, + 'shopperStatement' => false, + 'socialSecurityNumber' => false, + 'splits' => false, + 'store' => false, + 'telephoneNumber' => false, + 'threeDS2RequestData' => false, + 'threeDS2Result' => false, + 'threeDS2Token' => false, + 'threeDSAuthenticationOnly' => false, + 'totalsGroup' => false, + 'trustedShopper' => 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 = [ + 'accountInfo' => 'accountInfo', + 'additionalAmount' => 'additionalAmount', + 'additionalData' => 'additionalData', + 'amount' => 'amount', + 'applicationInfo' => 'applicationInfo', + 'billingAddress' => 'billingAddress', + 'browserInfo' => 'browserInfo', + 'captureDelayHours' => 'captureDelayHours', + 'dateOfBirth' => 'dateOfBirth', + 'dccQuote' => 'dccQuote', + 'deliveryAddress' => 'deliveryAddress', + 'deliveryDate' => 'deliveryDate', + 'deviceFingerprint' => 'deviceFingerprint', + 'fraudOffset' => 'fraudOffset', + 'installments' => 'installments', + 'localizedShopperStatement' => 'localizedShopperStatement', + 'mcc' => 'mcc', + 'merchantAccount' => 'merchantAccount', + 'merchantOrderReference' => 'merchantOrderReference', + 'merchantRiskIndicator' => 'merchantRiskIndicator', + 'metadata' => 'metadata', + 'orderReference' => 'orderReference', + 'recurring' => 'recurring', + 'recurringProcessingModel' => 'recurringProcessingModel', + 'reference' => 'reference', + 'selectedBrand' => 'selectedBrand', + 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', + 'sessionId' => 'sessionId', + 'shopperEmail' => 'shopperEmail', + 'shopperIP' => 'shopperIP', + 'shopperInteraction' => 'shopperInteraction', + 'shopperLocale' => 'shopperLocale', + 'shopperName' => 'shopperName', + 'shopperReference' => 'shopperReference', + 'shopperStatement' => 'shopperStatement', + 'socialSecurityNumber' => 'socialSecurityNumber', + 'splits' => 'splits', + 'store' => 'store', + 'telephoneNumber' => 'telephoneNumber', + 'threeDS2RequestData' => 'threeDS2RequestData', + 'threeDS2Result' => 'threeDS2Result', + 'threeDS2Token' => 'threeDS2Token', + 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', + 'totalsGroup' => 'totalsGroup', + 'trustedShopper' => 'trustedShopper' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountInfo' => 'setAccountInfo', + 'additionalAmount' => 'setAdditionalAmount', + 'additionalData' => 'setAdditionalData', + 'amount' => 'setAmount', + 'applicationInfo' => 'setApplicationInfo', + 'billingAddress' => 'setBillingAddress', + 'browserInfo' => 'setBrowserInfo', + 'captureDelayHours' => 'setCaptureDelayHours', + 'dateOfBirth' => 'setDateOfBirth', + 'dccQuote' => 'setDccQuote', + 'deliveryAddress' => 'setDeliveryAddress', + 'deliveryDate' => 'setDeliveryDate', + 'deviceFingerprint' => 'setDeviceFingerprint', + 'fraudOffset' => 'setFraudOffset', + 'installments' => 'setInstallments', + 'localizedShopperStatement' => 'setLocalizedShopperStatement', + 'mcc' => 'setMcc', + 'merchantAccount' => 'setMerchantAccount', + 'merchantOrderReference' => 'setMerchantOrderReference', + 'merchantRiskIndicator' => 'setMerchantRiskIndicator', + 'metadata' => 'setMetadata', + 'orderReference' => 'setOrderReference', + 'recurring' => 'setRecurring', + 'recurringProcessingModel' => 'setRecurringProcessingModel', + 'reference' => 'setReference', + 'selectedBrand' => 'setSelectedBrand', + 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', + 'sessionId' => 'setSessionId', + 'shopperEmail' => 'setShopperEmail', + 'shopperIP' => 'setShopperIP', + 'shopperInteraction' => 'setShopperInteraction', + 'shopperLocale' => 'setShopperLocale', + 'shopperName' => 'setShopperName', + 'shopperReference' => 'setShopperReference', + 'shopperStatement' => 'setShopperStatement', + 'socialSecurityNumber' => 'setSocialSecurityNumber', + 'splits' => 'setSplits', + 'store' => 'setStore', + 'telephoneNumber' => 'setTelephoneNumber', + 'threeDS2RequestData' => 'setThreeDS2RequestData', + 'threeDS2Result' => 'setThreeDS2Result', + 'threeDS2Token' => 'setThreeDS2Token', + 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', + 'totalsGroup' => 'setTotalsGroup', + 'trustedShopper' => 'setTrustedShopper' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountInfo' => 'getAccountInfo', + 'additionalAmount' => 'getAdditionalAmount', + 'additionalData' => 'getAdditionalData', + 'amount' => 'getAmount', + 'applicationInfo' => 'getApplicationInfo', + 'billingAddress' => 'getBillingAddress', + 'browserInfo' => 'getBrowserInfo', + 'captureDelayHours' => 'getCaptureDelayHours', + 'dateOfBirth' => 'getDateOfBirth', + 'dccQuote' => 'getDccQuote', + 'deliveryAddress' => 'getDeliveryAddress', + 'deliveryDate' => 'getDeliveryDate', + 'deviceFingerprint' => 'getDeviceFingerprint', + 'fraudOffset' => 'getFraudOffset', + 'installments' => 'getInstallments', + 'localizedShopperStatement' => 'getLocalizedShopperStatement', + 'mcc' => 'getMcc', + 'merchantAccount' => 'getMerchantAccount', + 'merchantOrderReference' => 'getMerchantOrderReference', + 'merchantRiskIndicator' => 'getMerchantRiskIndicator', + 'metadata' => 'getMetadata', + 'orderReference' => 'getOrderReference', + 'recurring' => 'getRecurring', + 'recurringProcessingModel' => 'getRecurringProcessingModel', + 'reference' => 'getReference', + 'selectedBrand' => 'getSelectedBrand', + 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', + 'sessionId' => 'getSessionId', + 'shopperEmail' => 'getShopperEmail', + 'shopperIP' => 'getShopperIP', + 'shopperInteraction' => 'getShopperInteraction', + 'shopperLocale' => 'getShopperLocale', + 'shopperName' => 'getShopperName', + 'shopperReference' => 'getShopperReference', + 'shopperStatement' => 'getShopperStatement', + 'socialSecurityNumber' => 'getSocialSecurityNumber', + 'splits' => 'getSplits', + 'store' => 'getStore', + 'telephoneNumber' => 'getTelephoneNumber', + 'threeDS2RequestData' => 'getThreeDS2RequestData', + 'threeDS2Result' => 'getThreeDS2Result', + 'threeDS2Token' => 'getThreeDS2Token', + 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', + 'totalsGroup' => 'getTotalsGroup', + 'trustedShopper' => 'getTrustedShopper' + ]; + + /** + * 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 RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; + public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; + public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + 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'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringProcessingModelAllowableValues() + { + return [ + self::RECURRING_PROCESSING_MODEL_CARD_ON_FILE, + self::RECURRING_PROCESSING_MODEL_SUBSCRIPTION, + self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, + ]; + } + /** + * 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, + ]; + } + /** + * 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('accountInfo', $data ?? [], null); + $this->setIfExists('additionalAmount', $data ?? [], null); + $this->setIfExists('additionalData', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('applicationInfo', $data ?? [], null); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('browserInfo', $data ?? [], null); + $this->setIfExists('captureDelayHours', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('dccQuote', $data ?? [], null); + $this->setIfExists('deliveryAddress', $data ?? [], null); + $this->setIfExists('deliveryDate', $data ?? [], null); + $this->setIfExists('deviceFingerprint', $data ?? [], null); + $this->setIfExists('fraudOffset', $data ?? [], null); + $this->setIfExists('installments', $data ?? [], null); + $this->setIfExists('localizedShopperStatement', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('merchantOrderReference', $data ?? [], null); + $this->setIfExists('merchantRiskIndicator', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('orderReference', $data ?? [], null); + $this->setIfExists('recurring', $data ?? [], null); + $this->setIfExists('recurringProcessingModel', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('selectedBrand', $data ?? [], null); + $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); + $this->setIfExists('sessionId', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('shopperIP', $data ?? [], null); + $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('shopperLocale', $data ?? [], null); + $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('shopperReference', $data ?? [], null); + $this->setIfExists('shopperStatement', $data ?? [], null); + $this->setIfExists('socialSecurityNumber', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('threeDS2RequestData', $data ?? [], null); + $this->setIfExists('threeDS2Result', $data ?? [], null); + $this->setIfExists('threeDS2Token', $data ?? [], null); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('totalsGroup', $data ?? [], null); + $this->setIfExists('trustedShopper', $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"; + } + if ($this->container['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $this->container['recurringProcessingModel'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['reference'] === null) { + $invalidProperties[] = "'reference' 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) + ); + } + + 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 accountInfo + * + * @return \Adyen\Model\Payment\AccountInfo|null + */ + public function getAccountInfo() + { + return $this->container['accountInfo']; + } + + /** + * Sets accountInfo + * + * @param \Adyen\Model\Payment\AccountInfo|null $accountInfo accountInfo + * + * @return self + */ + public function setAccountInfo($accountInfo) + { + if (is_null($accountInfo)) { + throw new \InvalidArgumentException('non-nullable accountInfo cannot be null'); + } + $this->container['accountInfo'] = $accountInfo; + + return $this; + } + + /** + * Gets additionalAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getAdditionalAmount() + { + return $this->container['additionalAmount']; + } + + /** + * Sets additionalAmount + * + * @param \Adyen\Model\Payment\Amount|null $additionalAmount additionalAmount + * + * @return self + */ + public function setAdditionalAmount($additionalAmount) + { + if (is_null($additionalAmount)) { + throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); + } + $this->container['additionalAmount'] = $additionalAmount; + + return $this; + } + + /** + * Gets additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\Payment\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Payment\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; + } + + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Payment\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Payment\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + + /** + * Gets billingAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param \Adyen\Model\Payment\Address|null $billingAddress billingAddress + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets browserInfo + * + * @return \Adyen\Model\Payment\BrowserInfo|null + */ + public function getBrowserInfo() + { + return $this->container['browserInfo']; + } + + /** + * Sets browserInfo + * + * @param \Adyen\Model\Payment\BrowserInfo|null $browserInfo browserInfo + * + * @return self + */ + public function setBrowserInfo($browserInfo) + { + if (is_null($browserInfo)) { + throw new \InvalidArgumentException('non-nullable browserInfo cannot be null'); + } + $this->container['browserInfo'] = $browserInfo; + + return $this; + } + + /** + * Gets captureDelayHours + * + * @return int|null + */ + public function getCaptureDelayHours() + { + return $this->container['captureDelayHours']; + } + + /** + * Sets captureDelayHours + * + * @param int|null $captureDelayHours The delay between the authorisation and scheduled auto-capture, specified in hours. + * + * @return self + */ + public function setCaptureDelayHours($captureDelayHours) + { + // Do nothing for nullable integers + $this->container['captureDelayHours'] = $captureDelayHours; + + return $this; + } + + /** + * Gets dateOfBirth + * + * @return \DateTime|null + */ + public function getDateOfBirth() + { + return $this->container['dateOfBirth']; + } + + /** + * Sets dateOfBirth + * + * @param \DateTime|null $dateOfBirth The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD + * + * @return self + */ + public function setDateOfBirth($dateOfBirth) + { + if (is_null($dateOfBirth)) { + throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets dccQuote + * + * @return \Adyen\Model\Payment\ForexQuote|null + */ + public function getDccQuote() + { + return $this->container['dccQuote']; + } + + /** + * Sets dccQuote + * + * @param \Adyen\Model\Payment\ForexQuote|null $dccQuote dccQuote + * + * @return self + */ + public function setDccQuote($dccQuote) + { + if (is_null($dccQuote)) { + throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); + } + $this->container['dccQuote'] = $dccQuote; + + return $this; + } + + /** + * Gets deliveryAddress + * + * @return \Adyen\Model\Payment\Address|null + */ + public function getDeliveryAddress() + { + return $this->container['deliveryAddress']; + } + + /** + * Sets deliveryAddress + * + * @param \Adyen\Model\Payment\Address|null $deliveryAddress deliveryAddress + * + * @return self + */ + public function setDeliveryAddress($deliveryAddress) + { + if (is_null($deliveryAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + } + $this->container['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + /** + * Gets deliveryDate + * + * @return \DateTime|null + */ + public function getDeliveryDate() + { + return $this->container['deliveryDate']; + } + + /** + * Sets deliveryDate + * + * @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 + */ + public function setDeliveryDate($deliveryDate) + { + if (is_null($deliveryDate)) { + throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); + } + $this->container['deliveryDate'] = $deliveryDate; + + return $this; + } + + /** + * Gets deviceFingerprint + * + * @return string|null + */ + public function getDeviceFingerprint() + { + return $this->container['deviceFingerprint']; + } + + /** + * Sets deviceFingerprint + * + * @param string|null $deviceFingerprint A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). + * + * @return self + */ + public function setDeviceFingerprint($deviceFingerprint) + { + if (is_null($deviceFingerprint)) { + throw new \InvalidArgumentException('non-nullable deviceFingerprint cannot be null'); + } + $this->container['deviceFingerprint'] = $deviceFingerprint; + + return $this; + } + + /** + * Gets fraudOffset + * + * @return int|null + */ + public function getFraudOffset() + { + return $this->container['fraudOffset']; + } + + /** + * Sets fraudOffset + * + * @param int|null $fraudOffset An integer value that is added to the normal fraud score. The value can be either positive or negative. + * + * @return self + */ + public function setFraudOffset($fraudOffset) + { + // Do nothing for nullable integers + $this->container['fraudOffset'] = $fraudOffset; + + return $this; + } + + /** + * Gets installments + * + * @return \Adyen\Model\Payment\Installments|null + */ + public function getInstallments() + { + return $this->container['installments']; + } + + /** + * Sets installments + * + * @param \Adyen\Model\Payment\Installments|null $installments installments + * + * @return self + */ + public function setInstallments($installments) + { + if (is_null($installments)) { + throw new \InvalidArgumentException('non-nullable installments cannot be null'); + } + $this->container['installments'] = $installments; + + return $this; + } + + /** + * Gets localizedShopperStatement + * + * @return array|null + */ + public function getLocalizedShopperStatement() + { + return $this->container['localizedShopperStatement']; + } + + /** + * Sets localizedShopperStatement + * + * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. + * + * @return self + */ + public function setLocalizedShopperStatement($localizedShopperStatement) + { + if (is_null($localizedShopperStatement)) { + throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); + } + $this->container['localizedShopperStatement'] = $localizedShopperStatement; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. + * + * @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 merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets merchantOrderReference + * + * @return string|null + */ + public function getMerchantOrderReference() + { + return $this->container['merchantOrderReference']; + } + + /** + * Sets merchantOrderReference + * + * @param string|null $merchantOrderReference This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. + * + * @return self + */ + public function setMerchantOrderReference($merchantOrderReference) + { + if (is_null($merchantOrderReference)) { + throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); + } + $this->container['merchantOrderReference'] = $merchantOrderReference; + + return $this; + } + + /** + * Gets merchantRiskIndicator + * + * @return \Adyen\Model\Payment\MerchantRiskIndicator|null + */ + public function getMerchantRiskIndicator() + { + return $this->container['merchantRiskIndicator']; + } + + /** + * Sets merchantRiskIndicator + * + * @param \Adyen\Model\Payment\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator + * + * @return self + */ + public function setMerchantRiskIndicator($merchantRiskIndicator) + { + if (is_null($merchantRiskIndicator)) { + throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); + } + $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. + * + * @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 orderReference + * + * @return string|null + */ + public function getOrderReference() + { + return $this->container['orderReference']; + } + + /** + * Sets orderReference + * + * @param string|null $orderReference When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. + * + * @return self + */ + public function setOrderReference($orderReference) + { + if (is_null($orderReference)) { + throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); + } + $this->container['orderReference'] = $orderReference; + + return $this; + } + + /** + * Gets recurring + * + * @return \Adyen\Model\Payment\Recurring|null + */ + public function getRecurring() + { + return $this->container['recurring']; + } + + /** + * Sets recurring + * + * @param \Adyen\Model\Payment\Recurring|null $recurring recurring + * + * @return self + */ + public function setRecurring($recurring) + { + if (is_null($recurring)) { + throw new \InvalidArgumentException('non-nullable recurring cannot be null'); + } + $this->container['recurring'] = $recurring; + + return $this; + } + + /** + * Gets recurringProcessingModel + * + * @return string|null + */ + public function getRecurringProcessingModel() + { + return $this->container['recurringProcessingModel']; + } + + /** + * Sets recurringProcessingModel + * + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed 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 have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * + * @return self + */ + public function setRecurringProcessingModel($recurringProcessingModel) + { + if (is_null($recurringProcessingModel)) { + throw new \InvalidArgumentException('non-nullable recurringProcessingModel cannot be null'); + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!in_array($recurringProcessingModel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $recurringProcessingModel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurringProcessingModel'] = $recurringProcessingModel; + + return $this; + } + + /** + * Gets reference + * + * @return string + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets selectedBrand + * + * @return string|null + */ + public function getSelectedBrand() + { + return $this->container['selectedBrand']; + } + + /** + * Sets selectedBrand + * + * @param string|null $selectedBrand Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. + * + * @return self + */ + public function setSelectedBrand($selectedBrand) + { + if (is_null($selectedBrand)) { + throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); + } + $this->container['selectedBrand'] = $selectedBrand; + + return $this; + } + + /** + * Gets selectedRecurringDetailReference + * + * @return string|null + */ + public function getSelectedRecurringDetailReference() + { + return $this->container['selectedRecurringDetailReference']; + } + + /** + * Sets selectedRecurringDetailReference + * + * @param string|null $selectedRecurringDetailReference The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * + * @return self + */ + public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) + { + if (is_null($selectedRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); + } + $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; + + return $this; + } + + /** + * Gets sessionId + * + * @return string|null + */ + public function getSessionId() + { + return $this->container['sessionId']; + } + + /** + * Sets sessionId + * + * @param string|null $sessionId A session ID used to identify a payment session. + * + * @return self + */ + public function setSessionId($sessionId) + { + if (is_null($sessionId)) { + throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); + } + $this->container['sessionId'] = $sessionId; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets shopperIP + * + * @return string|null + */ + public function getShopperIP() + { + return $this->container['shopperIP']; + } + + /** + * Sets shopperIP + * + * @param string|null $shopperIP The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + * + * @return self + */ + public function setShopperIP($shopperIP) + { + if (is_null($shopperIP)) { + throw new \InvalidArgumentException('non-nullable shopperIP cannot be null'); + } + $this->container['shopperIP'] = $shopperIP; + + return $this; + } + + /** + * Gets shopperInteraction + * + * @return string|null + */ + public function getShopperInteraction() + { + return $this->container['shopperInteraction']; + } + + /** + * Sets shopperInteraction + * + * @param string|null $shopperInteraction Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + * + * @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 shopperLocale + * + * @return string|null + */ + public function getShopperLocale() + { + return $this->container['shopperLocale']; + } + + /** + * Sets shopperLocale + * + * @param string|null $shopperLocale The combination of a language code and a country code to specify the language to be used in the payment. + * + * @return self + */ + public function setShopperLocale($shopperLocale) + { + if (is_null($shopperLocale)) { + throw new \InvalidArgumentException('non-nullable shopperLocale cannot be null'); + } + $this->container['shopperLocale'] = $shopperLocale; + + return $this; + } + + /** + * Gets shopperName + * + * @return \Adyen\Model\Payment\Name|null + */ + public function getShopperName() + { + return $this->container['shopperName']; + } + + /** + * Sets shopperName + * + * @param \Adyen\Model\Payment\Name|null $shopperName shopperName + * + * @return self + */ + public function setShopperName($shopperName) + { + if (is_null($shopperName)) { + throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); + } + $this->container['shopperName'] = $shopperName; + + return $this; + } + + /** + * Gets shopperReference + * + * @return string|null + */ + public function getShopperReference() + { + return $this->container['shopperReference']; + } + + /** + * Sets shopperReference + * + * @param string|null $shopperReference Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + * + * @return self + */ + public function setShopperReference($shopperReference) + { + if (is_null($shopperReference)) { + throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); + } + $this->container['shopperReference'] = $shopperReference; + + return $this; + } + + /** + * Gets shopperStatement + * + * @return string|null + */ + public function getShopperStatement() + { + return $this->container['shopperStatement']; + } + + /** + * Sets shopperStatement + * + * @param string|null $shopperStatement The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. + * + * @return self + */ + public function setShopperStatement($shopperStatement) + { + if (is_null($shopperStatement)) { + throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); + } + $this->container['shopperStatement'] = $shopperStatement; + + return $this; + } + + /** + * Gets socialSecurityNumber + * + * @return string|null + */ + public function getSocialSecurityNumber() + { + return $this->container['socialSecurityNumber']; + } + + /** + * Sets socialSecurityNumber + * + * @param string|null $socialSecurityNumber The shopper's social security number. + * + * @return self + */ + public function setSocialSecurityNumber($socialSecurityNumber) + { + if (is_null($socialSecurityNumber)) { + throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); + } + $this->container['socialSecurityNumber'] = $socialSecurityNumber; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber The shopper's telephone number. + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + + /** + * Gets threeDS2RequestData + * + * @return \Adyen\Model\Payment\ThreeDS2RequestData|null + */ + public function getThreeDS2RequestData() + { + return $this->container['threeDS2RequestData']; + } + + /** + * Sets threeDS2RequestData + * + * @param \Adyen\Model\Payment\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * + * @return self + */ + public function setThreeDS2RequestData($threeDS2RequestData) + { + if (is_null($threeDS2RequestData)) { + throw new \InvalidArgumentException('non-nullable threeDS2RequestData cannot be null'); + } + $this->container['threeDS2RequestData'] = $threeDS2RequestData; + + return $this; + } + + /** + * Gets threeDS2Result + * + * @return \Adyen\Model\Payment\ThreeDS2Result|null + */ + public function getThreeDS2Result() + { + return $this->container['threeDS2Result']; + } + + /** + * Sets threeDS2Result + * + * @param \Adyen\Model\Payment\ThreeDS2Result|null $threeDS2Result threeDS2Result + * + * @return self + */ + public function setThreeDS2Result($threeDS2Result) + { + if (is_null($threeDS2Result)) { + throw new \InvalidArgumentException('non-nullable threeDS2Result cannot be null'); + } + $this->container['threeDS2Result'] = $threeDS2Result; + + return $this; + } + + /** + * Gets threeDS2Token + * + * @return string|null + */ + public function getThreeDS2Token() + { + return $this->container['threeDS2Token']; + } + + /** + * Sets threeDS2Token + * + * @param string|null $threeDS2Token The ThreeDS2Token that was returned in the /authorise call. + * + * @return self + */ + public function setThreeDS2Token($threeDS2Token) + { + if (is_null($threeDS2Token)) { + throw new \InvalidArgumentException('non-nullable threeDS2Token cannot be null'); + } + $this->container['threeDS2Token'] = $threeDS2Token; + + return $this; + } + + /** + * Gets threeDSAuthenticationOnly + * + * @return bool|null + */ + public function getThreeDSAuthenticationOnly() + { + return $this->container['threeDSAuthenticationOnly']; + } + + /** + * Sets threeDSAuthenticationOnly + * + * @param bool|null $threeDSAuthenticationOnly 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 + */ + public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) + { + if (is_null($threeDSAuthenticationOnly)) { + throw new \InvalidArgumentException('non-nullable threeDSAuthenticationOnly cannot be null'); + } + $this->container['threeDSAuthenticationOnly'] = $threeDSAuthenticationOnly; + + return $this; + } + + /** + * Gets totalsGroup + * + * @return string|null + */ + public function getTotalsGroup() + { + return $this->container['totalsGroup']; + } + + /** + * Sets totalsGroup + * + * @param string|null $totalsGroup The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). + * + * @return self + */ + public function setTotalsGroup($totalsGroup) + { + if (is_null($totalsGroup)) { + throw new \InvalidArgumentException('non-nullable totalsGroup cannot be null'); + } + $this->container['totalsGroup'] = $totalsGroup; + + return $this; + } + + /** + * Gets trustedShopper + * + * @return bool|null + */ + public function getTrustedShopper() + { + return $this->container['trustedShopper']; + } + + /** + * Sets trustedShopper + * + * @param bool|null $trustedShopper Set to true if the payment should be routed to a trusted MID. + * + * @return self + */ + public function setTrustedShopper($trustedShopper) + { + if (is_null($trustedShopper)) { + throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); + } + $this->container['trustedShopper'] = $trustedShopper; + + 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/Payment/PaymentResult.php b/src/Adyen/Model/Payment/PaymentResult.php new file mode 100644 index 000000000..bf0ac3555 --- /dev/null +++ b/src/Adyen/Model/Payment/PaymentResult.php @@ -0,0 +1,781 @@ + + */ +class PaymentResult implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'authCode' => 'string', + 'dccAmount' => '\Adyen\Model\Payment\Amount', + 'dccSignature' => 'string', + 'fraudResult' => '\Adyen\Model\Payment\FraudResult', + 'issuerUrl' => 'string', + 'md' => 'string', + 'paRequest' => 'string', + 'pspReference' => 'string', + 'refusalReason' => 'string', + 'resultCode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'authCode' => null, + 'dccAmount' => null, + 'dccSignature' => null, + 'fraudResult' => null, + 'issuerUrl' => null, + 'md' => null, + 'paRequest' => null, + 'pspReference' => null, + 'refusalReason' => null, + 'resultCode' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'authCode' => false, + 'dccAmount' => false, + 'dccSignature' => false, + 'fraudResult' => false, + 'issuerUrl' => false, + 'md' => false, + 'paRequest' => false, + 'pspReference' => false, + 'refusalReason' => false, + 'resultCode' => 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 = [ + 'additionalData' => 'additionalData', + 'authCode' => 'authCode', + 'dccAmount' => 'dccAmount', + 'dccSignature' => 'dccSignature', + 'fraudResult' => 'fraudResult', + 'issuerUrl' => 'issuerUrl', + 'md' => 'md', + 'paRequest' => 'paRequest', + 'pspReference' => 'pspReference', + 'refusalReason' => 'refusalReason', + 'resultCode' => 'resultCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'authCode' => 'setAuthCode', + 'dccAmount' => 'setDccAmount', + 'dccSignature' => 'setDccSignature', + 'fraudResult' => 'setFraudResult', + 'issuerUrl' => 'setIssuerUrl', + 'md' => 'setMd', + 'paRequest' => 'setPaRequest', + 'pspReference' => 'setPspReference', + 'refusalReason' => 'setRefusalReason', + 'resultCode' => 'setResultCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'authCode' => 'getAuthCode', + 'dccAmount' => 'getDccAmount', + 'dccSignature' => 'getDccSignature', + 'fraudResult' => 'getFraudResult', + 'issuerUrl' => 'getIssuerUrl', + 'md' => 'getMd', + 'paRequest' => 'getPaRequest', + 'pspReference' => 'getPspReference', + 'refusalReason' => 'getRefusalReason', + 'resultCode' => 'getResultCode' + ]; + + /** + * 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 RESULT_CODE_AUTHENTICATION_FINISHED = 'AuthenticationFinished'; + public const RESULT_CODE_AUTHENTICATION_NOT_REQUIRED = 'AuthenticationNotRequired'; + public const RESULT_CODE_AUTHORISED = 'Authorised'; + public const RESULT_CODE_CANCELLED = 'Cancelled'; + 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'; + public const RESULT_CODE_REDIRECT_SHOPPER = 'RedirectShopper'; + public const RESULT_CODE_REFUSED = 'Refused'; + public const RESULT_CODE_SUCCESS = 'Success'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getResultCodeAllowableValues() + { + return [ + self::RESULT_CODE_AUTHENTICATION_FINISHED, + self::RESULT_CODE_AUTHENTICATION_NOT_REQUIRED, + self::RESULT_CODE_AUTHORISED, + self::RESULT_CODE_CANCELLED, + 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, + self::RESULT_CODE_REDIRECT_SHOPPER, + self::RESULT_CODE_REFUSED, + self::RESULT_CODE_SUCCESS, + ]; + } + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('authCode', $data ?? [], null); + $this->setIfExists('dccAmount', $data ?? [], null); + $this->setIfExists('dccSignature', $data ?? [], null); + $this->setIfExists('fraudResult', $data ?? [], null); + $this->setIfExists('issuerUrl', $data ?? [], null); + $this->setIfExists('md', $data ?? [], null); + $this->setIfExists('paRequest', $data ?? [], null); + $this->setIfExists('pspReference', $data ?? [], null); + $this->setIfExists('refusalReason', $data ?? [], null); + $this->setIfExists('resultCode', $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->getResultCodeAllowableValues(); + if (!is_null($this->container['resultCode']) && !in_array($this->container['resultCode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'resultCode', must be one of '%s'", + $this->container['resultCode'], + 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets authCode + * + * @return string|null + */ + public function getAuthCode() + { + return $this->container['authCode']; + } + + /** + * Sets authCode + * + * @param string|null $authCode Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. + * + * @return self + */ + public function setAuthCode($authCode) + { + if (is_null($authCode)) { + throw new \InvalidArgumentException('non-nullable authCode cannot be null'); + } + $this->container['authCode'] = $authCode; + + return $this; + } + + /** + * Gets dccAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getDccAmount() + { + return $this->container['dccAmount']; + } + + /** + * Sets dccAmount + * + * @param \Adyen\Model\Payment\Amount|null $dccAmount dccAmount + * + * @return self + */ + public function setDccAmount($dccAmount) + { + if (is_null($dccAmount)) { + throw new \InvalidArgumentException('non-nullable dccAmount cannot be null'); + } + $this->container['dccAmount'] = $dccAmount; + + return $this; + } + + /** + * Gets dccSignature + * + * @return string|null + */ + public function getDccSignature() + { + return $this->container['dccSignature']; + } + + /** + * Sets dccSignature + * + * @param string|null $dccSignature Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + * + * @return self + */ + public function setDccSignature($dccSignature) + { + if (is_null($dccSignature)) { + throw new \InvalidArgumentException('non-nullable dccSignature cannot be null'); + } + $this->container['dccSignature'] = $dccSignature; + + return $this; + } + + /** + * Gets fraudResult + * + * @return \Adyen\Model\Payment\FraudResult|null + */ + public function getFraudResult() + { + return $this->container['fraudResult']; + } + + /** + * Sets fraudResult + * + * @param \Adyen\Model\Payment\FraudResult|null $fraudResult fraudResult + * + * @return self + */ + public function setFraudResult($fraudResult) + { + if (is_null($fraudResult)) { + throw new \InvalidArgumentException('non-nullable fraudResult cannot be null'); + } + $this->container['fraudResult'] = $fraudResult; + + return $this; + } + + /** + * Gets issuerUrl + * + * @return string|null + */ + public function getIssuerUrl() + { + return $this->container['issuerUrl']; + } + + /** + * Sets issuerUrl + * + * @param string|null $issuerUrl The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL. + * + * @return self + */ + public function setIssuerUrl($issuerUrl) + { + if (is_null($issuerUrl)) { + throw new \InvalidArgumentException('non-nullable issuerUrl cannot be null'); + } + $this->container['issuerUrl'] = $issuerUrl; + + return $this; + } + + /** + * Gets md + * + * @return string|null + */ + public function getMd() + { + return $this->container['md']; + } + + /** + * Sets md + * + * @param string|null $md The payment session. + * + * @return self + */ + public function setMd($md) + { + if (is_null($md)) { + throw new \InvalidArgumentException('non-nullable md cannot be null'); + } + $this->container['md'] = $md; + + return $this; + } + + /** + * Gets paRequest + * + * @return string|null + */ + public function getPaRequest() + { + return $this->container['paRequest']; + } + + /** + * Sets paRequest + * + * @param string|null $paRequest The 3D request data for the issuer. If the value is **CUPSecurePlus-CollectSMSVerificationCode**, collect an SMS code from the shopper and pass it in the `/authorise3D` request. For more information, see [3D Secure](https://docs.adyen.com/classic-integration/3d-secure). + * + * @return self + */ + public function setPaRequest($paRequest) + { + if (is_null($paRequest)) { + throw new \InvalidArgumentException('non-nullable paRequest cannot be null'); + } + $this->container['paRequest'] = $paRequest; + + return $this; + } + + /** + * Gets pspReference + * + * @return string|null + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string|null $pspReference Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. + * + * @return self + */ + public function setPspReference($pspReference) + { + if (is_null($pspReference)) { + throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); + } + $this->container['pspReference'] = $pspReference; + + return $this; + } + + /** + * Gets refusalReason + * + * @return string|null + */ + public function getRefusalReason() + { + return $this->container['refusalReason']; + } + + /** + * Sets refusalReason + * + * @param string|null $refusalReason If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). + * + * @return self + */ + public function setRefusalReason($refusalReason) + { + if (is_null($refusalReason)) { + throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); + } + $this->container['refusalReason'] = $refusalReason; + + return $this; + } + + /** + * Gets resultCode + * + * @return string|null + */ + public function getResultCode() + { + return $this->container['resultCode']; + } + + /** + * 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. * **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 + */ + public function setResultCode($resultCode) + { + if (is_null($resultCode)) { + throw new \InvalidArgumentException('non-nullable resultCode cannot be null'); + } + $allowedValues = $this->getResultCodeAllowableValues(); + if (!in_array($resultCode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'resultCode', must be one of '%s'", + $resultCode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['resultCode'] = $resultCode; + + 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/Payment/Phone.php b/src/Adyen/Model/Payment/Phone.php new file mode 100644 index 000000000..bfaa334c7 --- /dev/null +++ b/src/Adyen/Model/Payment/Phone.php @@ -0,0 +1,418 @@ + + */ +class Phone implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Phone'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cc' => 'string', + 'subscriber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cc' => null, + 'subscriber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cc' => false, + 'subscriber' => 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 = [ + 'cc' => 'cc', + 'subscriber' => 'subscriber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cc' => 'setCc', + 'subscriber' => 'setSubscriber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cc' => 'getCc', + 'subscriber' => 'getSubscriber' + ]; + + /** + * 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('cc', $data ?? [], null); + $this->setIfExists('subscriber', $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 cc + * + * @return string|null + */ + public function getCc() + { + return $this->container['cc']; + } + + /** + * Sets cc + * + * @param string|null $cc Country code. Length: 1–3 characters. + * + * @return self + */ + public function setCc($cc) + { + if (is_null($cc)) { + throw new \InvalidArgumentException('non-nullable cc cannot be null'); + } + $this->container['cc'] = $cc; + + return $this; + } + + /** + * Gets subscriber + * + * @return string|null + */ + public function getSubscriber() + { + return $this->container['subscriber']; + } + + /** + * Sets subscriber + * + * @param string|null $subscriber Subscriber number. Maximum length: 15 characters. + * + * @return self + */ + public function setSubscriber($subscriber) + { + if (is_null($subscriber)) { + throw new \InvalidArgumentException('non-nullable subscriber cannot be null'); + } + $this->container['subscriber'] = $subscriber; + + 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/Payment/PlatformChargebackLogic.php b/src/Adyen/Model/Payment/PlatformChargebackLogic.php new file mode 100644 index 000000000..8ab9e6145 --- /dev/null +++ b/src/Adyen/Model/Payment/PlatformChargebackLogic.php @@ -0,0 +1,487 @@ + + */ +class PlatformChargebackLogic implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PlatformChargebackLogic'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'behavior' => 'string', + 'costAllocationAccount' => 'string', + 'targetAccount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'behavior' => null, + 'costAllocationAccount' => null, + 'targetAccount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'behavior' => false, + 'costAllocationAccount' => false, + 'targetAccount' => 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 = [ + 'behavior' => 'behavior', + 'costAllocationAccount' => 'costAllocationAccount', + 'targetAccount' => 'targetAccount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'behavior' => 'setBehavior', + 'costAllocationAccount' => 'setCostAllocationAccount', + 'targetAccount' => 'setTargetAccount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'behavior' => 'getBehavior', + 'costAllocationAccount' => 'getCostAllocationAccount', + 'targetAccount' => 'getTargetAccount' + ]; + + /** + * 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 BEHAVIOR_DEDUCT_ACCORDING_TO_SPLIT_RATIO = 'deductAccordingToSplitRatio'; + public const BEHAVIOR_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const BEHAVIOR_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBehaviorAllowableValues() + { + return [ + self::BEHAVIOR_DEDUCT_ACCORDING_TO_SPLIT_RATIO, + self::BEHAVIOR_DEDUCT_FROM_LIABLE_ACCOUNT, + self::BEHAVIOR_DEDUCT_FROM_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('behavior', $data ?? [], null); + $this->setIfExists('costAllocationAccount', $data ?? [], null); + $this->setIfExists('targetAccount', $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->getBehaviorAllowableValues(); + if (!is_null($this->container['behavior']) && !in_array($this->container['behavior'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'behavior', must be one of '%s'", + $this->container['behavior'], + 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 behavior + * + * @return string|null + */ + public function getBehavior() + { + return $this->container['behavior']; + } + + /** + * Sets behavior + * + * @param string|null $behavior The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + * + * @return self + */ + public function setBehavior($behavior) + { + if (is_null($behavior)) { + throw new \InvalidArgumentException('non-nullable behavior cannot be null'); + } + $allowedValues = $this->getBehaviorAllowableValues(); + if (!in_array($behavior, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'behavior', must be one of '%s'", + $behavior, + implode("', '", $allowedValues) + ) + ); + } + $this->container['behavior'] = $behavior; + + return $this; + } + + /** + * Gets costAllocationAccount + * + * @return string|null + */ + public function getCostAllocationAccount() + { + return $this->container['costAllocationAccount']; + } + + /** + * Sets 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 + */ + public function setCostAllocationAccount($costAllocationAccount) + { + if (is_null($costAllocationAccount)) { + throw new \InvalidArgumentException('non-nullable costAllocationAccount cannot be null'); + } + $this->container['costAllocationAccount'] = $costAllocationAccount; + + return $this; + } + + /** + * Gets targetAccount + * + * @return string|null + */ + public function getTargetAccount() + { + return $this->container['targetAccount']; + } + + /** + * Sets 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 + */ + public function setTargetAccount($targetAccount) + { + if (is_null($targetAccount)) { + throw new \InvalidArgumentException('non-nullable targetAccount cannot be null'); + } + $this->container['targetAccount'] = $targetAccount; + + 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/Payment/Recurring.php b/src/Adyen/Model/Payment/Recurring.php new file mode 100644 index 000000000..e419adf3f --- /dev/null +++ b/src/Adyen/Model/Payment/Recurring.php @@ -0,0 +1,592 @@ + + */ +class Recurring implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Recurring'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'contract' => 'string', + 'recurringDetailName' => 'string', + 'recurringExpiry' => '\DateTime', + 'recurringFrequency' => 'string', + 'tokenService' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'contract' => null, + 'recurringDetailName' => null, + 'recurringExpiry' => 'date-time', + 'recurringFrequency' => null, + 'tokenService' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'contract' => false, + 'recurringDetailName' => false, + 'recurringExpiry' => false, + 'recurringFrequency' => false, + 'tokenService' => 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 = [ + 'contract' => 'contract', + 'recurringDetailName' => 'recurringDetailName', + 'recurringExpiry' => 'recurringExpiry', + 'recurringFrequency' => 'recurringFrequency', + 'tokenService' => 'tokenService' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contract' => 'setContract', + 'recurringDetailName' => 'setRecurringDetailName', + 'recurringExpiry' => 'setRecurringExpiry', + 'recurringFrequency' => 'setRecurringFrequency', + 'tokenService' => 'setTokenService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contract' => 'getContract', + 'recurringDetailName' => 'getRecurringDetailName', + 'recurringExpiry' => 'getRecurringExpiry', + 'recurringFrequency' => 'getRecurringFrequency', + 'tokenService' => 'getTokenService' + ]; + + /** + * 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 CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_RECURRING = 'RECURRING'; + public const CONTRACT_PAYOUT = 'PAYOUT'; + public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; + public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getContractAllowableValues() + { + return [ + self::CONTRACT_ONECLICK, + self::CONTRACT_RECURRING, + self::CONTRACT_PAYOUT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTokenServiceAllowableValues() + { + return [ + self::TOKEN_SERVICE_VISATOKENSERVICE, + self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, + ]; + } + /** + * 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('contract', $data ?? [], null); + $this->setIfExists('recurringDetailName', $data ?? [], null); + $this->setIfExists('recurringExpiry', $data ?? [], null); + $this->setIfExists('recurringFrequency', $data ?? [], null); + $this->setIfExists('tokenService', $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->getContractAllowableValues(); + if (!is_null($this->container['contract']) && !in_array($this->container['contract'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'contract', must be one of '%s'", + $this->container['contract'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTokenServiceAllowableValues(); + if (!is_null($this->container['tokenService']) && !in_array($this->container['tokenService'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tokenService', must be one of '%s'", + $this->container['tokenService'], + 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 contract + * + * @return string|null + */ + public function getContract() + { + return $this->container['contract']; + } + + /** + * Sets contract + * + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * + * @return self + */ + public function setContract($contract) + { + if (is_null($contract)) { + throw new \InvalidArgumentException('non-nullable contract cannot be null'); + } + $allowedValues = $this->getContractAllowableValues(); + if (!in_array($contract, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'contract', must be one of '%s'", + $contract, + implode("', '", $allowedValues) + ) + ); + } + $this->container['contract'] = $contract; + + return $this; + } + + /** + * Gets recurringDetailName + * + * @return string|null + */ + public function getRecurringDetailName() + { + return $this->container['recurringDetailName']; + } + + /** + * Sets recurringDetailName + * + * @param string|null $recurringDetailName A descriptive name for this detail. + * + * @return self + */ + public function setRecurringDetailName($recurringDetailName) + { + if (is_null($recurringDetailName)) { + throw new \InvalidArgumentException('non-nullable recurringDetailName cannot be null'); + } + $this->container['recurringDetailName'] = $recurringDetailName; + + return $this; + } + + /** + * Gets recurringExpiry + * + * @return \DateTime|null + */ + public function getRecurringExpiry() + { + return $this->container['recurringExpiry']; + } + + /** + * Sets recurringExpiry + * + * @param \DateTime|null $recurringExpiry Date after which no further authorisations shall be performed. Only for 3D Secure 2. + * + * @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 Minimum number of days between authorisations. Only for 3D Secure 2. + * + * @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 tokenService + * + * @return string|null + */ + public function getTokenService() + { + return $this->container['tokenService']; + } + + /** + * Sets tokenService + * + * @param string|null $tokenService The name of the token service. + * + * @return self + */ + public function setTokenService($tokenService) + { + if (is_null($tokenService)) { + throw new \InvalidArgumentException('non-nullable tokenService cannot be null'); + } + $allowedValues = $this->getTokenServiceAllowableValues(); + if (!in_array($tokenService, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tokenService', must be one of '%s'", + $tokenService, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tokenService'] = $tokenService; + + 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/Payment/RefundRequest.php b/src/Adyen/Model/Payment/RefundRequest.php new file mode 100644 index 000000000..3234d76e9 --- /dev/null +++ b/src/Adyen/Model/Payment/RefundRequest.php @@ -0,0 +1,733 @@ + + */ +class RefundRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RefundRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'modificationAmount' => '\Adyen\Model\Payment\Amount', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'modificationAmount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'splits' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'modificationAmount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'splits' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'modificationAmount' => 'modificationAmount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'splits' => 'splits', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'modificationAmount' => 'setModificationAmount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'splits' => 'setSplits', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'modificationAmount' => 'getModificationAmount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'splits' => 'getSplits', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('modificationAmount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['modificationAmount'] === null) { + $invalidProperties[] = "'modificationAmount' can't be null"; + } + if ($this->container['originalReference'] === null) { + $invalidProperties[] = "'originalReference' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets modificationAmount + * + * @return \Adyen\Model\Payment\Amount + */ + public function getModificationAmount() + { + return $this->container['modificationAmount']; + } + + /** + * Sets modificationAmount + * + * @param \Adyen\Model\Payment\Amount $modificationAmount modificationAmount + * + * @return self + */ + public function setModificationAmount($modificationAmount) + { + if (is_null($modificationAmount)) { + throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); + } + $this->container['modificationAmount'] = $modificationAmount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string|null + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string|null $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets originalReference + * + * @return string + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\Split[]|null $splits An array of objects specifying how the amount 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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payment/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Payment/ResponseAdditionalData3DSecure.php new file mode 100644 index 000000000..ea5c0aeb2 --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalData3DSecure.php @@ -0,0 +1,520 @@ + + */ +class ResponseAdditionalData3DSecure implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalData3DSecure'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cardHolderInfo' => 'string', + 'cavv' => 'string', + 'cavvAlgorithm' => 'string', + 'scaExemptionRequested' => 'string', + 'threeds2CardEnrolled' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cardHolderInfo' => null, + 'cavv' => null, + 'cavvAlgorithm' => null, + 'scaExemptionRequested' => null, + 'threeds2CardEnrolled' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cardHolderInfo' => false, + 'cavv' => false, + 'cavvAlgorithm' => false, + 'scaExemptionRequested' => false, + 'threeds2CardEnrolled' => 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 = [ + 'cardHolderInfo' => 'cardHolderInfo', + 'cavv' => 'cavv', + 'cavvAlgorithm' => 'cavvAlgorithm', + 'scaExemptionRequested' => 'scaExemptionRequested', + 'threeds2CardEnrolled' => 'threeds2.cardEnrolled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cardHolderInfo' => 'setCardHolderInfo', + 'cavv' => 'setCavv', + 'cavvAlgorithm' => 'setCavvAlgorithm', + 'scaExemptionRequested' => 'setScaExemptionRequested', + 'threeds2CardEnrolled' => 'setThreeds2CardEnrolled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cardHolderInfo' => 'getCardHolderInfo', + 'cavv' => 'getCavv', + 'cavvAlgorithm' => 'getCavvAlgorithm', + 'scaExemptionRequested' => 'getScaExemptionRequested', + 'threeds2CardEnrolled' => 'getThreeds2CardEnrolled' + ]; + + /** + * 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('cardHolderInfo', $data ?? [], null); + $this->setIfExists('cavv', $data ?? [], null); + $this->setIfExists('cavvAlgorithm', $data ?? [], null); + $this->setIfExists('scaExemptionRequested', $data ?? [], null); + $this->setIfExists('threeds2CardEnrolled', $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 cardHolderInfo + * + * @return string|null + */ + public function getCardHolderInfo() + { + return $this->container['cardHolderInfo']; + } + + /** + * Sets cardHolderInfo + * + * @param string|null $cardHolderInfo Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. + * + * @return self + */ + public function setCardHolderInfo($cardHolderInfo) + { + if (is_null($cardHolderInfo)) { + throw new \InvalidArgumentException('non-nullable cardHolderInfo cannot be null'); + } + $this->container['cardHolderInfo'] = $cardHolderInfo; + + return $this; + } + + /** + * Gets cavv + * + * @return string|null + */ + public function getCavv() + { + return $this->container['cavv']; + } + + /** + * Sets cavv + * + * @param string|null $cavv The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array. + * + * @return self + */ + public function setCavv($cavv) + { + if (is_null($cavv)) { + throw new \InvalidArgumentException('non-nullable cavv cannot be null'); + } + $this->container['cavv'] = $cavv; + + return $this; + } + + /** + * Gets cavvAlgorithm + * + * @return string|null + */ + public function getCavvAlgorithm() + { + return $this->container['cavvAlgorithm']; + } + + /** + * Sets cavvAlgorithm + * + * @param string|null $cavvAlgorithm The CAVV algorithm used. + * + * @return self + */ + public function setCavvAlgorithm($cavvAlgorithm) + { + if (is_null($cavvAlgorithm)) { + throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); + } + $this->container['cavvAlgorithm'] = $cavvAlgorithm; + + return $this; + } + + /** + * Gets scaExemptionRequested + * + * @return string|null + */ + public function getScaExemptionRequested() + { + return $this->container['scaExemptionRequested']; + } + + /** + * Sets scaExemptionRequested + * + * @param string|null $scaExemptionRequested Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** + * + * @return self + */ + public function setScaExemptionRequested($scaExemptionRequested) + { + if (is_null($scaExemptionRequested)) { + throw new \InvalidArgumentException('non-nullable scaExemptionRequested cannot be null'); + } + $this->container['scaExemptionRequested'] = $scaExemptionRequested; + + return $this; + } + + /** + * Gets threeds2CardEnrolled + * + * @return bool|null + */ + public function getThreeds2CardEnrolled() + { + return $this->container['threeds2CardEnrolled']; + } + + /** + * Sets threeds2CardEnrolled + * + * @param bool|null $threeds2CardEnrolled Indicates whether a card is enrolled for 3D Secure 2. + * + * @return self + */ + public function setThreeds2CardEnrolled($threeds2CardEnrolled) + { + if (is_null($threeds2CardEnrolled)) { + throw new \InvalidArgumentException('non-nullable threeds2CardEnrolled cannot be null'); + } + $this->container['threeds2CardEnrolled'] = $threeds2CardEnrolled; + + 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/Payment/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.php new file mode 100644 index 000000000..59eac851a --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.php @@ -0,0 +1,554 @@ + + */ +class ResponseAdditionalDataBillingAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataBillingAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'billingAddressCity' => 'string', + 'billingAddressCountry' => 'string', + 'billingAddressHouseNumberOrName' => 'string', + 'billingAddressPostalCode' => 'string', + 'billingAddressStateOrProvince' => 'string', + 'billingAddressStreet' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'billingAddressCity' => null, + 'billingAddressCountry' => null, + 'billingAddressHouseNumberOrName' => null, + 'billingAddressPostalCode' => null, + 'billingAddressStateOrProvince' => null, + 'billingAddressStreet' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'billingAddressCity' => false, + 'billingAddressCountry' => false, + 'billingAddressHouseNumberOrName' => false, + 'billingAddressPostalCode' => false, + 'billingAddressStateOrProvince' => false, + 'billingAddressStreet' => 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 = [ + 'billingAddressCity' => 'billingAddress.city', + 'billingAddressCountry' => 'billingAddress.country', + 'billingAddressHouseNumberOrName' => 'billingAddress.houseNumberOrName', + 'billingAddressPostalCode' => 'billingAddress.postalCode', + 'billingAddressStateOrProvince' => 'billingAddress.stateOrProvince', + 'billingAddressStreet' => 'billingAddress.street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'billingAddressCity' => 'setBillingAddressCity', + 'billingAddressCountry' => 'setBillingAddressCountry', + 'billingAddressHouseNumberOrName' => 'setBillingAddressHouseNumberOrName', + 'billingAddressPostalCode' => 'setBillingAddressPostalCode', + 'billingAddressStateOrProvince' => 'setBillingAddressStateOrProvince', + 'billingAddressStreet' => 'setBillingAddressStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'billingAddressCity' => 'getBillingAddressCity', + 'billingAddressCountry' => 'getBillingAddressCountry', + 'billingAddressHouseNumberOrName' => 'getBillingAddressHouseNumberOrName', + 'billingAddressPostalCode' => 'getBillingAddressPostalCode', + 'billingAddressStateOrProvince' => 'getBillingAddressStateOrProvince', + 'billingAddressStreet' => 'getBillingAddressStreet' + ]; + + /** + * 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('billingAddressCity', $data ?? [], null); + $this->setIfExists('billingAddressCountry', $data ?? [], null); + $this->setIfExists('billingAddressHouseNumberOrName', $data ?? [], null); + $this->setIfExists('billingAddressPostalCode', $data ?? [], null); + $this->setIfExists('billingAddressStateOrProvince', $data ?? [], null); + $this->setIfExists('billingAddressStreet', $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 billingAddressCity + * + * @return string|null + */ + public function getBillingAddressCity() + { + return $this->container['billingAddressCity']; + } + + /** + * Sets billingAddressCity + * + * @param string|null $billingAddressCity The billing address city passed in the payment request. + * + * @return self + */ + public function setBillingAddressCity($billingAddressCity) + { + if (is_null($billingAddressCity)) { + throw new \InvalidArgumentException('non-nullable billingAddressCity cannot be null'); + } + $this->container['billingAddressCity'] = $billingAddressCity; + + return $this; + } + + /** + * Gets billingAddressCountry + * + * @return string|null + */ + public function getBillingAddressCountry() + { + return $this->container['billingAddressCountry']; + } + + /** + * Sets billingAddressCountry + * + * @param string|null $billingAddressCountry The billing address country passed in the payment request. Example: NL + * + * @return self + */ + public function setBillingAddressCountry($billingAddressCountry) + { + if (is_null($billingAddressCountry)) { + throw new \InvalidArgumentException('non-nullable billingAddressCountry cannot be null'); + } + $this->container['billingAddressCountry'] = $billingAddressCountry; + + return $this; + } + + /** + * Gets billingAddressHouseNumberOrName + * + * @return string|null + */ + public function getBillingAddressHouseNumberOrName() + { + return $this->container['billingAddressHouseNumberOrName']; + } + + /** + * Sets billingAddressHouseNumberOrName + * + * @param string|null $billingAddressHouseNumberOrName The billing address house number or name passed in the payment request. + * + * @return self + */ + public function setBillingAddressHouseNumberOrName($billingAddressHouseNumberOrName) + { + if (is_null($billingAddressHouseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable billingAddressHouseNumberOrName cannot be null'); + } + $this->container['billingAddressHouseNumberOrName'] = $billingAddressHouseNumberOrName; + + return $this; + } + + /** + * Gets billingAddressPostalCode + * + * @return string|null + */ + public function getBillingAddressPostalCode() + { + return $this->container['billingAddressPostalCode']; + } + + /** + * Sets billingAddressPostalCode + * + * @param string|null $billingAddressPostalCode The billing address postal code passed in the payment request. Example: 1011 DJ + * + * @return self + */ + public function setBillingAddressPostalCode($billingAddressPostalCode) + { + if (is_null($billingAddressPostalCode)) { + throw new \InvalidArgumentException('non-nullable billingAddressPostalCode cannot be null'); + } + $this->container['billingAddressPostalCode'] = $billingAddressPostalCode; + + return $this; + } + + /** + * Gets billingAddressStateOrProvince + * + * @return string|null + */ + public function getBillingAddressStateOrProvince() + { + return $this->container['billingAddressStateOrProvince']; + } + + /** + * Sets billingAddressStateOrProvince + * + * @param string|null $billingAddressStateOrProvince The billing address state or province passed in the payment request. Example: NH + * + * @return self + */ + public function setBillingAddressStateOrProvince($billingAddressStateOrProvince) + { + if (is_null($billingAddressStateOrProvince)) { + throw new \InvalidArgumentException('non-nullable billingAddressStateOrProvince cannot be null'); + } + $this->container['billingAddressStateOrProvince'] = $billingAddressStateOrProvince; + + return $this; + } + + /** + * Gets billingAddressStreet + * + * @return string|null + */ + public function getBillingAddressStreet() + { + return $this->container['billingAddressStreet']; + } + + /** + * Sets billingAddressStreet + * + * @param string|null $billingAddressStreet The billing address street passed in the payment request. + * + * @return self + */ + public function setBillingAddressStreet($billingAddressStreet) + { + if (is_null($billingAddressStreet)) { + throw new \InvalidArgumentException('non-nullable billingAddressStreet cannot be null'); + } + $this->container['billingAddressStreet'] = $billingAddressStreet; + + 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/Payment/ResponseAdditionalDataCard.php b/src/Adyen/Model/Payment/ResponseAdditionalDataCard.php new file mode 100644 index 000000000..ce7985dc7 --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataCard.php @@ -0,0 +1,622 @@ + + */ +class ResponseAdditionalDataCard implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataCard'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cardBin' => 'string', + 'cardHolderName' => 'string', + 'cardIssuingBank' => 'string', + 'cardIssuingCountry' => 'string', + 'cardIssuingCurrency' => 'string', + 'cardPaymentMethod' => 'string', + 'cardSummary' => 'string', + 'issuerBin' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cardBin' => null, + 'cardHolderName' => null, + 'cardIssuingBank' => null, + 'cardIssuingCountry' => null, + 'cardIssuingCurrency' => null, + 'cardPaymentMethod' => null, + 'cardSummary' => null, + 'issuerBin' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cardBin' => false, + 'cardHolderName' => false, + 'cardIssuingBank' => false, + 'cardIssuingCountry' => false, + 'cardIssuingCurrency' => false, + 'cardPaymentMethod' => false, + 'cardSummary' => false, + 'issuerBin' => 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 = [ + 'cardBin' => 'cardBin', + 'cardHolderName' => 'cardHolderName', + 'cardIssuingBank' => 'cardIssuingBank', + 'cardIssuingCountry' => 'cardIssuingCountry', + 'cardIssuingCurrency' => 'cardIssuingCurrency', + 'cardPaymentMethod' => 'cardPaymentMethod', + 'cardSummary' => 'cardSummary', + 'issuerBin' => 'issuerBin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cardBin' => 'setCardBin', + 'cardHolderName' => 'setCardHolderName', + 'cardIssuingBank' => 'setCardIssuingBank', + 'cardIssuingCountry' => 'setCardIssuingCountry', + 'cardIssuingCurrency' => 'setCardIssuingCurrency', + 'cardPaymentMethod' => 'setCardPaymentMethod', + 'cardSummary' => 'setCardSummary', + 'issuerBin' => 'setIssuerBin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cardBin' => 'getCardBin', + 'cardHolderName' => 'getCardHolderName', + 'cardIssuingBank' => 'getCardIssuingBank', + 'cardIssuingCountry' => 'getCardIssuingCountry', + 'cardIssuingCurrency' => 'getCardIssuingCurrency', + 'cardPaymentMethod' => 'getCardPaymentMethod', + 'cardSummary' => 'getCardSummary', + 'issuerBin' => 'getIssuerBin' + ]; + + /** + * 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('cardBin', $data ?? [], null); + $this->setIfExists('cardHolderName', $data ?? [], null); + $this->setIfExists('cardIssuingBank', $data ?? [], null); + $this->setIfExists('cardIssuingCountry', $data ?? [], null); + $this->setIfExists('cardIssuingCurrency', $data ?? [], null); + $this->setIfExists('cardPaymentMethod', $data ?? [], null); + $this->setIfExists('cardSummary', $data ?? [], null); + $this->setIfExists('issuerBin', $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 cardBin + * + * @return string|null + */ + public function getCardBin() + { + return $this->container['cardBin']; + } + + /** + * Sets cardBin + * + * @param string|null $cardBin The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234 + * + * @return self + */ + public function setCardBin($cardBin) + { + if (is_null($cardBin)) { + throw new \InvalidArgumentException('non-nullable cardBin cannot be null'); + } + $this->container['cardBin'] = $cardBin; + + return $this; + } + + /** + * Gets cardHolderName + * + * @return string|null + */ + public function getCardHolderName() + { + return $this->container['cardHolderName']; + } + + /** + * Sets cardHolderName + * + * @param string|null $cardHolderName The cardholder name passed in the payment request. + * + * @return self + */ + public function setCardHolderName($cardHolderName) + { + if (is_null($cardHolderName)) { + throw new \InvalidArgumentException('non-nullable cardHolderName cannot be null'); + } + $this->container['cardHolderName'] = $cardHolderName; + + return $this; + } + + /** + * Gets cardIssuingBank + * + * @return string|null + */ + public function getCardIssuingBank() + { + return $this->container['cardIssuingBank']; + } + + /** + * Sets cardIssuingBank + * + * @param string|null $cardIssuingBank The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. + * + * @return self + */ + public function setCardIssuingBank($cardIssuingBank) + { + if (is_null($cardIssuingBank)) { + throw new \InvalidArgumentException('non-nullable cardIssuingBank cannot be null'); + } + $this->container['cardIssuingBank'] = $cardIssuingBank; + + return $this; + } + + /** + * Gets cardIssuingCountry + * + * @return string|null + */ + public function getCardIssuingCountry() + { + return $this->container['cardIssuingCountry']; + } + + /** + * Sets cardIssuingCountry + * + * @param string|null $cardIssuingCountry The country where the card was issued. Example: US + * + * @return self + */ + public function setCardIssuingCountry($cardIssuingCountry) + { + if (is_null($cardIssuingCountry)) { + throw new \InvalidArgumentException('non-nullable cardIssuingCountry cannot be null'); + } + $this->container['cardIssuingCountry'] = $cardIssuingCountry; + + return $this; + } + + /** + * Gets cardIssuingCurrency + * + * @return string|null + */ + public function getCardIssuingCurrency() + { + return $this->container['cardIssuingCurrency']; + } + + /** + * Sets cardIssuingCurrency + * + * @param string|null $cardIssuingCurrency The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD + * + * @return self + */ + public function setCardIssuingCurrency($cardIssuingCurrency) + { + if (is_null($cardIssuingCurrency)) { + throw new \InvalidArgumentException('non-nullable cardIssuingCurrency cannot be null'); + } + $this->container['cardIssuingCurrency'] = $cardIssuingCurrency; + + return $this; + } + + /** + * Gets cardPaymentMethod + * + * @return string|null + */ + public function getCardPaymentMethod() + { + return $this->container['cardPaymentMethod']; + } + + /** + * Sets cardPaymentMethod + * + * @param string|null $cardPaymentMethod The card payment method used for the transaction. Example: amex + * + * @return self + */ + public function setCardPaymentMethod($cardPaymentMethod) + { + if (is_null($cardPaymentMethod)) { + throw new \InvalidArgumentException('non-nullable cardPaymentMethod cannot be null'); + } + $this->container['cardPaymentMethod'] = $cardPaymentMethod; + + return $this; + } + + /** + * Gets cardSummary + * + * @return string|null + */ + public function getCardSummary() + { + return $this->container['cardSummary']; + } + + /** + * Sets cardSummary + * + * @param string|null $cardSummary The last four digits of a card number. > Returned only in case of a card payment. + * + * @return self + */ + public function setCardSummary($cardSummary) + { + if (is_null($cardSummary)) { + throw new \InvalidArgumentException('non-nullable cardSummary cannot be null'); + } + $this->container['cardSummary'] = $cardSummary; + + return $this; + } + + /** + * Gets issuerBin + * + * @return string|null + */ + public function getIssuerBin() + { + return $this->container['issuerBin']; + } + + /** + * Sets issuerBin + * + * @param string|null $issuerBin The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 + * + * @return self + */ + public function setIssuerBin($issuerBin) + { + if (is_null($issuerBin)) { + throw new \InvalidArgumentException('non-nullable issuerBin cannot be null'); + } + $this->container['issuerBin'] = $issuerBin; + + 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/Payment/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payment/ResponseAdditionalDataCommon.php new file mode 100644 index 000000000..7d71bcd65 --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataCommon.php @@ -0,0 +1,2424 @@ + + */ +class ResponseAdditionalDataCommon implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataCommon'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acquirerAccountCode' => 'string', + 'acquirerCode' => 'string', + 'acquirerReference' => 'string', + 'alias' => 'string', + 'aliasType' => 'string', + 'authCode' => 'string', + 'authorisationMid' => 'string', + 'authorisedAmountCurrency' => 'string', + 'authorisedAmountValue' => 'string', + 'avsResult' => 'string', + 'avsResultRaw' => 'string', + 'bic' => 'string', + 'coBrandedWith' => 'string', + 'cvcResult' => 'string', + 'cvcResultRaw' => 'string', + 'dsTransID' => 'string', + 'eci' => 'string', + 'expiryDate' => 'string', + 'extraCostsCurrency' => 'string', + 'extraCostsValue' => 'string', + 'fraudCheckItemNrFraudCheckname' => 'string', + 'fraudManualReview' => 'string', + 'fraudResultType' => 'string', + 'fundingSource' => 'string', + 'fundsAvailability' => 'string', + 'inferredRefusalReason' => 'string', + 'isCardCommercial' => 'string', + 'issuerCountry' => 'string', + 'liabilityShift' => 'string', + 'mcBankNetReferenceNumber' => 'string', + 'merchantAdviceCode' => 'string', + 'merchantReference' => 'string', + 'networkTxReference' => 'string', + 'ownerName' => 'string', + 'paymentAccountReference' => 'string', + 'paymentMethod' => 'string', + 'paymentMethodVariant' => 'string', + 'payoutEligible' => 'string', + 'realtimeAccountUpdaterStatus' => 'string', + 'receiptFreeText' => 'string', + 'recurringContractTypes' => 'string', + 'recurringFirstPspReference' => 'string', + 'recurringRecurringDetailReference' => 'string', + 'recurringShopperReference' => 'string', + 'recurringProcessingModel' => 'string', + 'referred' => 'string', + 'refusalReasonRaw' => 'string', + 'requestAmount' => 'string', + 'requestCurrencyCode' => 'string', + 'shopperInteraction' => 'string', + 'shopperReference' => 'string', + 'terminalId' => 'string', + 'threeDAuthenticated' => 'string', + 'threeDAuthenticatedResponse' => 'string', + 'threeDOffered' => 'string', + 'threeDOfferedResponse' => 'string', + 'threeDSVersion' => 'string', + 'visaTransactionId' => 'string', + 'xid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acquirerAccountCode' => null, + 'acquirerCode' => null, + 'acquirerReference' => null, + 'alias' => null, + 'aliasType' => null, + 'authCode' => null, + 'authorisationMid' => null, + 'authorisedAmountCurrency' => null, + 'authorisedAmountValue' => null, + 'avsResult' => null, + 'avsResultRaw' => null, + 'bic' => null, + 'coBrandedWith' => null, + 'cvcResult' => null, + 'cvcResultRaw' => null, + 'dsTransID' => null, + 'eci' => null, + 'expiryDate' => null, + 'extraCostsCurrency' => null, + 'extraCostsValue' => null, + 'fraudCheckItemNrFraudCheckname' => null, + 'fraudManualReview' => null, + 'fraudResultType' => null, + 'fundingSource' => null, + 'fundsAvailability' => null, + 'inferredRefusalReason' => null, + 'isCardCommercial' => null, + 'issuerCountry' => null, + 'liabilityShift' => null, + 'mcBankNetReferenceNumber' => null, + 'merchantAdviceCode' => null, + 'merchantReference' => null, + 'networkTxReference' => null, + 'ownerName' => null, + 'paymentAccountReference' => null, + 'paymentMethod' => null, + 'paymentMethodVariant' => null, + 'payoutEligible' => null, + 'realtimeAccountUpdaterStatus' => null, + 'receiptFreeText' => null, + 'recurringContractTypes' => null, + 'recurringFirstPspReference' => null, + 'recurringRecurringDetailReference' => null, + 'recurringShopperReference' => null, + 'recurringProcessingModel' => null, + 'referred' => null, + 'refusalReasonRaw' => null, + 'requestAmount' => null, + 'requestCurrencyCode' => null, + 'shopperInteraction' => null, + 'shopperReference' => null, + 'terminalId' => null, + 'threeDAuthenticated' => null, + 'threeDAuthenticatedResponse' => null, + 'threeDOffered' => null, + 'threeDOfferedResponse' => null, + 'threeDSVersion' => null, + 'visaTransactionId' => null, + 'xid' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acquirerAccountCode' => false, + 'acquirerCode' => false, + 'acquirerReference' => false, + 'alias' => false, + 'aliasType' => false, + 'authCode' => false, + 'authorisationMid' => false, + 'authorisedAmountCurrency' => false, + 'authorisedAmountValue' => false, + 'avsResult' => false, + 'avsResultRaw' => false, + 'bic' => false, + 'coBrandedWith' => false, + 'cvcResult' => false, + 'cvcResultRaw' => false, + 'dsTransID' => false, + 'eci' => false, + 'expiryDate' => false, + 'extraCostsCurrency' => false, + 'extraCostsValue' => false, + 'fraudCheckItemNrFraudCheckname' => false, + 'fraudManualReview' => false, + 'fraudResultType' => false, + 'fundingSource' => false, + 'fundsAvailability' => false, + 'inferredRefusalReason' => false, + 'isCardCommercial' => false, + 'issuerCountry' => false, + 'liabilityShift' => false, + 'mcBankNetReferenceNumber' => false, + 'merchantAdviceCode' => false, + 'merchantReference' => false, + 'networkTxReference' => false, + 'ownerName' => false, + 'paymentAccountReference' => false, + 'paymentMethod' => false, + 'paymentMethodVariant' => false, + 'payoutEligible' => false, + 'realtimeAccountUpdaterStatus' => false, + 'receiptFreeText' => false, + 'recurringContractTypes' => false, + 'recurringFirstPspReference' => false, + 'recurringRecurringDetailReference' => false, + 'recurringShopperReference' => false, + 'recurringProcessingModel' => false, + 'referred' => false, + 'refusalReasonRaw' => false, + 'requestAmount' => false, + 'requestCurrencyCode' => false, + 'shopperInteraction' => false, + 'shopperReference' => false, + 'terminalId' => false, + 'threeDAuthenticated' => false, + 'threeDAuthenticatedResponse' => false, + 'threeDOffered' => false, + 'threeDOfferedResponse' => false, + 'threeDSVersion' => false, + 'visaTransactionId' => false, + 'xid' => 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 = [ + 'acquirerAccountCode' => 'acquirerAccountCode', + 'acquirerCode' => 'acquirerCode', + 'acquirerReference' => 'acquirerReference', + 'alias' => 'alias', + 'aliasType' => 'aliasType', + 'authCode' => 'authCode', + 'authorisationMid' => 'authorisationMid', + 'authorisedAmountCurrency' => 'authorisedAmountCurrency', + 'authorisedAmountValue' => 'authorisedAmountValue', + 'avsResult' => 'avsResult', + 'avsResultRaw' => 'avsResultRaw', + 'bic' => 'bic', + 'coBrandedWith' => 'coBrandedWith', + 'cvcResult' => 'cvcResult', + 'cvcResultRaw' => 'cvcResultRaw', + 'dsTransID' => 'dsTransID', + 'eci' => 'eci', + 'expiryDate' => 'expiryDate', + 'extraCostsCurrency' => 'extraCostsCurrency', + 'extraCostsValue' => 'extraCostsValue', + 'fraudCheckItemNrFraudCheckname' => 'fraudCheck-[itemNr]-[FraudCheckname]', + 'fraudManualReview' => 'fraudManualReview', + 'fraudResultType' => 'fraudResultType', + 'fundingSource' => 'fundingSource', + 'fundsAvailability' => 'fundsAvailability', + 'inferredRefusalReason' => 'inferredRefusalReason', + 'isCardCommercial' => 'isCardCommercial', + 'issuerCountry' => 'issuerCountry', + 'liabilityShift' => 'liabilityShift', + 'mcBankNetReferenceNumber' => 'mcBankNetReferenceNumber', + 'merchantAdviceCode' => 'merchantAdviceCode', + 'merchantReference' => 'merchantReference', + 'networkTxReference' => 'networkTxReference', + 'ownerName' => 'ownerName', + 'paymentAccountReference' => 'paymentAccountReference', + 'paymentMethod' => 'paymentMethod', + 'paymentMethodVariant' => 'paymentMethodVariant', + 'payoutEligible' => 'payoutEligible', + 'realtimeAccountUpdaterStatus' => 'realtimeAccountUpdaterStatus', + 'receiptFreeText' => 'receiptFreeText', + 'recurringContractTypes' => 'recurring.contractTypes', + 'recurringFirstPspReference' => 'recurring.firstPspReference', + 'recurringRecurringDetailReference' => 'recurring.recurringDetailReference', + 'recurringShopperReference' => 'recurring.shopperReference', + 'recurringProcessingModel' => 'recurringProcessingModel', + 'referred' => 'referred', + 'refusalReasonRaw' => 'refusalReasonRaw', + 'requestAmount' => 'requestAmount', + 'requestCurrencyCode' => 'requestCurrencyCode', + 'shopperInteraction' => 'shopperInteraction', + 'shopperReference' => 'shopperReference', + 'terminalId' => 'terminalId', + 'threeDAuthenticated' => 'threeDAuthenticated', + 'threeDAuthenticatedResponse' => 'threeDAuthenticatedResponse', + 'threeDOffered' => 'threeDOffered', + 'threeDOfferedResponse' => 'threeDOfferedResponse', + 'threeDSVersion' => 'threeDSVersion', + 'visaTransactionId' => 'visaTransactionId', + 'xid' => 'xid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acquirerAccountCode' => 'setAcquirerAccountCode', + 'acquirerCode' => 'setAcquirerCode', + 'acquirerReference' => 'setAcquirerReference', + 'alias' => 'setAlias', + 'aliasType' => 'setAliasType', + 'authCode' => 'setAuthCode', + 'authorisationMid' => 'setAuthorisationMid', + 'authorisedAmountCurrency' => 'setAuthorisedAmountCurrency', + 'authorisedAmountValue' => 'setAuthorisedAmountValue', + 'avsResult' => 'setAvsResult', + 'avsResultRaw' => 'setAvsResultRaw', + 'bic' => 'setBic', + 'coBrandedWith' => 'setCoBrandedWith', + 'cvcResult' => 'setCvcResult', + 'cvcResultRaw' => 'setCvcResultRaw', + 'dsTransID' => 'setDsTransID', + 'eci' => 'setEci', + 'expiryDate' => 'setExpiryDate', + 'extraCostsCurrency' => 'setExtraCostsCurrency', + 'extraCostsValue' => 'setExtraCostsValue', + 'fraudCheckItemNrFraudCheckname' => 'setFraudCheckItemNrFraudCheckname', + 'fraudManualReview' => 'setFraudManualReview', + 'fraudResultType' => 'setFraudResultType', + 'fundingSource' => 'setFundingSource', + 'fundsAvailability' => 'setFundsAvailability', + 'inferredRefusalReason' => 'setInferredRefusalReason', + 'isCardCommercial' => 'setIsCardCommercial', + 'issuerCountry' => 'setIssuerCountry', + 'liabilityShift' => 'setLiabilityShift', + 'mcBankNetReferenceNumber' => 'setMcBankNetReferenceNumber', + 'merchantAdviceCode' => 'setMerchantAdviceCode', + 'merchantReference' => 'setMerchantReference', + 'networkTxReference' => 'setNetworkTxReference', + 'ownerName' => 'setOwnerName', + 'paymentAccountReference' => 'setPaymentAccountReference', + 'paymentMethod' => 'setPaymentMethod', + 'paymentMethodVariant' => 'setPaymentMethodVariant', + 'payoutEligible' => 'setPayoutEligible', + 'realtimeAccountUpdaterStatus' => 'setRealtimeAccountUpdaterStatus', + 'receiptFreeText' => 'setReceiptFreeText', + 'recurringContractTypes' => 'setRecurringContractTypes', + 'recurringFirstPspReference' => 'setRecurringFirstPspReference', + 'recurringRecurringDetailReference' => 'setRecurringRecurringDetailReference', + 'recurringShopperReference' => 'setRecurringShopperReference', + 'recurringProcessingModel' => 'setRecurringProcessingModel', + 'referred' => 'setReferred', + 'refusalReasonRaw' => 'setRefusalReasonRaw', + 'requestAmount' => 'setRequestAmount', + 'requestCurrencyCode' => 'setRequestCurrencyCode', + 'shopperInteraction' => 'setShopperInteraction', + 'shopperReference' => 'setShopperReference', + 'terminalId' => 'setTerminalId', + 'threeDAuthenticated' => 'setThreeDAuthenticated', + 'threeDAuthenticatedResponse' => 'setThreeDAuthenticatedResponse', + 'threeDOffered' => 'setThreeDOffered', + 'threeDOfferedResponse' => 'setThreeDOfferedResponse', + 'threeDSVersion' => 'setThreeDSVersion', + 'visaTransactionId' => 'setVisaTransactionId', + 'xid' => 'setXid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acquirerAccountCode' => 'getAcquirerAccountCode', + 'acquirerCode' => 'getAcquirerCode', + 'acquirerReference' => 'getAcquirerReference', + 'alias' => 'getAlias', + 'aliasType' => 'getAliasType', + 'authCode' => 'getAuthCode', + 'authorisationMid' => 'getAuthorisationMid', + 'authorisedAmountCurrency' => 'getAuthorisedAmountCurrency', + 'authorisedAmountValue' => 'getAuthorisedAmountValue', + 'avsResult' => 'getAvsResult', + 'avsResultRaw' => 'getAvsResultRaw', + 'bic' => 'getBic', + 'coBrandedWith' => 'getCoBrandedWith', + 'cvcResult' => 'getCvcResult', + 'cvcResultRaw' => 'getCvcResultRaw', + 'dsTransID' => 'getDsTransID', + 'eci' => 'getEci', + 'expiryDate' => 'getExpiryDate', + 'extraCostsCurrency' => 'getExtraCostsCurrency', + 'extraCostsValue' => 'getExtraCostsValue', + 'fraudCheckItemNrFraudCheckname' => 'getFraudCheckItemNrFraudCheckname', + 'fraudManualReview' => 'getFraudManualReview', + 'fraudResultType' => 'getFraudResultType', + 'fundingSource' => 'getFundingSource', + 'fundsAvailability' => 'getFundsAvailability', + 'inferredRefusalReason' => 'getInferredRefusalReason', + 'isCardCommercial' => 'getIsCardCommercial', + 'issuerCountry' => 'getIssuerCountry', + 'liabilityShift' => 'getLiabilityShift', + 'mcBankNetReferenceNumber' => 'getMcBankNetReferenceNumber', + 'merchantAdviceCode' => 'getMerchantAdviceCode', + 'merchantReference' => 'getMerchantReference', + 'networkTxReference' => 'getNetworkTxReference', + 'ownerName' => 'getOwnerName', + 'paymentAccountReference' => 'getPaymentAccountReference', + 'paymentMethod' => 'getPaymentMethod', + 'paymentMethodVariant' => 'getPaymentMethodVariant', + 'payoutEligible' => 'getPayoutEligible', + 'realtimeAccountUpdaterStatus' => 'getRealtimeAccountUpdaterStatus', + 'receiptFreeText' => 'getReceiptFreeText', + 'recurringContractTypes' => 'getRecurringContractTypes', + 'recurringFirstPspReference' => 'getRecurringFirstPspReference', + 'recurringRecurringDetailReference' => 'getRecurringRecurringDetailReference', + 'recurringShopperReference' => 'getRecurringShopperReference', + 'recurringProcessingModel' => 'getRecurringProcessingModel', + 'referred' => 'getReferred', + 'refusalReasonRaw' => 'getRefusalReasonRaw', + 'requestAmount' => 'getRequestAmount', + 'requestCurrencyCode' => 'getRequestCurrencyCode', + 'shopperInteraction' => 'getShopperInteraction', + 'shopperReference' => 'getShopperReference', + 'terminalId' => 'getTerminalId', + 'threeDAuthenticated' => 'getThreeDAuthenticated', + 'threeDAuthenticatedResponse' => 'getThreeDAuthenticatedResponse', + 'threeDOffered' => 'getThreeDOffered', + 'threeDOfferedResponse' => 'getThreeDOfferedResponse', + 'threeDSVersion' => 'getThreeDSVersion', + 'visaTransactionId' => 'getVisaTransactionId', + 'xid' => 'getXid' + ]; + + /** + * 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 FRAUD_RESULT_TYPE_GREEN = 'GREEN'; + public const FRAUD_RESULT_TYPE_FRAUD = 'FRAUD'; + public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; + public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; + public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFraudResultTypeAllowableValues() + { + return [ + self::FRAUD_RESULT_TYPE_GREEN, + self::FRAUD_RESULT_TYPE_FRAUD, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringProcessingModelAllowableValues() + { + return [ + self::RECURRING_PROCESSING_MODEL_CARD_ON_FILE, + self::RECURRING_PROCESSING_MODEL_SUBSCRIPTION, + self::RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE, + ]; + } + /** + * 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('acquirerAccountCode', $data ?? [], null); + $this->setIfExists('acquirerCode', $data ?? [], null); + $this->setIfExists('acquirerReference', $data ?? [], null); + $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('aliasType', $data ?? [], null); + $this->setIfExists('authCode', $data ?? [], null); + $this->setIfExists('authorisationMid', $data ?? [], null); + $this->setIfExists('authorisedAmountCurrency', $data ?? [], null); + $this->setIfExists('authorisedAmountValue', $data ?? [], null); + $this->setIfExists('avsResult', $data ?? [], null); + $this->setIfExists('avsResultRaw', $data ?? [], null); + $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('coBrandedWith', $data ?? [], null); + $this->setIfExists('cvcResult', $data ?? [], null); + $this->setIfExists('cvcResultRaw', $data ?? [], null); + $this->setIfExists('dsTransID', $data ?? [], null); + $this->setIfExists('eci', $data ?? [], null); + $this->setIfExists('expiryDate', $data ?? [], null); + $this->setIfExists('extraCostsCurrency', $data ?? [], null); + $this->setIfExists('extraCostsValue', $data ?? [], null); + $this->setIfExists('fraudCheckItemNrFraudCheckname', $data ?? [], null); + $this->setIfExists('fraudManualReview', $data ?? [], null); + $this->setIfExists('fraudResultType', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('fundsAvailability', $data ?? [], null); + $this->setIfExists('inferredRefusalReason', $data ?? [], null); + $this->setIfExists('isCardCommercial', $data ?? [], null); + $this->setIfExists('issuerCountry', $data ?? [], null); + $this->setIfExists('liabilityShift', $data ?? [], null); + $this->setIfExists('mcBankNetReferenceNumber', $data ?? [], null); + $this->setIfExists('merchantAdviceCode', $data ?? [], null); + $this->setIfExists('merchantReference', $data ?? [], null); + $this->setIfExists('networkTxReference', $data ?? [], null); + $this->setIfExists('ownerName', $data ?? [], null); + $this->setIfExists('paymentAccountReference', $data ?? [], null); + $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('paymentMethodVariant', $data ?? [], null); + $this->setIfExists('payoutEligible', $data ?? [], null); + $this->setIfExists('realtimeAccountUpdaterStatus', $data ?? [], null); + $this->setIfExists('receiptFreeText', $data ?? [], null); + $this->setIfExists('recurringContractTypes', $data ?? [], null); + $this->setIfExists('recurringFirstPspReference', $data ?? [], null); + $this->setIfExists('recurringRecurringDetailReference', $data ?? [], null); + $this->setIfExists('recurringShopperReference', $data ?? [], null); + $this->setIfExists('recurringProcessingModel', $data ?? [], null); + $this->setIfExists('referred', $data ?? [], null); + $this->setIfExists('refusalReasonRaw', $data ?? [], null); + $this->setIfExists('requestAmount', $data ?? [], null); + $this->setIfExists('requestCurrencyCode', $data ?? [], null); + $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('shopperReference', $data ?? [], null); + $this->setIfExists('terminalId', $data ?? [], null); + $this->setIfExists('threeDAuthenticated', $data ?? [], null); + $this->setIfExists('threeDAuthenticatedResponse', $data ?? [], null); + $this->setIfExists('threeDOffered', $data ?? [], null); + $this->setIfExists('threeDOfferedResponse', $data ?? [], null); + $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('visaTransactionId', $data ?? [], null); + $this->setIfExists('xid', $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->getFraudResultTypeAllowableValues(); + if (!is_null($this->container['fraudResultType']) && !in_array($this->container['fraudResultType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fraudResultType', must be one of '%s'", + $this->container['fraudResultType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $this->container['recurringProcessingModel'], + 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 acquirerAccountCode + * + * @return string|null + */ + public function getAcquirerAccountCode() + { + return $this->container['acquirerAccountCode']; + } + + /** + * Sets acquirerAccountCode + * + * @param string|null $acquirerAccountCode The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. + * + * @return self + */ + public function setAcquirerAccountCode($acquirerAccountCode) + { + if (is_null($acquirerAccountCode)) { + throw new \InvalidArgumentException('non-nullable acquirerAccountCode cannot be null'); + } + $this->container['acquirerAccountCode'] = $acquirerAccountCode; + + return $this; + } + + /** + * Gets acquirerCode + * + * @return string|null + */ + public function getAcquirerCode() + { + return $this->container['acquirerCode']; + } + + /** + * Sets acquirerCode + * + * @param string|null $acquirerCode The name of the acquirer processing the payment request. Example: TestPmmAcquirer + * + * @return self + */ + public function setAcquirerCode($acquirerCode) + { + if (is_null($acquirerCode)) { + throw new \InvalidArgumentException('non-nullable acquirerCode cannot be null'); + } + $this->container['acquirerCode'] = $acquirerCode; + + return $this; + } + + /** + * Gets acquirerReference + * + * @return string|null + */ + public function getAcquirerReference() + { + return $this->container['acquirerReference']; + } + + /** + * Sets acquirerReference + * + * @param string|null $acquirerReference The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 + * + * @return self + */ + public function setAcquirerReference($acquirerReference) + { + if (is_null($acquirerReference)) { + throw new \InvalidArgumentException('non-nullable acquirerReference cannot be null'); + } + $this->container['acquirerReference'] = $acquirerReference; + + return $this; + } + + /** + * Gets alias + * + * @return string|null + */ + public function getAlias() + { + return $this->container['alias']; + } + + /** + * Sets alias + * + * @param string|null $alias The Adyen alias of the card. Example: H167852639363479 + * + * @return self + */ + public function setAlias($alias) + { + if (is_null($alias)) { + throw new \InvalidArgumentException('non-nullable alias cannot be null'); + } + $this->container['alias'] = $alias; + + return $this; + } + + /** + * Gets aliasType + * + * @return string|null + */ + public function getAliasType() + { + return $this->container['aliasType']; + } + + /** + * Sets aliasType + * + * @param string|null $aliasType The type of the card alias. Example: Default + * + * @return self + */ + public function setAliasType($aliasType) + { + if (is_null($aliasType)) { + throw new \InvalidArgumentException('non-nullable aliasType cannot be null'); + } + $this->container['aliasType'] = $aliasType; + + return $this; + } + + /** + * Gets authCode + * + * @return string|null + */ + public function getAuthCode() + { + return $this->container['authCode']; + } + + /** + * Sets authCode + * + * @param string|null $authCode Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 + * + * @return self + */ + public function setAuthCode($authCode) + { + if (is_null($authCode)) { + throw new \InvalidArgumentException('non-nullable authCode cannot be null'); + } + $this->container['authCode'] = $authCode; + + return $this; + } + + /** + * Gets authorisationMid + * + * @return string|null + */ + public function getAuthorisationMid() + { + return $this->container['authorisationMid']; + } + + /** + * Sets authorisationMid + * + * @param string|null $authorisationMid Merchant ID known by the acquirer. + * + * @return self + */ + public function setAuthorisationMid($authorisationMid) + { + if (is_null($authorisationMid)) { + throw new \InvalidArgumentException('non-nullable authorisationMid cannot be null'); + } + $this->container['authorisationMid'] = $authorisationMid; + + return $this; + } + + /** + * Gets authorisedAmountCurrency + * + * @return string|null + */ + public function getAuthorisedAmountCurrency() + { + return $this->container['authorisedAmountCurrency']; + } + + /** + * Sets authorisedAmountCurrency + * + * @param string|null $authorisedAmountCurrency The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setAuthorisedAmountCurrency($authorisedAmountCurrency) + { + if (is_null($authorisedAmountCurrency)) { + throw new \InvalidArgumentException('non-nullable authorisedAmountCurrency cannot be null'); + } + $this->container['authorisedAmountCurrency'] = $authorisedAmountCurrency; + + return $this; + } + + /** + * Gets authorisedAmountValue + * + * @return string|null + */ + public function getAuthorisedAmountValue() + { + return $this->container['authorisedAmountValue']; + } + + /** + * Sets authorisedAmountValue + * + * @param string|null $authorisedAmountValue Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setAuthorisedAmountValue($authorisedAmountValue) + { + if (is_null($authorisedAmountValue)) { + throw new \InvalidArgumentException('non-nullable authorisedAmountValue cannot be null'); + } + $this->container['authorisedAmountValue'] = $authorisedAmountValue; + + return $this; + } + + /** + * Gets avsResult + * + * @return string|null + */ + public function getAvsResult() + { + return $this->container['avsResult']; + } + + /** + * Sets avsResult + * + * @param string|null $avsResult The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). + * + * @return self + */ + public function setAvsResult($avsResult) + { + if (is_null($avsResult)) { + throw new \InvalidArgumentException('non-nullable avsResult cannot be null'); + } + $this->container['avsResult'] = $avsResult; + + return $this; + } + + /** + * Gets avsResultRaw + * + * @return string|null + */ + public function getAvsResultRaw() + { + return $this->container['avsResultRaw']; + } + + /** + * Sets avsResultRaw + * + * @param string|null $avsResultRaw Raw AVS result received from the acquirer, where available. Example: D + * + * @return self + */ + public function setAvsResultRaw($avsResultRaw) + { + if (is_null($avsResultRaw)) { + throw new \InvalidArgumentException('non-nullable avsResultRaw cannot be null'); + } + $this->container['avsResultRaw'] = $avsResultRaw; + + return $this; + } + + /** + * Gets bic + * + * @return string|null + */ + public function getBic() + { + return $this->container['bic']; + } + + /** + * Sets bic + * + * @param string|null $bic BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. + * + * @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 coBrandedWith + * + * @return string|null + */ + public function getCoBrandedWith() + { + return $this->container['coBrandedWith']; + } + + /** + * Sets coBrandedWith + * + * @param string|null $coBrandedWith Includes the co-branded card information. + * + * @return self + */ + public function setCoBrandedWith($coBrandedWith) + { + if (is_null($coBrandedWith)) { + throw new \InvalidArgumentException('non-nullable coBrandedWith cannot be null'); + } + $this->container['coBrandedWith'] = $coBrandedWith; + + return $this; + } + + /** + * Gets cvcResult + * + * @return string|null + */ + public function getCvcResult() + { + return $this->container['cvcResult']; + } + + /** + * Sets cvcResult + * + * @param string|null $cvcResult The result of CVC verification. + * + * @return self + */ + public function setCvcResult($cvcResult) + { + if (is_null($cvcResult)) { + throw new \InvalidArgumentException('non-nullable cvcResult cannot be null'); + } + $this->container['cvcResult'] = $cvcResult; + + return $this; + } + + /** + * Gets cvcResultRaw + * + * @return string|null + */ + public function getCvcResultRaw() + { + return $this->container['cvcResultRaw']; + } + + /** + * Sets cvcResultRaw + * + * @param string|null $cvcResultRaw The raw result of CVC verification. + * + * @return self + */ + public function setCvcResultRaw($cvcResultRaw) + { + if (is_null($cvcResultRaw)) { + throw new \InvalidArgumentException('non-nullable cvcResultRaw cannot be null'); + } + $this->container['cvcResultRaw'] = $cvcResultRaw; + + return $this; + } + + /** + * Gets dsTransID + * + * @return string|null + */ + public function getDsTransID() + { + return $this->container['dsTransID']; + } + + /** + * Sets dsTransID + * + * @param string|null $dsTransID Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. + * + * @return self + */ + public function setDsTransID($dsTransID) + { + if (is_null($dsTransID)) { + throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); + } + $this->container['dsTransID'] = $dsTransID; + + return $this; + } + + /** + * Gets eci + * + * @return string|null + */ + public function getEci() + { + return $this->container['eci']; + } + + /** + * Sets eci + * + * @param string|null $eci The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 + * + * @return self + */ + public function setEci($eci) + { + if (is_null($eci)) { + throw new \InvalidArgumentException('non-nullable eci cannot be null'); + } + $this->container['eci'] = $eci; + + return $this; + } + + /** + * Gets expiryDate + * + * @return string|null + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param string|null $expiryDate The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. + * + * @return self + */ + public function setExpiryDate($expiryDate) + { + if (is_null($expiryDate)) { + throw new \InvalidArgumentException('non-nullable expiryDate cannot be null'); + } + $this->container['expiryDate'] = $expiryDate; + + return $this; + } + + /** + * Gets extraCostsCurrency + * + * @return string|null + */ + public function getExtraCostsCurrency() + { + return $this->container['extraCostsCurrency']; + } + + /** + * Sets extraCostsCurrency + * + * @param string|null $extraCostsCurrency The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR + * + * @return self + */ + public function setExtraCostsCurrency($extraCostsCurrency) + { + if (is_null($extraCostsCurrency)) { + throw new \InvalidArgumentException('non-nullable extraCostsCurrency cannot be null'); + } + $this->container['extraCostsCurrency'] = $extraCostsCurrency; + + return $this; + } + + /** + * Gets extraCostsValue + * + * @return string|null + */ + public function getExtraCostsValue() + { + return $this->container['extraCostsValue']; + } + + /** + * Sets extraCostsValue + * + * @param string|null $extraCostsValue The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. + * + * @return self + */ + public function setExtraCostsValue($extraCostsValue) + { + if (is_null($extraCostsValue)) { + throw new \InvalidArgumentException('non-nullable extraCostsValue cannot be null'); + } + $this->container['extraCostsValue'] = $extraCostsValue; + + return $this; + } + + /** + * Gets fraudCheckItemNrFraudCheckname + * + * @return string|null + */ + public function getFraudCheckItemNrFraudCheckname() + { + return $this->container['fraudCheckItemNrFraudCheckname']; + } + + /** + * Sets fraudCheckItemNrFraudCheckname + * + * @param string|null $fraudCheckItemNrFraudCheckname The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. + * + * @return self + */ + public function setFraudCheckItemNrFraudCheckname($fraudCheckItemNrFraudCheckname) + { + if (is_null($fraudCheckItemNrFraudCheckname)) { + throw new \InvalidArgumentException('non-nullable fraudCheckItemNrFraudCheckname cannot be null'); + } + $this->container['fraudCheckItemNrFraudCheckname'] = $fraudCheckItemNrFraudCheckname; + + return $this; + } + + /** + * Gets fraudManualReview + * + * @return string|null + */ + public function getFraudManualReview() + { + return $this->container['fraudManualReview']; + } + + /** + * Sets fraudManualReview + * + * @param string|null $fraudManualReview Indicates if the payment is sent to manual review. + * + * @return self + */ + public function setFraudManualReview($fraudManualReview) + { + if (is_null($fraudManualReview)) { + throw new \InvalidArgumentException('non-nullable fraudManualReview cannot be null'); + } + $this->container['fraudManualReview'] = $fraudManualReview; + + return $this; + } + + /** + * Gets fraudResultType + * + * @return string|null + */ + public function getFraudResultType() + { + return $this->container['fraudResultType']; + } + + /** + * Sets fraudResultType + * + * @param string|null $fraudResultType The fraud result properties of the payment. + * + * @return self + */ + public function setFraudResultType($fraudResultType) + { + if (is_null($fraudResultType)) { + throw new \InvalidArgumentException('non-nullable fraudResultType cannot be null'); + } + $allowedValues = $this->getFraudResultTypeAllowableValues(); + if (!in_array($fraudResultType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fraudResultType', must be one of '%s'", + $fraudResultType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fraudResultType'] = $fraudResultType; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. + * + * @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 fundsAvailability + * + * @return string|null + */ + public function getFundsAvailability() + { + return $this->container['fundsAvailability']; + } + + /** + * Sets fundsAvailability + * + * @param string|null $fundsAvailability Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". + * + * @return self + */ + public function setFundsAvailability($fundsAvailability) + { + if (is_null($fundsAvailability)) { + throw new \InvalidArgumentException('non-nullable fundsAvailability cannot be null'); + } + $this->container['fundsAvailability'] = $fundsAvailability; + + return $this; + } + + /** + * Gets inferredRefusalReason + * + * @return string|null + */ + public function getInferredRefusalReason() + { + return $this->container['inferredRefusalReason']; + } + + /** + * Sets inferredRefusalReason + * + * @param string|null $inferredRefusalReason Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card + * + * @return self + */ + public function setInferredRefusalReason($inferredRefusalReason) + { + if (is_null($inferredRefusalReason)) { + throw new \InvalidArgumentException('non-nullable inferredRefusalReason cannot be null'); + } + $this->container['inferredRefusalReason'] = $inferredRefusalReason; + + return $this; + } + + /** + * Gets isCardCommercial + * + * @return string|null + */ + public function getIsCardCommercial() + { + return $this->container['isCardCommercial']; + } + + /** + * Sets isCardCommercial + * + * @param string|null $isCardCommercial Indicates if the card is used for business purposes only. + * + * @return self + */ + public function setIsCardCommercial($isCardCommercial) + { + if (is_null($isCardCommercial)) { + throw new \InvalidArgumentException('non-nullable isCardCommercial cannot be null'); + } + $this->container['isCardCommercial'] = $isCardCommercial; + + return $this; + } + + /** + * Gets issuerCountry + * + * @return string|null + */ + public function getIssuerCountry() + { + return $this->container['issuerCountry']; + } + + /** + * Sets issuerCountry + * + * @param string|null $issuerCountry The issuing country of the card based on the BIN list that Adyen maintains. Example: JP + * + * @return self + */ + public function setIssuerCountry($issuerCountry) + { + if (is_null($issuerCountry)) { + throw new \InvalidArgumentException('non-nullable issuerCountry cannot be null'); + } + $this->container['issuerCountry'] = $issuerCountry; + + return $this; + } + + /** + * Gets liabilityShift + * + * @return string|null + */ + public function getLiabilityShift() + { + return $this->container['liabilityShift']; + } + + /** + * Sets liabilityShift + * + * @param string|null $liabilityShift A Boolean value indicating whether a liability shift was offered for this payment. + * + * @return self + */ + public function setLiabilityShift($liabilityShift) + { + if (is_null($liabilityShift)) { + throw new \InvalidArgumentException('non-nullable liabilityShift cannot be null'); + } + $this->container['liabilityShift'] = $liabilityShift; + + return $this; + } + + /** + * Gets mcBankNetReferenceNumber + * + * @return string|null + */ + public function getMcBankNetReferenceNumber() + { + return $this->container['mcBankNetReferenceNumber']; + } + + /** + * Sets mcBankNetReferenceNumber + * + * @param string|null $mcBankNetReferenceNumber The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. + * + * @return self + */ + public function setMcBankNetReferenceNumber($mcBankNetReferenceNumber) + { + if (is_null($mcBankNetReferenceNumber)) { + throw new \InvalidArgumentException('non-nullable mcBankNetReferenceNumber cannot be null'); + } + $this->container['mcBankNetReferenceNumber'] = $mcBankNetReferenceNumber; + + return $this; + } + + /** + * Gets merchantAdviceCode + * + * @return string|null + */ + public function getMerchantAdviceCode() + { + return $this->container['merchantAdviceCode']; + } + + /** + * Sets merchantAdviceCode + * + * @param string|null $merchantAdviceCode The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes). + * + * @return self + */ + public function setMerchantAdviceCode($merchantAdviceCode) + { + if (is_null($merchantAdviceCode)) { + throw new \InvalidArgumentException('non-nullable merchantAdviceCode cannot be null'); + } + $this->container['merchantAdviceCode'] = $merchantAdviceCode; + + return $this; + } + + /** + * Gets merchantReference + * + * @return string|null + */ + public function getMerchantReference() + { + return $this->container['merchantReference']; + } + + /** + * Sets merchantReference + * + * @param string|null $merchantReference The reference provided for the transaction. + * + * @return self + */ + public function setMerchantReference($merchantReference) + { + if (is_null($merchantReference)) { + throw new \InvalidArgumentException('non-nullable merchantReference cannot be null'); + } + $this->container['merchantReference'] = $merchantReference; + + return $this; + } + + /** + * Gets networkTxReference + * + * @return string|null + */ + public function getNetworkTxReference() + { + return $this->container['networkTxReference']; + } + + /** + * Sets networkTxReference + * + * @param string|null $networkTxReference Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. + * + * @return self + */ + public function setNetworkTxReference($networkTxReference) + { + if (is_null($networkTxReference)) { + throw new \InvalidArgumentException('non-nullable networkTxReference cannot be null'); + } + $this->container['networkTxReference'] = $networkTxReference; + + return $this; + } + + /** + * Gets ownerName + * + * @return string|null + */ + public function getOwnerName() + { + return $this->container['ownerName']; + } + + /** + * Sets ownerName + * + * @param string|null $ownerName The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. + * + * @return self + */ + public function setOwnerName($ownerName) + { + if (is_null($ownerName)) { + throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); + } + $this->container['ownerName'] = $ownerName; + + return $this; + } + + /** + * Gets paymentAccountReference + * + * @return string|null + */ + public function getPaymentAccountReference() + { + return $this->container['paymentAccountReference']; + } + + /** + * Sets paymentAccountReference + * + * @param string|null $paymentAccountReference The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. + * + * @return self + */ + public function setPaymentAccountReference($paymentAccountReference) + { + if (is_null($paymentAccountReference)) { + throw new \InvalidArgumentException('non-nullable paymentAccountReference cannot be null'); + } + $this->container['paymentAccountReference'] = $paymentAccountReference; + + return $this; + } + + /** + * Gets paymentMethod + * + * @return string|null + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param string|null $paymentMethod The payment method used in the transaction. + * + * @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 paymentMethodVariant + * + * @return string|null + */ + public function getPaymentMethodVariant() + { + return $this->container['paymentMethodVariant']; + } + + /** + * Sets paymentMethodVariant + * + * @param string|null $paymentMethodVariant The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro + * + * @return self + */ + public function setPaymentMethodVariant($paymentMethodVariant) + { + if (is_null($paymentMethodVariant)) { + throw new \InvalidArgumentException('non-nullable paymentMethodVariant cannot be null'); + } + $this->container['paymentMethodVariant'] = $paymentMethodVariant; + + return $this; + } + + /** + * Gets payoutEligible + * + * @return string|null + */ + public function getPayoutEligible() + { + return $this->container['payoutEligible']; + } + + /** + * Sets payoutEligible + * + * @param string|null $payoutEligible Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) + * + * @return self + */ + public function setPayoutEligible($payoutEligible) + { + if (is_null($payoutEligible)) { + throw new \InvalidArgumentException('non-nullable payoutEligible cannot be null'); + } + $this->container['payoutEligible'] = $payoutEligible; + + return $this; + } + + /** + * Gets realtimeAccountUpdaterStatus + * + * @return string|null + */ + public function getRealtimeAccountUpdaterStatus() + { + return $this->container['realtimeAccountUpdaterStatus']; + } + + /** + * Sets realtimeAccountUpdaterStatus + * + * @param string|null $realtimeAccountUpdaterStatus The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder + * + * @return self + */ + public function setRealtimeAccountUpdaterStatus($realtimeAccountUpdaterStatus) + { + if (is_null($realtimeAccountUpdaterStatus)) { + throw new \InvalidArgumentException('non-nullable realtimeAccountUpdaterStatus cannot be null'); + } + $this->container['realtimeAccountUpdaterStatus'] = $realtimeAccountUpdaterStatus; + + return $this; + } + + /** + * Gets receiptFreeText + * + * @return string|null + */ + public function getReceiptFreeText() + { + return $this->container['receiptFreeText']; + } + + /** + * Sets receiptFreeText + * + * @param string|null $receiptFreeText Message to be displayed on the terminal. + * + * @return self + */ + public function setReceiptFreeText($receiptFreeText) + { + if (is_null($receiptFreeText)) { + throw new \InvalidArgumentException('non-nullable receiptFreeText cannot be null'); + } + $this->container['receiptFreeText'] = $receiptFreeText; + + return $this; + } + + /** + * Gets recurringContractTypes + * + * @return string|null + */ + public function getRecurringContractTypes() + { + return $this->container['recurringContractTypes']; + } + + /** + * Sets recurringContractTypes + * + * @param string|null $recurringContractTypes The recurring contract types applicable to the transaction. + * + * @return self + */ + public function setRecurringContractTypes($recurringContractTypes) + { + if (is_null($recurringContractTypes)) { + throw new \InvalidArgumentException('non-nullable recurringContractTypes cannot be null'); + } + $this->container['recurringContractTypes'] = $recurringContractTypes; + + return $this; + } + + /** + * Gets recurringFirstPspReference + * + * @return string|null + */ + public function getRecurringFirstPspReference() + { + return $this->container['recurringFirstPspReference']; + } + + /** + * Sets recurringFirstPspReference + * + * @param string|null $recurringFirstPspReference The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. + * + * @return self + */ + public function setRecurringFirstPspReference($recurringFirstPspReference) + { + if (is_null($recurringFirstPspReference)) { + throw new \InvalidArgumentException('non-nullable recurringFirstPspReference cannot be null'); + } + $this->container['recurringFirstPspReference'] = $recurringFirstPspReference; + + return $this; + } + + /** + * Gets recurringRecurringDetailReference + * + * @return string|null + */ + public function getRecurringRecurringDetailReference() + { + return $this->container['recurringRecurringDetailReference']; + } + + /** + * Sets recurringRecurringDetailReference + * + * @param string|null $recurringRecurringDetailReference The reference that uniquely identifies the recurring transaction. + * + * @return self + */ + public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) + { + if (is_null($recurringRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringRecurringDetailReference cannot be null'); + } + $this->container['recurringRecurringDetailReference'] = $recurringRecurringDetailReference; + + return $this; + } + + /** + * Gets recurringShopperReference + * + * @return string|null + */ + public function getRecurringShopperReference() + { + return $this->container['recurringShopperReference']; + } + + /** + * Sets recurringShopperReference + * + * @param string|null $recurringShopperReference The provided reference of the shopper for a recurring transaction. + * + * @return self + */ + public function setRecurringShopperReference($recurringShopperReference) + { + if (is_null($recurringShopperReference)) { + throw new \InvalidArgumentException('non-nullable recurringShopperReference cannot be null'); + } + $this->container['recurringShopperReference'] = $recurringShopperReference; + + return $this; + } + + /** + * Gets recurringProcessingModel + * + * @return string|null + */ + public function getRecurringProcessingModel() + { + return $this->container['recurringProcessingModel']; + } + + /** + * Sets recurringProcessingModel + * + * @param string|null $recurringProcessingModel The processing model used for the recurring transaction. + * + * @return self + */ + public function setRecurringProcessingModel($recurringProcessingModel) + { + if (is_null($recurringProcessingModel)) { + throw new \InvalidArgumentException('non-nullable recurringProcessingModel cannot be null'); + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!in_array($recurringProcessingModel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $recurringProcessingModel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurringProcessingModel'] = $recurringProcessingModel; + + return $this; + } + + /** + * Gets referred + * + * @return string|null + */ + public function getReferred() + { + return $this->container['referred']; + } + + /** + * Sets referred + * + * @param string|null $referred If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true + * + * @return self + */ + public function setReferred($referred) + { + if (is_null($referred)) { + throw new \InvalidArgumentException('non-nullable referred cannot be null'); + } + $this->container['referred'] = $referred; + + return $this; + } + + /** + * Gets refusalReasonRaw + * + * @return string|null + */ + public function getRefusalReasonRaw() + { + return $this->container['refusalReasonRaw']; + } + + /** + * Sets refusalReasonRaw + * + * @param string|null $refusalReasonRaw Raw refusal reason received from the acquirer, where available. Example: AUTHORISED + * + * @return self + */ + public function setRefusalReasonRaw($refusalReasonRaw) + { + if (is_null($refusalReasonRaw)) { + throw new \InvalidArgumentException('non-nullable refusalReasonRaw cannot be null'); + } + $this->container['refusalReasonRaw'] = $refusalReasonRaw; + + return $this; + } + + /** + * Gets requestAmount + * + * @return string|null + */ + public function getRequestAmount() + { + return $this->container['requestAmount']; + } + + /** + * Sets requestAmount + * + * @param string|null $requestAmount The amount of the payment request. + * + * @return self + */ + public function setRequestAmount($requestAmount) + { + if (is_null($requestAmount)) { + throw new \InvalidArgumentException('non-nullable requestAmount cannot be null'); + } + $this->container['requestAmount'] = $requestAmount; + + return $this; + } + + /** + * Gets requestCurrencyCode + * + * @return string|null + */ + public function getRequestCurrencyCode() + { + return $this->container['requestCurrencyCode']; + } + + /** + * Sets requestCurrencyCode + * + * @param string|null $requestCurrencyCode The currency of the payment request. + * + * @return self + */ + public function setRequestCurrencyCode($requestCurrencyCode) + { + if (is_null($requestCurrencyCode)) { + throw new \InvalidArgumentException('non-nullable requestCurrencyCode cannot be null'); + } + $this->container['requestCurrencyCode'] = $requestCurrencyCode; + + return $this; + } + + /** + * Gets shopperInteraction + * + * @return string|null + */ + public function getShopperInteraction() + { + return $this->container['shopperInteraction']; + } + + /** + * Sets shopperInteraction + * + * @param string|null $shopperInteraction The shopper interaction type of the payment request. Example: Ecommerce + * + * @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; + } + + /** + * Gets shopperReference + * + * @return string|null + */ + public function getShopperReference() + { + return $this->container['shopperReference']; + } + + /** + * Sets shopperReference + * + * @param string|null $shopperReference The shopperReference passed in the payment request. Example: AdyenTestShopperXX + * + * @return self + */ + public function setShopperReference($shopperReference) + { + if (is_null($shopperReference)) { + throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); + } + $this->container['shopperReference'] = $shopperReference; + + return $this; + } + + /** + * Gets terminalId + * + * @return string|null + */ + public function getTerminalId() + { + return $this->container['terminalId']; + } + + /** + * Sets terminalId + * + * @param string|null $terminalId The terminal ID used in a point-of-sale payment. Example: 06022622 + * + * @return self + */ + public function setTerminalId($terminalId) + { + if (is_null($terminalId)) { + throw new \InvalidArgumentException('non-nullable terminalId cannot be null'); + } + $this->container['terminalId'] = $terminalId; + + return $this; + } + + /** + * Gets threeDAuthenticated + * + * @return string|null + */ + public function getThreeDAuthenticated() + { + return $this->container['threeDAuthenticated']; + } + + /** + * Sets threeDAuthenticated + * + * @param string|null $threeDAuthenticated A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true + * + * @return self + */ + public function setThreeDAuthenticated($threeDAuthenticated) + { + if (is_null($threeDAuthenticated)) { + throw new \InvalidArgumentException('non-nullable threeDAuthenticated cannot be null'); + } + $this->container['threeDAuthenticated'] = $threeDAuthenticated; + + return $this; + } + + /** + * Gets threeDAuthenticatedResponse + * + * @return string|null + */ + public function getThreeDAuthenticatedResponse() + { + return $this->container['threeDAuthenticatedResponse']; + } + + /** + * Sets threeDAuthenticatedResponse + * + * @param string|null $threeDAuthenticatedResponse The raw 3DS authentication result from the card issuer. Example: N + * + * @return self + */ + public function setThreeDAuthenticatedResponse($threeDAuthenticatedResponse) + { + if (is_null($threeDAuthenticatedResponse)) { + throw new \InvalidArgumentException('non-nullable threeDAuthenticatedResponse cannot be null'); + } + $this->container['threeDAuthenticatedResponse'] = $threeDAuthenticatedResponse; + + return $this; + } + + /** + * Gets threeDOffered + * + * @return string|null + */ + public function getThreeDOffered() + { + return $this->container['threeDOffered']; + } + + /** + * Sets threeDOffered + * + * @param string|null $threeDOffered A Boolean value indicating whether 3DS was offered for this payment. Example: true + * + * @return self + */ + public function setThreeDOffered($threeDOffered) + { + if (is_null($threeDOffered)) { + throw new \InvalidArgumentException('non-nullable threeDOffered cannot be null'); + } + $this->container['threeDOffered'] = $threeDOffered; + + return $this; + } + + /** + * Gets threeDOfferedResponse + * + * @return string|null + */ + public function getThreeDOfferedResponse() + { + return $this->container['threeDOfferedResponse']; + } + + /** + * Sets threeDOfferedResponse + * + * @param string|null $threeDOfferedResponse The raw enrollment result from the 3DS directory services of the card schemes. Example: Y + * + * @return self + */ + public function setThreeDOfferedResponse($threeDOfferedResponse) + { + if (is_null($threeDOfferedResponse)) { + throw new \InvalidArgumentException('non-nullable threeDOfferedResponse cannot be null'); + } + $this->container['threeDOfferedResponse'] = $threeDOfferedResponse; + + return $this; + } + + /** + * Gets threeDSVersion + * + * @return string|null + */ + public function getThreeDSVersion() + { + return $this->container['threeDSVersion']; + } + + /** + * Sets threeDSVersion + * + * @param string|null $threeDSVersion The 3D Secure 2 version. + * + * @return self + */ + public function setThreeDSVersion($threeDSVersion) + { + if (is_null($threeDSVersion)) { + throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); + } + $this->container['threeDSVersion'] = $threeDSVersion; + + return $this; + } + + /** + * Gets visaTransactionId + * + * @return string|null + */ + public function getVisaTransactionId() + { + return $this->container['visaTransactionId']; + } + + /** + * Sets visaTransactionId + * + * @param string|null $visaTransactionId The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. + * + * @return self + */ + public function setVisaTransactionId($visaTransactionId) + { + if (is_null($visaTransactionId)) { + throw new \InvalidArgumentException('non-nullable visaTransactionId cannot be null'); + } + $this->container['visaTransactionId'] = $visaTransactionId; + + return $this; + } + + /** + * Gets xid + * + * @return string|null + */ + public function getXid() + { + return $this->container['xid']; + } + + /** + * Sets xid + * + * @param string|null $xid The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= + * + * @return self + */ + public function setXid($xid) + { + if (is_null($xid)) { + throw new \InvalidArgumentException('non-nullable xid cannot be null'); + } + $this->container['xid'] = $xid; + + 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/Payment/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.php new file mode 100644 index 000000000..503fedf8f --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.php @@ -0,0 +1,418 @@ + + */ +class ResponseAdditionalDataDomesticError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataDomesticError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'domesticRefusalReasonRaw' => 'string', + 'domesticShopperAdvice' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'domesticRefusalReasonRaw' => null, + 'domesticShopperAdvice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'domesticRefusalReasonRaw' => false, + 'domesticShopperAdvice' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domesticRefusalReasonRaw' => 'domesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'domesticShopperAdvice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domesticRefusalReasonRaw' => 'setDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'setDomesticShopperAdvice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domesticRefusalReasonRaw' => 'getDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'getDomesticShopperAdvice' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('domesticRefusalReasonRaw', $data ?? [], null); + $this->setIfExists('domesticShopperAdvice', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domesticRefusalReasonRaw + * + * @return string|null + */ + public function getDomesticRefusalReasonRaw() + { + return $this->container['domesticRefusalReasonRaw']; + } + + /** + * Sets domesticRefusalReasonRaw + * + * @param string|null $domesticRefusalReasonRaw The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + * + * @return self + */ + public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) + { + if (is_null($domesticRefusalReasonRaw)) { + throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); + } + $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; + + return $this; + } + + /** + * Gets domesticShopperAdvice + * + * @return string|null + */ + public function getDomesticShopperAdvice() + { + return $this->container['domesticShopperAdvice']; + } + + /** + * Sets domesticShopperAdvice + * + * @param string|null $domesticShopperAdvice The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + * + * @return self + */ + public function setDomesticShopperAdvice($domesticShopperAdvice) + { + if (is_null($domesticShopperAdvice)) { + throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); + } + $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * 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/Payment/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Payment/ResponseAdditionalDataInstallments.php new file mode 100644 index 000000000..8eeb2634f --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataInstallments.php @@ -0,0 +1,758 @@ + + */ +class ResponseAdditionalDataInstallments implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataInstallments'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'installmentPaymentDataInstallmentType' => 'string', + 'installmentPaymentDataOptionItemNrAnnualPercentageRate' => 'string', + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount' => 'string', + 'installmentPaymentDataOptionItemNrInstallmentFee' => 'string', + 'installmentPaymentDataOptionItemNrInterestRate' => 'string', + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments' => 'string', + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments' => 'string', + 'installmentPaymentDataOptionItemNrNumberOfInstallments' => 'string', + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount' => 'string', + 'installmentPaymentDataOptionItemNrTotalAmountDue' => 'string', + 'installmentPaymentDataPaymentOptions' => 'string', + 'installmentsValue' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'installmentPaymentDataInstallmentType' => null, + 'installmentPaymentDataOptionItemNrAnnualPercentageRate' => null, + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount' => null, + 'installmentPaymentDataOptionItemNrInstallmentFee' => null, + 'installmentPaymentDataOptionItemNrInterestRate' => null, + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments' => null, + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments' => null, + 'installmentPaymentDataOptionItemNrNumberOfInstallments' => null, + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount' => null, + 'installmentPaymentDataOptionItemNrTotalAmountDue' => null, + 'installmentPaymentDataPaymentOptions' => null, + 'installmentsValue' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'installmentPaymentDataInstallmentType' => false, + 'installmentPaymentDataOptionItemNrAnnualPercentageRate' => false, + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount' => false, + 'installmentPaymentDataOptionItemNrInstallmentFee' => false, + 'installmentPaymentDataOptionItemNrInterestRate' => false, + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments' => false, + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments' => false, + 'installmentPaymentDataOptionItemNrNumberOfInstallments' => false, + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount' => false, + 'installmentPaymentDataOptionItemNrTotalAmountDue' => false, + 'installmentPaymentDataPaymentOptions' => false, + 'installmentsValue' => 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 = [ + 'installmentPaymentDataInstallmentType' => 'installmentPaymentData.installmentType', + 'installmentPaymentDataOptionItemNrAnnualPercentageRate' => 'installmentPaymentData.option[itemNr].annualPercentageRate', + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount' => 'installmentPaymentData.option[itemNr].firstInstallmentAmount', + 'installmentPaymentDataOptionItemNrInstallmentFee' => 'installmentPaymentData.option[itemNr].installmentFee', + 'installmentPaymentDataOptionItemNrInterestRate' => 'installmentPaymentData.option[itemNr].interestRate', + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments' => 'installmentPaymentData.option[itemNr].maximumNumberOfInstallments', + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments' => 'installmentPaymentData.option[itemNr].minimumNumberOfInstallments', + 'installmentPaymentDataOptionItemNrNumberOfInstallments' => 'installmentPaymentData.option[itemNr].numberOfInstallments', + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount' => 'installmentPaymentData.option[itemNr].subsequentInstallmentAmount', + 'installmentPaymentDataOptionItemNrTotalAmountDue' => 'installmentPaymentData.option[itemNr].totalAmountDue', + 'installmentPaymentDataPaymentOptions' => 'installmentPaymentData.paymentOptions', + 'installmentsValue' => 'installments.value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'installmentPaymentDataInstallmentType' => 'setInstallmentPaymentDataInstallmentType', + 'installmentPaymentDataOptionItemNrAnnualPercentageRate' => 'setInstallmentPaymentDataOptionItemNrAnnualPercentageRate', + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount' => 'setInstallmentPaymentDataOptionItemNrFirstInstallmentAmount', + 'installmentPaymentDataOptionItemNrInstallmentFee' => 'setInstallmentPaymentDataOptionItemNrInstallmentFee', + 'installmentPaymentDataOptionItemNrInterestRate' => 'setInstallmentPaymentDataOptionItemNrInterestRate', + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments' => 'setInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments', + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments' => 'setInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments', + 'installmentPaymentDataOptionItemNrNumberOfInstallments' => 'setInstallmentPaymentDataOptionItemNrNumberOfInstallments', + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount' => 'setInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount', + 'installmentPaymentDataOptionItemNrTotalAmountDue' => 'setInstallmentPaymentDataOptionItemNrTotalAmountDue', + 'installmentPaymentDataPaymentOptions' => 'setInstallmentPaymentDataPaymentOptions', + 'installmentsValue' => 'setInstallmentsValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'installmentPaymentDataInstallmentType' => 'getInstallmentPaymentDataInstallmentType', + 'installmentPaymentDataOptionItemNrAnnualPercentageRate' => 'getInstallmentPaymentDataOptionItemNrAnnualPercentageRate', + 'installmentPaymentDataOptionItemNrFirstInstallmentAmount' => 'getInstallmentPaymentDataOptionItemNrFirstInstallmentAmount', + 'installmentPaymentDataOptionItemNrInstallmentFee' => 'getInstallmentPaymentDataOptionItemNrInstallmentFee', + 'installmentPaymentDataOptionItemNrInterestRate' => 'getInstallmentPaymentDataOptionItemNrInterestRate', + 'installmentPaymentDataOptionItemNrMaximumNumberOfInstallments' => 'getInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments', + 'installmentPaymentDataOptionItemNrMinimumNumberOfInstallments' => 'getInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments', + 'installmentPaymentDataOptionItemNrNumberOfInstallments' => 'getInstallmentPaymentDataOptionItemNrNumberOfInstallments', + 'installmentPaymentDataOptionItemNrSubsequentInstallmentAmount' => 'getInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount', + 'installmentPaymentDataOptionItemNrTotalAmountDue' => 'getInstallmentPaymentDataOptionItemNrTotalAmountDue', + 'installmentPaymentDataPaymentOptions' => 'getInstallmentPaymentDataPaymentOptions', + 'installmentsValue' => 'getInstallmentsValue' + ]; + + /** + * 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('installmentPaymentDataInstallmentType', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrAnnualPercentageRate', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrFirstInstallmentAmount', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrInstallmentFee', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrInterestRate', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrMaximumNumberOfInstallments', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrMinimumNumberOfInstallments', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrNumberOfInstallments', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrSubsequentInstallmentAmount', $data ?? [], null); + $this->setIfExists('installmentPaymentDataOptionItemNrTotalAmountDue', $data ?? [], null); + $this->setIfExists('installmentPaymentDataPaymentOptions', $data ?? [], null); + $this->setIfExists('installmentsValue', $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 installmentPaymentDataInstallmentType + * + * @return string|null + */ + public function getInstallmentPaymentDataInstallmentType() + { + return $this->container['installmentPaymentDataInstallmentType']; + } + + /** + * Sets installmentPaymentDataInstallmentType + * + * @param string|null $installmentPaymentDataInstallmentType Type of installment. The value of `installmentType` should be **IssuerFinanced**. + * + * @return self + */ + public function setInstallmentPaymentDataInstallmentType($installmentPaymentDataInstallmentType) + { + if (is_null($installmentPaymentDataInstallmentType)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataInstallmentType cannot be null'); + } + $this->container['installmentPaymentDataInstallmentType'] = $installmentPaymentDataInstallmentType; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrAnnualPercentageRate + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrAnnualPercentageRate() + { + return $this->container['installmentPaymentDataOptionItemNrAnnualPercentageRate']; + } + + /** + * Sets installmentPaymentDataOptionItemNrAnnualPercentageRate + * + * @param string|null $installmentPaymentDataOptionItemNrAnnualPercentageRate Annual interest rate. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrAnnualPercentageRate($installmentPaymentDataOptionItemNrAnnualPercentageRate) + { + if (is_null($installmentPaymentDataOptionItemNrAnnualPercentageRate)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrAnnualPercentageRate cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrAnnualPercentageRate'] = $installmentPaymentDataOptionItemNrAnnualPercentageRate; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrFirstInstallmentAmount + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrFirstInstallmentAmount() + { + return $this->container['installmentPaymentDataOptionItemNrFirstInstallmentAmount']; + } + + /** + * Sets installmentPaymentDataOptionItemNrFirstInstallmentAmount + * + * @param string|null $installmentPaymentDataOptionItemNrFirstInstallmentAmount First Installment Amount in minor units. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrFirstInstallmentAmount($installmentPaymentDataOptionItemNrFirstInstallmentAmount) + { + if (is_null($installmentPaymentDataOptionItemNrFirstInstallmentAmount)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrFirstInstallmentAmount cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrFirstInstallmentAmount'] = $installmentPaymentDataOptionItemNrFirstInstallmentAmount; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrInstallmentFee + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrInstallmentFee() + { + return $this->container['installmentPaymentDataOptionItemNrInstallmentFee']; + } + + /** + * Sets installmentPaymentDataOptionItemNrInstallmentFee + * + * @param string|null $installmentPaymentDataOptionItemNrInstallmentFee Installment fee amount in minor units. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrInstallmentFee($installmentPaymentDataOptionItemNrInstallmentFee) + { + if (is_null($installmentPaymentDataOptionItemNrInstallmentFee)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrInstallmentFee cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrInstallmentFee'] = $installmentPaymentDataOptionItemNrInstallmentFee; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrInterestRate + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrInterestRate() + { + return $this->container['installmentPaymentDataOptionItemNrInterestRate']; + } + + /** + * Sets installmentPaymentDataOptionItemNrInterestRate + * + * @param string|null $installmentPaymentDataOptionItemNrInterestRate Interest rate for the installment period. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrInterestRate($installmentPaymentDataOptionItemNrInterestRate) + { + if (is_null($installmentPaymentDataOptionItemNrInterestRate)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrInterestRate cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrInterestRate'] = $installmentPaymentDataOptionItemNrInterestRate; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrMaximumNumberOfInstallments + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments() + { + return $this->container['installmentPaymentDataOptionItemNrMaximumNumberOfInstallments']; + } + + /** + * Sets installmentPaymentDataOptionItemNrMaximumNumberOfInstallments + * + * @param string|null $installmentPaymentDataOptionItemNrMaximumNumberOfInstallments Maximum number of installments possible for this payment. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments($installmentPaymentDataOptionItemNrMaximumNumberOfInstallments) + { + if (is_null($installmentPaymentDataOptionItemNrMaximumNumberOfInstallments)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrMaximumNumberOfInstallments cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrMaximumNumberOfInstallments'] = $installmentPaymentDataOptionItemNrMaximumNumberOfInstallments; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrMinimumNumberOfInstallments + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments() + { + return $this->container['installmentPaymentDataOptionItemNrMinimumNumberOfInstallments']; + } + + /** + * Sets installmentPaymentDataOptionItemNrMinimumNumberOfInstallments + * + * @param string|null $installmentPaymentDataOptionItemNrMinimumNumberOfInstallments Minimum number of installments possible for this payment. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments($installmentPaymentDataOptionItemNrMinimumNumberOfInstallments) + { + if (is_null($installmentPaymentDataOptionItemNrMinimumNumberOfInstallments)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrMinimumNumberOfInstallments cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrMinimumNumberOfInstallments'] = $installmentPaymentDataOptionItemNrMinimumNumberOfInstallments; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrNumberOfInstallments + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrNumberOfInstallments() + { + return $this->container['installmentPaymentDataOptionItemNrNumberOfInstallments']; + } + + /** + * Sets installmentPaymentDataOptionItemNrNumberOfInstallments + * + * @param string|null $installmentPaymentDataOptionItemNrNumberOfInstallments Total number of installments possible for this payment. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrNumberOfInstallments($installmentPaymentDataOptionItemNrNumberOfInstallments) + { + if (is_null($installmentPaymentDataOptionItemNrNumberOfInstallments)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrNumberOfInstallments cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrNumberOfInstallments'] = $installmentPaymentDataOptionItemNrNumberOfInstallments; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrSubsequentInstallmentAmount + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount() + { + return $this->container['installmentPaymentDataOptionItemNrSubsequentInstallmentAmount']; + } + + /** + * Sets installmentPaymentDataOptionItemNrSubsequentInstallmentAmount + * + * @param string|null $installmentPaymentDataOptionItemNrSubsequentInstallmentAmount Subsequent Installment Amount in minor units. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount($installmentPaymentDataOptionItemNrSubsequentInstallmentAmount) + { + if (is_null($installmentPaymentDataOptionItemNrSubsequentInstallmentAmount)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrSubsequentInstallmentAmount cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrSubsequentInstallmentAmount'] = $installmentPaymentDataOptionItemNrSubsequentInstallmentAmount; + + return $this; + } + + /** + * Gets installmentPaymentDataOptionItemNrTotalAmountDue + * + * @return string|null + */ + public function getInstallmentPaymentDataOptionItemNrTotalAmountDue() + { + return $this->container['installmentPaymentDataOptionItemNrTotalAmountDue']; + } + + /** + * Sets installmentPaymentDataOptionItemNrTotalAmountDue + * + * @param string|null $installmentPaymentDataOptionItemNrTotalAmountDue Total amount in minor units. + * + * @return self + */ + public function setInstallmentPaymentDataOptionItemNrTotalAmountDue($installmentPaymentDataOptionItemNrTotalAmountDue) + { + if (is_null($installmentPaymentDataOptionItemNrTotalAmountDue)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrTotalAmountDue cannot be null'); + } + $this->container['installmentPaymentDataOptionItemNrTotalAmountDue'] = $installmentPaymentDataOptionItemNrTotalAmountDue; + + return $this; + } + + /** + * Gets installmentPaymentDataPaymentOptions + * + * @return string|null + */ + public function getInstallmentPaymentDataPaymentOptions() + { + return $this->container['installmentPaymentDataPaymentOptions']; + } + + /** + * Sets installmentPaymentDataPaymentOptions + * + * @param string|null $installmentPaymentDataPaymentOptions Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments + * + * @return self + */ + public function setInstallmentPaymentDataPaymentOptions($installmentPaymentDataPaymentOptions) + { + if (is_null($installmentPaymentDataPaymentOptions)) { + throw new \InvalidArgumentException('non-nullable installmentPaymentDataPaymentOptions cannot be null'); + } + $this->container['installmentPaymentDataPaymentOptions'] = $installmentPaymentDataPaymentOptions; + + return $this; + } + + /** + * Gets installmentsValue + * + * @return string|null + */ + public function getInstallmentsValue() + { + return $this->container['installmentsValue']; + } + + /** + * Sets installmentsValue + * + * @param string|null $installmentsValue The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. + * + * @return self + */ + public function setInstallmentsValue($installmentsValue) + { + if (is_null($installmentsValue)) { + throw new \InvalidArgumentException('non-nullable installmentsValue cannot be null'); + } + $this->container['installmentsValue'] = $installmentsValue; + + 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/Payment/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.php new file mode 100644 index 000000000..85ba99842 --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.php @@ -0,0 +1,452 @@ + + */ +class ResponseAdditionalDataNetworkTokens implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataNetworkTokens'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'networkTokenAvailable' => 'string', + 'networkTokenBin' => 'string', + 'networkTokenTokenSummary' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'networkTokenAvailable' => null, + 'networkTokenBin' => null, + 'networkTokenTokenSummary' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'networkTokenAvailable' => false, + 'networkTokenBin' => false, + 'networkTokenTokenSummary' => 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 = [ + 'networkTokenAvailable' => 'networkToken.available', + 'networkTokenBin' => 'networkToken.bin', + 'networkTokenTokenSummary' => 'networkToken.tokenSummary' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'networkTokenAvailable' => 'setNetworkTokenAvailable', + 'networkTokenBin' => 'setNetworkTokenBin', + 'networkTokenTokenSummary' => 'setNetworkTokenTokenSummary' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'networkTokenAvailable' => 'getNetworkTokenAvailable', + 'networkTokenBin' => 'getNetworkTokenBin', + 'networkTokenTokenSummary' => 'getNetworkTokenTokenSummary' + ]; + + /** + * 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('networkTokenAvailable', $data ?? [], null); + $this->setIfExists('networkTokenBin', $data ?? [], null); + $this->setIfExists('networkTokenTokenSummary', $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 networkTokenAvailable + * + * @return string|null + */ + public function getNetworkTokenAvailable() + { + return $this->container['networkTokenAvailable']; + } + + /** + * Sets networkTokenAvailable + * + * @param string|null $networkTokenAvailable Indicates whether a network token is available for the specified card. + * + * @return self + */ + public function setNetworkTokenAvailable($networkTokenAvailable) + { + if (is_null($networkTokenAvailable)) { + throw new \InvalidArgumentException('non-nullable networkTokenAvailable cannot be null'); + } + $this->container['networkTokenAvailable'] = $networkTokenAvailable; + + return $this; + } + + /** + * Gets networkTokenBin + * + * @return string|null + */ + public function getNetworkTokenBin() + { + return $this->container['networkTokenBin']; + } + + /** + * Sets networkTokenBin + * + * @param string|null $networkTokenBin The Bank Identification Number of a tokenized card, which is the first six digits of a card number. + * + * @return self + */ + public function setNetworkTokenBin($networkTokenBin) + { + if (is_null($networkTokenBin)) { + throw new \InvalidArgumentException('non-nullable networkTokenBin cannot be null'); + } + $this->container['networkTokenBin'] = $networkTokenBin; + + return $this; + } + + /** + * Gets networkTokenTokenSummary + * + * @return string|null + */ + public function getNetworkTokenTokenSummary() + { + return $this->container['networkTokenTokenSummary']; + } + + /** + * Sets networkTokenTokenSummary + * + * @param string|null $networkTokenTokenSummary The last four digits of a network token. + * + * @return self + */ + public function setNetworkTokenTokenSummary($networkTokenTokenSummary) + { + if (is_null($networkTokenTokenSummary)) { + throw new \InvalidArgumentException('non-nullable networkTokenTokenSummary cannot be null'); + } + $this->container['networkTokenTokenSummary'] = $networkTokenTokenSummary; + + 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/Payment/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Payment/ResponseAdditionalDataOpi.php new file mode 100644 index 000000000..97ff2c3ce --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataOpi.php @@ -0,0 +1,384 @@ + + */ +class ResponseAdditionalDataOpi implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataOpi'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'opiTransToken' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'opiTransToken' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'opiTransToken' => 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 = [ + 'opiTransToken' => 'opi.transToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'opiTransToken' => 'setOpiTransToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'opiTransToken' => 'getOpiTransToken' + ]; + + /** + * 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('opiTransToken', $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 opiTransToken + * + * @return string|null + */ + public function getOpiTransToken() + { + return $this->container['opiTransToken']; + } + + /** + * Sets opiTransToken + * + * @param string|null $opiTransToken Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). + * + * @return self + */ + public function setOpiTransToken($opiTransToken) + { + if (is_null($opiTransToken)) { + throw new \InvalidArgumentException('non-nullable opiTransToken cannot be null'); + } + $this->container['opiTransToken'] = $opiTransToken; + + 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/Payment/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payment/ResponseAdditionalDataSepa.php new file mode 100644 index 000000000..20b237b22 --- /dev/null +++ b/src/Adyen/Model/Payment/ResponseAdditionalDataSepa.php @@ -0,0 +1,452 @@ + + */ +class ResponseAdditionalDataSepa implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSepa'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sepadirectdebitDateOfSignature' => 'string', + 'sepadirectdebitMandateId' => 'string', + 'sepadirectdebitSequenceType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sepadirectdebitDateOfSignature' => null, + 'sepadirectdebitMandateId' => null, + 'sepadirectdebitSequenceType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'sepadirectdebitDateOfSignature' => false, + 'sepadirectdebitMandateId' => false, + 'sepadirectdebitSequenceType' => 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 = [ + 'sepadirectdebitDateOfSignature' => 'sepadirectdebit.dateOfSignature', + 'sepadirectdebitMandateId' => 'sepadirectdebit.mandateId', + 'sepadirectdebitSequenceType' => 'sepadirectdebit.sequenceType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sepadirectdebitDateOfSignature' => 'setSepadirectdebitDateOfSignature', + 'sepadirectdebitMandateId' => 'setSepadirectdebitMandateId', + 'sepadirectdebitSequenceType' => 'setSepadirectdebitSequenceType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sepadirectdebitDateOfSignature' => 'getSepadirectdebitDateOfSignature', + 'sepadirectdebitMandateId' => 'getSepadirectdebitMandateId', + 'sepadirectdebitSequenceType' => 'getSepadirectdebitSequenceType' + ]; + + /** + * 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('sepadirectdebitDateOfSignature', $data ?? [], null); + $this->setIfExists('sepadirectdebitMandateId', $data ?? [], null); + $this->setIfExists('sepadirectdebitSequenceType', $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 sepadirectdebitDateOfSignature + * + * @return string|null + */ + public function getSepadirectdebitDateOfSignature() + { + return $this->container['sepadirectdebitDateOfSignature']; + } + + /** + * Sets sepadirectdebitDateOfSignature + * + * @param string|null $sepadirectdebitDateOfSignature The transaction signature date. Format: yyyy-MM-dd + * + * @return self + */ + public function setSepadirectdebitDateOfSignature($sepadirectdebitDateOfSignature) + { + if (is_null($sepadirectdebitDateOfSignature)) { + throw new \InvalidArgumentException('non-nullable sepadirectdebitDateOfSignature cannot be null'); + } + $this->container['sepadirectdebitDateOfSignature'] = $sepadirectdebitDateOfSignature; + + return $this; + } + + /** + * Gets sepadirectdebitMandateId + * + * @return string|null + */ + public function getSepadirectdebitMandateId() + { + return $this->container['sepadirectdebitMandateId']; + } + + /** + * Sets sepadirectdebitMandateId + * + * @param string|null $sepadirectdebitMandateId Its value corresponds to the pspReference value of the transaction. + * + * @return self + */ + public function setSepadirectdebitMandateId($sepadirectdebitMandateId) + { + if (is_null($sepadirectdebitMandateId)) { + throw new \InvalidArgumentException('non-nullable sepadirectdebitMandateId cannot be null'); + } + $this->container['sepadirectdebitMandateId'] = $sepadirectdebitMandateId; + + return $this; + } + + /** + * Gets sepadirectdebitSequenceType + * + * @return string|null + */ + public function getSepadirectdebitSequenceType() + { + return $this->container['sepadirectdebitSequenceType']; + } + + /** + * Sets sepadirectdebitSequenceType + * + * @param string|null $sepadirectdebitSequenceType This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF + * + * @return self + */ + public function setSepadirectdebitSequenceType($sepadirectdebitSequenceType) + { + if (is_null($sepadirectdebitSequenceType)) { + throw new \InvalidArgumentException('non-nullable sepadirectdebitSequenceType cannot be null'); + } + $this->container['sepadirectdebitSequenceType'] = $sepadirectdebitSequenceType; + + 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/Payment/SDKEphemPubKey.php b/src/Adyen/Model/Payment/SDKEphemPubKey.php new file mode 100644 index 000000000..d6318be55 --- /dev/null +++ b/src/Adyen/Model/Payment/SDKEphemPubKey.php @@ -0,0 +1,486 @@ + + */ +class SDKEphemPubKey implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SDKEphemPubKey'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'crv' => 'string', + 'kty' => 'string', + 'x' => 'string', + 'y' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'crv' => null, + 'kty' => null, + 'x' => null, + 'y' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'crv' => false, + 'kty' => false, + 'x' => false, + 'y' => 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 = [ + 'crv' => 'crv', + 'kty' => 'kty', + 'x' => 'x', + 'y' => 'y' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'crv' => 'setCrv', + 'kty' => 'setKty', + 'x' => 'setX', + 'y' => 'setY' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'crv' => 'getCrv', + 'kty' => 'getKty', + 'x' => 'getX', + 'y' => 'getY' + ]; + + /** + * 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('crv', $data ?? [], null); + $this->setIfExists('kty', $data ?? [], null); + $this->setIfExists('x', $data ?? [], null); + $this->setIfExists('y', $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 crv + * + * @return string|null + */ + public function getCrv() + { + return $this->container['crv']; + } + + /** + * Sets crv + * + * @param string|null $crv The `crv` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setCrv($crv) + { + if (is_null($crv)) { + throw new \InvalidArgumentException('non-nullable crv cannot be null'); + } + $this->container['crv'] = $crv; + + return $this; + } + + /** + * Gets kty + * + * @return string|null + */ + public function getKty() + { + return $this->container['kty']; + } + + /** + * Sets kty + * + * @param string|null $kty The `kty` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setKty($kty) + { + if (is_null($kty)) { + throw new \InvalidArgumentException('non-nullable kty cannot be null'); + } + $this->container['kty'] = $kty; + + return $this; + } + + /** + * Gets x + * + * @return string|null + */ + public function getX() + { + return $this->container['x']; + } + + /** + * Sets x + * + * @param string|null $x The `x` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setX($x) + { + if (is_null($x)) { + throw new \InvalidArgumentException('non-nullable x cannot be null'); + } + $this->container['x'] = $x; + + return $this; + } + + /** + * Gets y + * + * @return string|null + */ + public function getY() + { + return $this->container['y']; + } + + /** + * Sets y + * + * @param string|null $y The `y` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setY($y) + { + if (is_null($y)) { + throw new \InvalidArgumentException('non-nullable y cannot be null'); + } + $this->container['y'] = $y; + + 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/Payment/ServiceError.php b/src/Adyen/Model/Payment/ServiceError.php new file mode 100644 index 000000000..3e5315523 --- /dev/null +++ b/src/Adyen/Model/Payment/ServiceError.php @@ -0,0 +1,552 @@ + + */ +class ServiceError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServiceError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'errorCode' => 'string', + 'errorType' => 'string', + 'message' => 'string', + 'pspReference' => 'string', + 'status' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'errorCode' => null, + 'errorType' => null, + 'message' => null, + 'pspReference' => null, + 'status' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'errorCode' => false, + 'errorType' => false, + 'message' => false, + 'pspReference' => false, + 'status' => 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 = [ + 'additionalData' => 'additionalData', + 'errorCode' => 'errorCode', + 'errorType' => 'errorType', + 'message' => 'message', + 'pspReference' => 'pspReference', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'errorCode' => 'setErrorCode', + 'errorType' => 'setErrorType', + 'message' => 'setMessage', + 'pspReference' => 'setPspReference', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'errorCode' => 'getErrorCode', + 'errorType' => 'getErrorType', + 'message' => 'getMessage', + 'pspReference' => 'getPspReference', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('additionalData', $data ?? [], null); + $this->setIfExists('errorCode', $data ?? [], null); + $this->setIfExists('errorType', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('pspReference', $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 = []; + + 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets errorCode + * + * @return string|null + */ + public function getErrorCode() + { + return $this->container['errorCode']; + } + + /** + * Sets errorCode + * + * @param string|null $errorCode The error code mapped to the error message. + * + * @return self + */ + public function setErrorCode($errorCode) + { + if (is_null($errorCode)) { + throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); + } + $this->container['errorCode'] = $errorCode; + + return $this; + } + + /** + * Gets errorType + * + * @return string|null + */ + public function getErrorType() + { + return $this->container['errorType']; + } + + /** + * Sets errorType + * + * @param string|null $errorType The category of the error. + * + * @return self + */ + public function setErrorType($errorType) + { + if (is_null($errorType)) { + throw new \InvalidArgumentException('non-nullable errorType cannot be null'); + } + $this->container['errorType'] = $errorType; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A short explanation of the issue. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets pspReference + * + * @return string|null + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string|null $pspReference The PSP reference of the payment. + * + * @return self + */ + public function setPspReference($pspReference) + { + if (is_null($pspReference)) { + throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); + } + $this->container['pspReference'] = $pspReference; + + return $this; + } + + /** + * Gets status + * + * @return int|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status The HTTP response status. + * + * @return self + */ + public function setStatus($status) + { + // Do nothing for nullable integers + $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/Payment/ShopperInteractionDevice.php b/src/Adyen/Model/Payment/ShopperInteractionDevice.php new file mode 100644 index 000000000..f4a830436 --- /dev/null +++ b/src/Adyen/Model/Payment/ShopperInteractionDevice.php @@ -0,0 +1,452 @@ + + */ +class ShopperInteractionDevice implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ShopperInteractionDevice'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'locale' => 'string', + 'os' => 'string', + 'osVersion' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'locale' => null, + 'os' => null, + 'osVersion' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'locale' => false, + 'os' => false, + 'osVersion' => 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 = [ + 'locale' => 'locale', + 'os' => 'os', + 'osVersion' => 'osVersion' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'locale' => 'setLocale', + 'os' => 'setOs', + 'osVersion' => 'setOsVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'locale' => 'getLocale', + 'os' => 'getOs', + 'osVersion' => 'getOsVersion' + ]; + + /** + * 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('locale', $data ?? [], null); + $this->setIfExists('os', $data ?? [], null); + $this->setIfExists('osVersion', $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 locale + * + * @return string|null + */ + public function getLocale() + { + return $this->container['locale']; + } + + /** + * Sets locale + * + * @param string|null $locale Locale on the shopper interaction device. + * + * @return self + */ + public function setLocale($locale) + { + if (is_null($locale)) { + throw new \InvalidArgumentException('non-nullable locale cannot be null'); + } + $this->container['locale'] = $locale; + + return $this; + } + + /** + * Gets os + * + * @return string|null + */ + public function getOs() + { + return $this->container['os']; + } + + /** + * Sets os + * + * @param string|null $os Operating system running on the shopper interaction device. + * + * @return self + */ + public function setOs($os) + { + if (is_null($os)) { + throw new \InvalidArgumentException('non-nullable os cannot be null'); + } + $this->container['os'] = $os; + + return $this; + } + + /** + * Gets osVersion + * + * @return string|null + */ + public function getOsVersion() + { + return $this->container['osVersion']; + } + + /** + * Sets osVersion + * + * @param string|null $osVersion Version of the operating system on the shopper interaction device. + * + * @return self + */ + public function setOsVersion($osVersion) + { + if (is_null($osVersion)) { + throw new \InvalidArgumentException('non-nullable osVersion cannot be null'); + } + $this->container['osVersion'] = $osVersion; + + 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/Payment/Split.php b/src/Adyen/Model/Payment/Split.php new file mode 100644 index 000000000..d06c63b0b --- /dev/null +++ b/src/Adyen/Model/Payment/Split.php @@ -0,0 +1,570 @@ + + */ +class Split implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Split'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'account' => 'string', + 'amount' => '\Adyen\Model\Payment\SplitAmount', + 'description' => 'string', + 'reference' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'account' => null, + 'amount' => null, + 'description' => null, + 'reference' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'account' => false, + 'amount' => false, + 'description' => false, + 'reference' => 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 = [ + 'account' => 'account', + 'amount' => 'amount', + 'description' => 'description', + 'reference' => 'reference', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'account' => 'setAccount', + 'amount' => 'setAmount', + 'description' => 'setDescription', + 'reference' => 'setReference', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'account' => 'getAccount', + 'amount' => 'getAmount', + 'description' => 'getDescription', + 'reference' => 'getReference', + '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_BALANCE_ACCOUNT = 'BalanceAccount'; + public const TYPE_COMMISSION = 'Commission'; + public const TYPE__DEFAULT = 'Default'; + public const TYPE_MARKET_PLACE = 'MarketPlace'; + public const TYPE_PAYMENT_FEE = 'PaymentFee'; + public const TYPE_REMAINDER = 'Remainder'; + public const TYPE_SURCHARGE = 'Surcharge'; + public const TYPE_TIP = 'Tip'; + public const TYPE_VAT = 'VAT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_ACCOUNT, + self::TYPE_COMMISSION, + self::TYPE__DEFAULT, + self::TYPE_MARKET_PLACE, + self::TYPE_PAYMENT_FEE, + self::TYPE_REMAINDER, + self::TYPE_SURCHARGE, + self::TYPE_TIP, + self::TYPE_VAT, + ]; + } + /** + * 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('account', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['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 account + * + * @return string|null + */ + public function getAccount() + { + return $this->container['account']; + } + + /** + * Sets account + * + * @param string|null $account The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. + * + * @return self + */ + public function setAccount($account) + { + if (is_null($account)) { + throw new \InvalidArgumentException('non-nullable account cannot be null'); + } + $this->container['account'] = $account; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\Payment\SplitAmount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Payment\SplitAmount|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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Your description for the split item. + * + * @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 reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. + * + * @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/Payment/SplitAmount.php b/src/Adyen/Model/Payment/SplitAmount.php new file mode 100644 index 000000000..6ca25b81e --- /dev/null +++ b/src/Adyen/Model/Payment/SplitAmount.php @@ -0,0 +1,421 @@ + + */ +class SplitAmount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SplitAmount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('value', $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['value'] === null) { + $invalidProperties[] = "'value' 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|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). By default, this is the original payment currency. + * + * @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 value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The value of the split amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/Payment/SubMerchant.php b/src/Adyen/Model/Payment/SubMerchant.php new file mode 100644 index 000000000..eeea115c3 --- /dev/null +++ b/src/Adyen/Model/Payment/SubMerchant.php @@ -0,0 +1,520 @@ + + */ +class SubMerchant implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubMerchant'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => '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 = [ + 'city' => null, + 'country' => null, + 'mcc' => null, + 'name' => null, + 'taxId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => 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 = [ + 'city' => 'city', + 'country' => 'country', + 'mcc' => 'mcc', + 'name' => 'name', + 'taxId' => 'taxId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'mcc' => 'setMcc', + 'name' => 'setName', + 'taxId' => 'setTaxId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + '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('city', $data ?? [], null); + $this->setIfExists('country', $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 city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits + * + * @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 The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + * + * @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 The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ + * + * @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/Payment/TechnicalCancelRequest.php b/src/Adyen/Model/Payment/TechnicalCancelRequest.php new file mode 100644 index 000000000..65b7a1f30 --- /dev/null +++ b/src/Adyen/Model/Payment/TechnicalCancelRequest.php @@ -0,0 +1,696 @@ + + */ +class TechnicalCancelRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TechnicalCancelRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'modificationAmount' => '\Adyen\Model\Payment\Amount', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'modificationAmount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'splits' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'modificationAmount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'splits' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'modificationAmount' => 'modificationAmount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'splits' => 'splits', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'modificationAmount' => 'setModificationAmount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'splits' => 'setSplits', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'modificationAmount' => 'getModificationAmount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'splits' => 'getSplits', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('modificationAmount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['originalMerchantReference'] === null) { + $invalidProperties[] = "'originalMerchantReference' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets modificationAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getModificationAmount() + { + return $this->container['modificationAmount']; + } + + /** + * Sets modificationAmount + * + * @param \Adyen\Model\Payment\Amount|null $modificationAmount modificationAmount + * + * @return self + */ + public function setModificationAmount($modificationAmount) + { + if (is_null($modificationAmount)) { + throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); + } + $this->container['modificationAmount'] = $modificationAmount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\Split[]|null $splits An array of objects specifying how the amount 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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payment/ThreeDS1Result.php b/src/Adyen/Model/Payment/ThreeDS1Result.php new file mode 100644 index 000000000..e2f3abdf3 --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDS1Result.php @@ -0,0 +1,554 @@ + + */ +class ThreeDS1Result implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS1Result'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'cavv' => 'string', + 'cavvAlgorithm' => 'string', + 'eci' => 'string', + 'threeDAuthenticatedResponse' => 'string', + 'threeDOfferedResponse' => 'string', + 'xid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'cavv' => null, + 'cavvAlgorithm' => null, + 'eci' => null, + 'threeDAuthenticatedResponse' => null, + 'threeDOfferedResponse' => null, + 'xid' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'cavv' => false, + 'cavvAlgorithm' => false, + 'eci' => false, + 'threeDAuthenticatedResponse' => false, + 'threeDOfferedResponse' => false, + 'xid' => 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 = [ + 'cavv' => 'cavv', + 'cavvAlgorithm' => 'cavvAlgorithm', + 'eci' => 'eci', + 'threeDAuthenticatedResponse' => 'threeDAuthenticatedResponse', + 'threeDOfferedResponse' => 'threeDOfferedResponse', + 'xid' => 'xid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cavv' => 'setCavv', + 'cavvAlgorithm' => 'setCavvAlgorithm', + 'eci' => 'setEci', + 'threeDAuthenticatedResponse' => 'setThreeDAuthenticatedResponse', + 'threeDOfferedResponse' => 'setThreeDOfferedResponse', + 'xid' => 'setXid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cavv' => 'getCavv', + 'cavvAlgorithm' => 'getCavvAlgorithm', + 'eci' => 'getEci', + 'threeDAuthenticatedResponse' => 'getThreeDAuthenticatedResponse', + 'threeDOfferedResponse' => 'getThreeDOfferedResponse', + 'xid' => 'getXid' + ]; + + /** + * 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('cavv', $data ?? [], null); + $this->setIfExists('cavvAlgorithm', $data ?? [], null); + $this->setIfExists('eci', $data ?? [], null); + $this->setIfExists('threeDAuthenticatedResponse', $data ?? [], null); + $this->setIfExists('threeDOfferedResponse', $data ?? [], null); + $this->setIfExists('xid', $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 cavv + * + * @return string|null + */ + public function getCavv() + { + return $this->container['cavv']; + } + + /** + * Sets cavv + * + * @param string|null $cavv The cardholder authentication value (base64 encoded). + * + * @return self + */ + public function setCavv($cavv) + { + if (is_null($cavv)) { + throw new \InvalidArgumentException('non-nullable cavv cannot be null'); + } + $this->container['cavv'] = $cavv; + + return $this; + } + + /** + * Gets cavvAlgorithm + * + * @return string|null + */ + public function getCavvAlgorithm() + { + return $this->container['cavvAlgorithm']; + } + + /** + * Sets cavvAlgorithm + * + * @param string|null $cavvAlgorithm The CAVV algorithm used. + * + * @return self + */ + public function setCavvAlgorithm($cavvAlgorithm) + { + if (is_null($cavvAlgorithm)) { + throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); + } + $this->container['cavvAlgorithm'] = $cavvAlgorithm; + + return $this; + } + + /** + * Gets eci + * + * @return string|null + */ + public function getEci() + { + return $this->container['eci']; + } + + /** + * Sets eci + * + * @param string|null $eci 3D Secure Electronic Commerce Indicator (ECI). + * + * @return self + */ + public function setEci($eci) + { + if (is_null($eci)) { + throw new \InvalidArgumentException('non-nullable eci cannot be null'); + } + $this->container['eci'] = $eci; + + return $this; + } + + /** + * Gets threeDAuthenticatedResponse + * + * @return string|null + */ + public function getThreeDAuthenticatedResponse() + { + return $this->container['threeDAuthenticatedResponse']; + } + + /** + * Sets threeDAuthenticatedResponse + * + * @param string|null $threeDAuthenticatedResponse The authentication response from the ACS. + * + * @return self + */ + public function setThreeDAuthenticatedResponse($threeDAuthenticatedResponse) + { + if (is_null($threeDAuthenticatedResponse)) { + throw new \InvalidArgumentException('non-nullable threeDAuthenticatedResponse cannot be null'); + } + $this->container['threeDAuthenticatedResponse'] = $threeDAuthenticatedResponse; + + return $this; + } + + /** + * Gets threeDOfferedResponse + * + * @return string|null + */ + public function getThreeDOfferedResponse() + { + return $this->container['threeDOfferedResponse']; + } + + /** + * Sets threeDOfferedResponse + * + * @param string|null $threeDOfferedResponse Whether 3D Secure was offered or not. + * + * @return self + */ + public function setThreeDOfferedResponse($threeDOfferedResponse) + { + if (is_null($threeDOfferedResponse)) { + throw new \InvalidArgumentException('non-nullable threeDOfferedResponse cannot be null'); + } + $this->container['threeDOfferedResponse'] = $threeDOfferedResponse; + + return $this; + } + + /** + * Gets xid + * + * @return string|null + */ + public function getXid() + { + return $this->container['xid']; + } + + /** + * Sets xid + * + * @param string|null $xid A unique transaction identifier generated by the MPI on behalf of the merchant to identify the 3D Secure transaction, in `Base64` encoding. + * + * @return self + */ + public function setXid($xid) + { + if (is_null($xid)) { + throw new \InvalidArgumentException('non-nullable xid cannot be null'); + } + $this->container['xid'] = $xid; + + 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/Payment/ThreeDS2RequestData.php b/src/Adyen/Model/Payment/ThreeDS2RequestData.php new file mode 100644 index 000000000..8ae72e10f --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDS2RequestData.php @@ -0,0 +1,1905 @@ + + */ +class ThreeDS2RequestData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS2RequestData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acctInfo' => '\Adyen\Model\Payment\AcctInfo', + 'acctType' => 'string', + 'acquirerBIN' => 'string', + 'acquirerMerchantID' => 'string', + 'addrMatch' => 'string', + 'authenticationOnly' => 'bool', + 'challengeIndicator' => 'string', + 'deviceChannel' => 'string', + 'deviceRenderOptions' => '\Adyen\Model\Payment\DeviceRenderOptions', + 'homePhone' => '\Adyen\Model\Payment\Phone', + 'mcc' => 'string', + 'merchantName' => 'string', + 'messageVersion' => 'string', + 'mobilePhone' => '\Adyen\Model\Payment\Phone', + 'notificationURL' => 'string', + 'payTokenInd' => 'bool', + 'paymentAuthenticationUseCase' => 'string', + 'purchaseInstalData' => 'string', + 'recurringExpiry' => 'string', + 'recurringFrequency' => 'string', + 'sdkAppID' => 'string', + 'sdkEncData' => 'string', + 'sdkEphemPubKey' => '\Adyen\Model\Payment\SDKEphemPubKey', + 'sdkMaxTimeout' => 'int', + 'sdkReferenceNumber' => 'string', + 'sdkTransID' => 'string', + 'sdkVersion' => 'string', + 'threeDSCompInd' => 'string', + 'threeDSRequestorAuthenticationInd' => 'string', + 'threeDSRequestorAuthenticationInfo' => '\Adyen\Model\Payment\ThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'string', + 'threeDSRequestorID' => 'string', + 'threeDSRequestorName' => 'string', + 'threeDSRequestorPriorAuthenticationInfo' => '\Adyen\Model\Payment\ThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'string', + 'transType' => 'string', + 'transactionType' => 'string', + 'whiteListStatus' => 'string', + 'workPhone' => '\Adyen\Model\Payment\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, + 'deviceChannel' => 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, + 'sdkEncData' => null, + 'sdkEphemPubKey' => null, + 'sdkMaxTimeout' => 'int32', + 'sdkReferenceNumber' => null, + 'sdkTransID' => null, + 'sdkVersion' => 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, + 'deviceChannel' => 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, + 'sdkEncData' => false, + 'sdkEphemPubKey' => false, + 'sdkMaxTimeout' => true, + 'sdkReferenceNumber' => false, + 'sdkTransID' => false, + 'sdkVersion' => 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', + 'deviceChannel' => 'deviceChannel', + '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', + 'sdkEncData' => 'sdkEncData', + 'sdkEphemPubKey' => 'sdkEphemPubKey', + 'sdkMaxTimeout' => 'sdkMaxTimeout', + 'sdkReferenceNumber' => 'sdkReferenceNumber', + 'sdkTransID' => 'sdkTransID', + 'sdkVersion' => 'sdkVersion', + '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', + 'deviceChannel' => 'setDeviceChannel', + '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', + 'sdkEncData' => 'setSdkEncData', + 'sdkEphemPubKey' => 'setSdkEphemPubKey', + 'sdkMaxTimeout' => 'setSdkMaxTimeout', + 'sdkReferenceNumber' => 'setSdkReferenceNumber', + 'sdkTransID' => 'setSdkTransID', + 'sdkVersion' => 'setSdkVersion', + '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', + 'deviceChannel' => 'getDeviceChannel', + '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', + 'sdkEncData' => 'getSdkEncData', + 'sdkEphemPubKey' => 'getSdkEphemPubKey', + 'sdkMaxTimeout' => 'getSdkMaxTimeout', + 'sdkReferenceNumber' => 'getSdkReferenceNumber', + 'sdkTransID' => 'getSdkTransID', + 'sdkVersion' => 'getSdkVersion', + '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('deviceChannel', $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('sdkEncData', $data ?? [], null); + $this->setIfExists('sdkEphemPubKey', $data ?? [], null); + $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkReferenceNumber', $data ?? [], null); + $this->setIfExists('sdkTransID', $data ?? [], null); + $this->setIfExists('sdkVersion', $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) + ); + } + + if ($this->container['deviceChannel'] === null) { + $invalidProperties[] = "'deviceChannel' can't be null"; + } + $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\Payment\AcctInfo|null + */ + public function getAcctInfo() + { + return $this->container['acctInfo']; + } + + /** + * Sets acctInfo + * + * @param \Adyen\Model\Payment\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 deviceChannel + * + * @return string + */ + public function getDeviceChannel() + { + return $this->container['deviceChannel']; + } + + /** + * Sets deviceChannel + * + * @param string $deviceChannel The environment of the shopper. Allowed values: * `app` * `browser` + * + * @return self + */ + public function setDeviceChannel($deviceChannel) + { + if (is_null($deviceChannel)) { + throw new \InvalidArgumentException('non-nullable deviceChannel cannot be null'); + } + $this->container['deviceChannel'] = $deviceChannel; + + return $this; + } + + /** + * Gets deviceRenderOptions + * + * @return \Adyen\Model\Payment\DeviceRenderOptions|null + */ + public function getDeviceRenderOptions() + { + return $this->container['deviceRenderOptions']; + } + + /** + * Sets deviceRenderOptions + * + * @param \Adyen\Model\Payment\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\Payment\Phone|null + */ + public function getHomePhone() + { + return $this->container['homePhone']; + } + + /** + * Sets homePhone + * + * @param \Adyen\Model\Payment\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\Payment\Phone|null + */ + public function getMobilePhone() + { + return $this->container['mobilePhone']; + } + + /** + * Sets mobilePhone + * + * @param \Adyen\Model\Payment\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. Required for `deviceChannel` set to **app**. + * + * @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 sdkEncData + * + * @return string|null + */ + public function getSdkEncData() + { + return $this->container['sdkEncData']; + } + + /** + * Sets sdkEncData + * + * @param string|null $sdkEncData The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. + * + * @return self + */ + public function setSdkEncData($sdkEncData) + { + if (is_null($sdkEncData)) { + throw new \InvalidArgumentException('non-nullable sdkEncData cannot be null'); + } + $this->container['sdkEncData'] = $sdkEncData; + + return $this; + } + + /** + * Gets sdkEphemPubKey + * + * @return \Adyen\Model\Payment\SDKEphemPubKey|null + */ + public function getSdkEphemPubKey() + { + return $this->container['sdkEphemPubKey']; + } + + /** + * Sets sdkEphemPubKey + * + * @param \Adyen\Model\Payment\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. Only for `deviceChannel` set to **app**. + * + * @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. Only for `deviceChannel` set to **app**. + * + * @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 sdkVersion + * + * @return string|null + */ + public function getSdkVersion() + { + return $this->container['sdkVersion']; + } + + /** + * Sets sdkVersion + * + * @param string|null $sdkVersion Version of the 3D Secure 2 mobile SDK. Only for `deviceChannel` set to **app**. + * + * @return self + */ + public function setSdkVersion($sdkVersion) + { + if (is_null($sdkVersion)) { + throw new \InvalidArgumentException('non-nullable sdkVersion cannot be null'); + } + $this->container['sdkVersion'] = $sdkVersion; + + 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\Payment\ThreeDSRequestorAuthenticationInfo|null + */ + public function getThreeDSRequestorAuthenticationInfo() + { + return $this->container['threeDSRequestorAuthenticationInfo']; + } + + /** + * Sets threeDSRequestorAuthenticationInfo + * + * @param \Adyen\Model\Payment\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\Payment\ThreeDSRequestorPriorAuthenticationInfo|null + */ + public function getThreeDSRequestorPriorAuthenticationInfo() + { + return $this->container['threeDSRequestorPriorAuthenticationInfo']; + } + + /** + * Sets threeDSRequestorPriorAuthenticationInfo + * + * @param \Adyen\Model\Payment\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\Payment\Phone|null + */ + public function getWorkPhone() + { + return $this->container['workPhone']; + } + + /** + * Sets workPhone + * + * @param \Adyen\Model\Payment\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/Payment/ThreeDS2Result.php b/src/Adyen/Model/Payment/ThreeDS2Result.php new file mode 100644 index 000000000..ada423b1f --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDS2Result.php @@ -0,0 +1,947 @@ + + */ +class ThreeDS2Result implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS2Result'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'authenticationValue' => 'string', + 'cavvAlgorithm' => 'string', + 'challengeCancel' => 'string', + 'dsTransID' => 'string', + 'eci' => 'string', + 'exemptionIndicator' => 'string', + 'messageVersion' => 'string', + 'riskScore' => 'string', + 'threeDSRequestorChallengeInd' => 'string', + 'threeDSServerTransID' => 'string', + 'timestamp' => 'string', + 'transStatus' => 'string', + 'transStatusReason' => 'string', + 'whiteListStatus' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'authenticationValue' => null, + 'cavvAlgorithm' => null, + 'challengeCancel' => null, + 'dsTransID' => null, + 'eci' => null, + 'exemptionIndicator' => null, + 'messageVersion' => null, + 'riskScore' => null, + 'threeDSRequestorChallengeInd' => null, + 'threeDSServerTransID' => null, + 'timestamp' => null, + 'transStatus' => null, + 'transStatusReason' => null, + 'whiteListStatus' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'authenticationValue' => false, + 'cavvAlgorithm' => false, + 'challengeCancel' => false, + 'dsTransID' => false, + 'eci' => false, + 'exemptionIndicator' => false, + 'messageVersion' => false, + 'riskScore' => false, + 'threeDSRequestorChallengeInd' => false, + 'threeDSServerTransID' => false, + 'timestamp' => false, + 'transStatus' => false, + 'transStatusReason' => false, + 'whiteListStatus' => 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 = [ + 'authenticationValue' => 'authenticationValue', + 'cavvAlgorithm' => 'cavvAlgorithm', + 'challengeCancel' => 'challengeCancel', + 'dsTransID' => 'dsTransID', + 'eci' => 'eci', + 'exemptionIndicator' => 'exemptionIndicator', + 'messageVersion' => 'messageVersion', + 'riskScore' => 'riskScore', + 'threeDSRequestorChallengeInd' => 'threeDSRequestorChallengeInd', + 'threeDSServerTransID' => 'threeDSServerTransID', + 'timestamp' => 'timestamp', + 'transStatus' => 'transStatus', + 'transStatusReason' => 'transStatusReason', + 'whiteListStatus' => 'whiteListStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authenticationValue' => 'setAuthenticationValue', + 'cavvAlgorithm' => 'setCavvAlgorithm', + 'challengeCancel' => 'setChallengeCancel', + 'dsTransID' => 'setDsTransID', + 'eci' => 'setEci', + 'exemptionIndicator' => 'setExemptionIndicator', + 'messageVersion' => 'setMessageVersion', + 'riskScore' => 'setRiskScore', + 'threeDSRequestorChallengeInd' => 'setThreeDSRequestorChallengeInd', + 'threeDSServerTransID' => 'setThreeDSServerTransID', + 'timestamp' => 'setTimestamp', + 'transStatus' => 'setTransStatus', + 'transStatusReason' => 'setTransStatusReason', + 'whiteListStatus' => 'setWhiteListStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authenticationValue' => 'getAuthenticationValue', + 'cavvAlgorithm' => 'getCavvAlgorithm', + 'challengeCancel' => 'getChallengeCancel', + 'dsTransID' => 'getDsTransID', + 'eci' => 'getEci', + 'exemptionIndicator' => 'getExemptionIndicator', + 'messageVersion' => 'getMessageVersion', + 'riskScore' => 'getRiskScore', + 'threeDSRequestorChallengeInd' => 'getThreeDSRequestorChallengeInd', + 'threeDSServerTransID' => 'getThreeDSServerTransID', + 'timestamp' => 'getTimestamp', + 'transStatus' => 'getTransStatus', + 'transStatusReason' => 'getTransStatusReason', + 'whiteListStatus' => 'getWhiteListStatus' + ]; + + /** + * 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 CHALLENGE_CANCEL__01 = '01'; + public const CHALLENGE_CANCEL__02 = '02'; + public const CHALLENGE_CANCEL__03 = '03'; + public const CHALLENGE_CANCEL__04 = '04'; + public const CHALLENGE_CANCEL__05 = '05'; + public const CHALLENGE_CANCEL__06 = '06'; + public const CHALLENGE_CANCEL__07 = '07'; + 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 + * + * @return string[] + */ + public function getChallengeCancelAllowableValues() + { + return [ + self::CHALLENGE_CANCEL__01, + self::CHALLENGE_CANCEL__02, + self::CHALLENGE_CANCEL__03, + self::CHALLENGE_CANCEL__04, + self::CHALLENGE_CANCEL__05, + self::CHALLENGE_CANCEL__06, + self::CHALLENGE_CANCEL__07, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExemptionIndicatorAllowableValues() + { + return [ + self::EXEMPTION_INDICATOR_LOW_VALUE, + self::EXEMPTION_INDICATOR_SECURE_CORPORATE, + self::EXEMPTION_INDICATOR_TRUSTED_BENEFICIARY, + self::EXEMPTION_INDICATOR_TRANSACTION_RISK_ANALYSIS, + ]; + } + /** + * 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, + ]; + } + /** + * 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('authenticationValue', $data ?? [], null); + $this->setIfExists('cavvAlgorithm', $data ?? [], null); + $this->setIfExists('challengeCancel', $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); + $this->setIfExists('transStatusReason', $data ?? [], null); + $this->setIfExists('whiteListStatus', $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->getChallengeCancelAllowableValues(); + if (!is_null($this->container['challengeCancel']) && !in_array($this->container['challengeCancel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'challengeCancel', must be one of '%s'", + $this->container['challengeCancel'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getExemptionIndicatorAllowableValues(); + if (!is_null($this->container['exemptionIndicator']) && !in_array($this->container['exemptionIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'exemptionIndicator', must be one of '%s'", + $this->container['exemptionIndicator'], + 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) + ); + } + + 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 authenticationValue + * + * @return string|null + */ + public function getAuthenticationValue() + { + return $this->container['authenticationValue']; + } + + /** + * Sets authenticationValue + * + * @param string|null $authenticationValue The `authenticationValue` value as defined in the 3D Secure 2 specification. + * + * @return self + */ + public function setAuthenticationValue($authenticationValue) + { + if (is_null($authenticationValue)) { + throw new \InvalidArgumentException('non-nullable authenticationValue cannot be null'); + } + $this->container['authenticationValue'] = $authenticationValue; + + return $this; + } + + /** + * Gets cavvAlgorithm + * + * @return string|null + */ + public function getCavvAlgorithm() + { + return $this->container['cavvAlgorithm']; + } + + /** + * Sets cavvAlgorithm + * + * @param string|null $cavvAlgorithm The algorithm used by the ACS to calculate the authentication value, only for Cartes Bancaires integrations. + * + * @return self + */ + public function setCavvAlgorithm($cavvAlgorithm) + { + if (is_null($cavvAlgorithm)) { + throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); + } + $this->container['cavvAlgorithm'] = $cavvAlgorithm; + + return $this; + } + + /** + * Gets challengeCancel + * + * @return string|null + */ + public function getChallengeCancel() + { + return $this->container['challengeCancel']; + } + + /** + * Sets challengeCancel + * + * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * + * @return self + */ + public function setChallengeCancel($challengeCancel) + { + if (is_null($challengeCancel)) { + throw new \InvalidArgumentException('non-nullable challengeCancel cannot be null'); + } + $allowedValues = $this->getChallengeCancelAllowableValues(); + if (!in_array($challengeCancel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'challengeCancel', must be one of '%s'", + $challengeCancel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['challengeCancel'] = $challengeCancel; + + return $this; + } + + /** + * Gets dsTransID + * + * @return string|null + */ + public function getDsTransID() + { + return $this->container['dsTransID']; + } + + /** + * Sets dsTransID + * + * @param string|null $dsTransID The `dsTransID` value as defined in the 3D Secure 2 specification. + * + * @return self + */ + public function setDsTransID($dsTransID) + { + if (is_null($dsTransID)) { + throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); + } + $this->container['dsTransID'] = $dsTransID; + + return $this; + } + + /** + * Gets eci + * + * @return string|null + */ + public function getEci() + { + return $this->container['eci']; + } + + /** + * Sets eci + * + * @param string|null $eci The `eci` value as defined in the 3D Secure 2 specification. + * + * @return self + */ + public function setEci($eci) + { + if (is_null($eci)) { + throw new \InvalidArgumentException('non-nullable eci cannot be null'); + } + $this->container['eci'] = $eci; + + return $this; + } + + /** + * Gets exemptionIndicator + * + * @return string|null + */ + public function getExemptionIndicator() + { + return $this->container['exemptionIndicator']; + } + + /** + * Sets exemptionIndicator + * + * @param string|null $exemptionIndicator Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` + * + * @return self + */ + public function setExemptionIndicator($exemptionIndicator) + { + if (is_null($exemptionIndicator)) { + throw new \InvalidArgumentException('non-nullable exemptionIndicator cannot be null'); + } + $allowedValues = $this->getExemptionIndicatorAllowableValues(); + if (!in_array($exemptionIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'exemptionIndicator', must be one of '%s'", + $exemptionIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['exemptionIndicator'] = $exemptionIndicator; + + return $this; + } + + /** + * Gets messageVersion + * + * @return string|null + */ + public function getMessageVersion() + { + return $this->container['messageVersion']; + } + + /** + * Sets messageVersion + * + * @param string|null $messageVersion The `messageVersion` value as defined in the 3D Secure 2 specification. + * + * @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 riskScore + * + * @return string|null + */ + public function getRiskScore() + { + return $this->container['riskScore']; + } + + /** + * Sets riskScore + * + * @param string|null $riskScore Risk score calculated by Cartes Bancaires Directory Server (DS). + * + * @return self + */ + public function setRiskScore($riskScore) + { + if (is_null($riskScore)) { + throw new \InvalidArgumentException('non-nullable riskScore cannot be null'); + } + $this->container['riskScore'] = $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 + * + * @return string|null + */ + public function getThreeDSServerTransID() + { + return $this->container['threeDSServerTransID']; + } + + /** + * Sets threeDSServerTransID + * + * @param string|null $threeDSServerTransID The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. + * + * @return self + */ + public function setThreeDSServerTransID($threeDSServerTransID) + { + if (is_null($threeDSServerTransID)) { + throw new \InvalidArgumentException('non-nullable threeDSServerTransID cannot be null'); + } + $this->container['threeDSServerTransID'] = $threeDSServerTransID; + + return $this; + } + + /** + * Gets timestamp + * + * @return string|null + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param string|null $timestamp The `timestamp` value of the 3D Secure 2 authentication. + * + * @return self + */ + public function setTimestamp($timestamp) + { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets transStatus + * + * @return string|null + */ + public function getTransStatus() + { + return $this->container['transStatus']; + } + + /** + * Sets transStatus + * + * @param string|null $transStatus The `transStatus` value as defined in the 3D Secure 2 specification. + * + * @return self + */ + public function setTransStatus($transStatus) + { + if (is_null($transStatus)) { + throw new \InvalidArgumentException('non-nullable transStatus cannot be null'); + } + $this->container['transStatus'] = $transStatus; + + return $this; + } + + /** + * Gets transStatusReason + * + * @return string|null + */ + public function getTransStatusReason() + { + return $this->container['transStatusReason']; + } + + /** + * Sets transStatusReason + * + * @param string|null $transStatusReason Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). + * + * @return self + */ + public function setTransStatusReason($transStatusReason) + { + if (is_null($transStatusReason)) { + throw new \InvalidArgumentException('non-nullable transStatusReason cannot be null'); + } + $this->container['transStatusReason'] = $transStatusReason; + + return $this; + } + + /** + * Gets whiteListStatus + * + * @return string|null + */ + public function getWhiteListStatus() + { + return $this->container['whiteListStatus']; + } + + /** + * Sets whiteListStatus + * + * @param string|null $whiteListStatus The `whiteListStatus` value as defined in the 3D Secure 2 specification. + * + * @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; + } + /** + * 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/Payment/ThreeDS2ResultRequest.php b/src/Adyen/Model/Payment/ThreeDS2ResultRequest.php new file mode 100644 index 000000000..a39c313fa --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDS2ResultRequest.php @@ -0,0 +1,424 @@ + + */ +class ThreeDS2ResultRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS2ResultRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantAccount' => 'string', + 'pspReference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantAccount' => null, + 'pspReference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantAccount' => false, + 'pspReference' => 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 = [ + 'merchantAccount' => 'merchantAccount', + 'pspReference' => 'pspReference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantAccount' => 'setMerchantAccount', + 'pspReference' => 'setPspReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantAccount' => 'getMerchantAccount', + 'pspReference' => 'getPspReference' + ]; + + /** + * 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('merchantAccount', $data ?? [], null); + $this->setIfExists('pspReference', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' can't be null"; + } + if ($this->container['pspReference'] === null) { + $invalidProperties[] = "'pspReference' 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 merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets pspReference + * + * @return string + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string $pspReference The pspReference returned in the /authorise call. + * + * @return self + */ + public function setPspReference($pspReference) + { + if (is_null($pspReference)) { + throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); + } + $this->container['pspReference'] = $pspReference; + + 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/Payment/ThreeDS2ResultResponse.php b/src/Adyen/Model/Payment/ThreeDS2ResultResponse.php new file mode 100644 index 000000000..d1f7da757 --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDS2ResultResponse.php @@ -0,0 +1,384 @@ + + */ +class ThreeDS2ResultResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS2ResultResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'threeDS2Result' => '\Adyen\Model\Payment\ThreeDS2Result' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'threeDS2Result' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'threeDS2Result' => 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 = [ + 'threeDS2Result' => 'threeDS2Result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'threeDS2Result' => 'setThreeDS2Result' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'threeDS2Result' => 'getThreeDS2Result' + ]; + + /** + * 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('threeDS2Result', $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 threeDS2Result + * + * @return \Adyen\Model\Payment\ThreeDS2Result|null + */ + public function getThreeDS2Result() + { + return $this->container['threeDS2Result']; + } + + /** + * Sets threeDS2Result + * + * @param \Adyen\Model\Payment\ThreeDS2Result|null $threeDS2Result threeDS2Result + * + * @return self + */ + public function setThreeDS2Result($threeDS2Result) + { + if (is_null($threeDS2Result)) { + throw new \InvalidArgumentException('non-nullable threeDS2Result cannot be null'); + } + $this->container['threeDS2Result'] = $threeDS2Result; + + 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/Payment/ThreeDSRequestorAuthenticationInfo.php b/src/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.php new file mode 100644 index 000000000..f568fdc6e --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.php @@ -0,0 +1,493 @@ + + */ +class ThreeDSRequestorAuthenticationInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDSRequestorAuthenticationInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'threeDSReqAuthData' => 'string', + 'threeDSReqAuthMethod' => 'string', + 'threeDSReqAuthTimestamp' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'threeDSReqAuthData' => null, + 'threeDSReqAuthMethod' => null, + 'threeDSReqAuthTimestamp' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'threeDSReqAuthData' => false, + 'threeDSReqAuthMethod' => false, + 'threeDSReqAuthTimestamp' => 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 = [ + 'threeDSReqAuthData' => 'threeDSReqAuthData', + 'threeDSReqAuthMethod' => 'threeDSReqAuthMethod', + 'threeDSReqAuthTimestamp' => 'threeDSReqAuthTimestamp' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'threeDSReqAuthData' => 'setThreeDSReqAuthData', + 'threeDSReqAuthMethod' => 'setThreeDSReqAuthMethod', + 'threeDSReqAuthTimestamp' => 'setThreeDSReqAuthTimestamp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'threeDSReqAuthData' => 'getThreeDSReqAuthData', + 'threeDSReqAuthMethod' => 'getThreeDSReqAuthMethod', + 'threeDSReqAuthTimestamp' => 'getThreeDSReqAuthTimestamp' + ]; + + /** + * 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 THREE_DS_REQ_AUTH_METHOD__01 = '01'; + public const THREE_DS_REQ_AUTH_METHOD__02 = '02'; + public const THREE_DS_REQ_AUTH_METHOD__03 = '03'; + public const THREE_DS_REQ_AUTH_METHOD__04 = '04'; + public const THREE_DS_REQ_AUTH_METHOD__05 = '05'; + public const THREE_DS_REQ_AUTH_METHOD__06 = '06'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getThreeDSReqAuthMethodAllowableValues() + { + return [ + self::THREE_DS_REQ_AUTH_METHOD__01, + self::THREE_DS_REQ_AUTH_METHOD__02, + self::THREE_DS_REQ_AUTH_METHOD__03, + self::THREE_DS_REQ_AUTH_METHOD__04, + self::THREE_DS_REQ_AUTH_METHOD__05, + self::THREE_DS_REQ_AUTH_METHOD__06, + ]; + } + /** + * 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('threeDSReqAuthData', $data ?? [], null); + $this->setIfExists('threeDSReqAuthMethod', $data ?? [], null); + $this->setIfExists('threeDSReqAuthTimestamp', $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->getThreeDSReqAuthMethodAllowableValues(); + if (!is_null($this->container['threeDSReqAuthMethod']) && !in_array($this->container['threeDSReqAuthMethod'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'threeDSReqAuthMethod', must be one of '%s'", + $this->container['threeDSReqAuthMethod'], + 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 threeDSReqAuthData + * + * @return string|null + */ + public function getThreeDSReqAuthData() + { + return $this->container['threeDSReqAuthData']; + } + + /** + * Sets threeDSReqAuthData + * + * @param string|null $threeDSReqAuthData Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. + * + * @return self + */ + public function setThreeDSReqAuthData($threeDSReqAuthData) + { + if (is_null($threeDSReqAuthData)) { + throw new \InvalidArgumentException('non-nullable threeDSReqAuthData cannot be null'); + } + $this->container['threeDSReqAuthData'] = $threeDSReqAuthData; + + return $this; + } + + /** + * Gets threeDSReqAuthMethod + * + * @return string|null + */ + public function getThreeDSReqAuthMethod() + { + return $this->container['threeDSReqAuthMethod']; + } + + /** + * Sets threeDSReqAuthMethod + * + * @param string|null $threeDSReqAuthMethod Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator. + * + * @return self + */ + public function setThreeDSReqAuthMethod($threeDSReqAuthMethod) + { + if (is_null($threeDSReqAuthMethod)) { + throw new \InvalidArgumentException('non-nullable threeDSReqAuthMethod cannot be null'); + } + $allowedValues = $this->getThreeDSReqAuthMethodAllowableValues(); + if (!in_array($threeDSReqAuthMethod, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'threeDSReqAuthMethod', must be one of '%s'", + $threeDSReqAuthMethod, + implode("', '", $allowedValues) + ) + ); + } + $this->container['threeDSReqAuthMethod'] = $threeDSReqAuthMethod; + + return $this; + } + + /** + * Gets threeDSReqAuthTimestamp + * + * @return string|null + */ + public function getThreeDSReqAuthTimestamp() + { + return $this->container['threeDSReqAuthTimestamp']; + } + + /** + * Sets threeDSReqAuthTimestamp + * + * @param string|null $threeDSReqAuthTimestamp Date and time in UTC of the cardholder authentication. Format: YYYYMMDDHHMM + * + * @return self + */ + public function setThreeDSReqAuthTimestamp($threeDSReqAuthTimestamp) + { + if (is_null($threeDSReqAuthTimestamp)) { + throw new \InvalidArgumentException('non-nullable threeDSReqAuthTimestamp cannot be null'); + } + $this->container['threeDSReqAuthTimestamp'] = $threeDSReqAuthTimestamp; + + 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/Payment/ThreeDSRequestorPriorAuthenticationInfo.php b/src/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.php new file mode 100644 index 000000000..3063eef2b --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.php @@ -0,0 +1,523 @@ + + */ +class ThreeDSRequestorPriorAuthenticationInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDSRequestorPriorAuthenticationInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'threeDSReqPriorAuthData' => 'string', + 'threeDSReqPriorAuthMethod' => 'string', + 'threeDSReqPriorAuthTimestamp' => 'string', + 'threeDSReqPriorRef' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'threeDSReqPriorAuthData' => null, + 'threeDSReqPriorAuthMethod' => null, + 'threeDSReqPriorAuthTimestamp' => null, + 'threeDSReqPriorRef' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'threeDSReqPriorAuthData' => false, + 'threeDSReqPriorAuthMethod' => false, + 'threeDSReqPriorAuthTimestamp' => false, + 'threeDSReqPriorRef' => 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 = [ + 'threeDSReqPriorAuthData' => 'threeDSReqPriorAuthData', + 'threeDSReqPriorAuthMethod' => 'threeDSReqPriorAuthMethod', + 'threeDSReqPriorAuthTimestamp' => 'threeDSReqPriorAuthTimestamp', + 'threeDSReqPriorRef' => 'threeDSReqPriorRef' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'threeDSReqPriorAuthData' => 'setThreeDSReqPriorAuthData', + 'threeDSReqPriorAuthMethod' => 'setThreeDSReqPriorAuthMethod', + 'threeDSReqPriorAuthTimestamp' => 'setThreeDSReqPriorAuthTimestamp', + 'threeDSReqPriorRef' => 'setThreeDSReqPriorRef' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'threeDSReqPriorAuthData' => 'getThreeDSReqPriorAuthData', + 'threeDSReqPriorAuthMethod' => 'getThreeDSReqPriorAuthMethod', + 'threeDSReqPriorAuthTimestamp' => 'getThreeDSReqPriorAuthTimestamp', + 'threeDSReqPriorRef' => 'getThreeDSReqPriorRef' + ]; + + /** + * 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 THREE_DS_REQ_PRIOR_AUTH_METHOD__01 = '01'; + public const THREE_DS_REQ_PRIOR_AUTH_METHOD__02 = '02'; + public const THREE_DS_REQ_PRIOR_AUTH_METHOD__03 = '03'; + public const THREE_DS_REQ_PRIOR_AUTH_METHOD__04 = '04'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getThreeDSReqPriorAuthMethodAllowableValues() + { + return [ + self::THREE_DS_REQ_PRIOR_AUTH_METHOD__01, + self::THREE_DS_REQ_PRIOR_AUTH_METHOD__02, + self::THREE_DS_REQ_PRIOR_AUTH_METHOD__03, + self::THREE_DS_REQ_PRIOR_AUTH_METHOD__04, + ]; + } + /** + * 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('threeDSReqPriorAuthData', $data ?? [], null); + $this->setIfExists('threeDSReqPriorAuthMethod', $data ?? [], null); + $this->setIfExists('threeDSReqPriorAuthTimestamp', $data ?? [], null); + $this->setIfExists('threeDSReqPriorRef', $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->getThreeDSReqPriorAuthMethodAllowableValues(); + if (!is_null($this->container['threeDSReqPriorAuthMethod']) && !in_array($this->container['threeDSReqPriorAuthMethod'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'threeDSReqPriorAuthMethod', must be one of '%s'", + $this->container['threeDSReqPriorAuthMethod'], + 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 threeDSReqPriorAuthData + * + * @return string|null + */ + public function getThreeDSReqPriorAuthData() + { + return $this->container['threeDSReqPriorAuthData']; + } + + /** + * Sets threeDSReqPriorAuthData + * + * @param string|null $threeDSReqPriorAuthData Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. + * + * @return self + */ + public function setThreeDSReqPriorAuthData($threeDSReqPriorAuthData) + { + if (is_null($threeDSReqPriorAuthData)) { + throw new \InvalidArgumentException('non-nullable threeDSReqPriorAuthData cannot be null'); + } + $this->container['threeDSReqPriorAuthData'] = $threeDSReqPriorAuthData; + + return $this; + } + + /** + * Gets threeDSReqPriorAuthMethod + * + * @return string|null + */ + public function getThreeDSReqPriorAuthMethod() + { + return $this->container['threeDSReqPriorAuthMethod']; + } + + /** + * Sets threeDSReqPriorAuthMethod + * + * @param string|null $threeDSReqPriorAuthMethod Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods. + * + * @return self + */ + public function setThreeDSReqPriorAuthMethod($threeDSReqPriorAuthMethod) + { + if (is_null($threeDSReqPriorAuthMethod)) { + throw new \InvalidArgumentException('non-nullable threeDSReqPriorAuthMethod cannot be null'); + } + $allowedValues = $this->getThreeDSReqPriorAuthMethodAllowableValues(); + if (!in_array($threeDSReqPriorAuthMethod, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'threeDSReqPriorAuthMethod', must be one of '%s'", + $threeDSReqPriorAuthMethod, + implode("', '", $allowedValues) + ) + ); + } + $this->container['threeDSReqPriorAuthMethod'] = $threeDSReqPriorAuthMethod; + + return $this; + } + + /** + * Gets threeDSReqPriorAuthTimestamp + * + * @return string|null + */ + public function getThreeDSReqPriorAuthTimestamp() + { + return $this->container['threeDSReqPriorAuthTimestamp']; + } + + /** + * Sets threeDSReqPriorAuthTimestamp + * + * @param string|null $threeDSReqPriorAuthTimestamp Date and time in UTC of the prior cardholder authentication. Format: YYYYMMDDHHMM + * + * @return self + */ + public function setThreeDSReqPriorAuthTimestamp($threeDSReqPriorAuthTimestamp) + { + if (is_null($threeDSReqPriorAuthTimestamp)) { + throw new \InvalidArgumentException('non-nullable threeDSReqPriorAuthTimestamp cannot be null'); + } + $this->container['threeDSReqPriorAuthTimestamp'] = $threeDSReqPriorAuthTimestamp; + + return $this; + } + + /** + * Gets threeDSReqPriorRef + * + * @return string|null + */ + public function getThreeDSReqPriorRef() + { + return $this->container['threeDSReqPriorRef']; + } + + /** + * Sets threeDSReqPriorRef + * + * @param string|null $threeDSReqPriorRef This data element provides additional information to the ACS to determine the best approach for handing a request. This data element contains an ACS Transaction ID for a prior authenticated transaction. For example, the first recurring transaction that was authenticated with the cardholder. Length: 30 characters. + * + * @return self + */ + public function setThreeDSReqPriorRef($threeDSReqPriorRef) + { + if (is_null($threeDSReqPriorRef)) { + throw new \InvalidArgumentException('non-nullable threeDSReqPriorRef cannot be null'); + } + $this->container['threeDSReqPriorRef'] = $threeDSReqPriorRef; + + 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/Payment/ThreeDSecureData.php b/src/Adyen/Model/Payment/ThreeDSecureData.php new file mode 100644 index 000000000..0cb7dfcce --- /dev/null +++ b/src/Adyen/Model/Payment/ThreeDSecureData.php @@ -0,0 +1,883 @@ + + */ +class ThreeDSecureData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDSecureData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'authenticationResponse' => 'string', + 'cavv' => 'string', + 'cavvAlgorithm' => 'string', + 'challengeCancel' => 'string', + 'directoryResponse' => 'string', + 'dsTransID' => 'string', + 'eci' => 'string', + 'riskScore' => 'string', + 'threeDSVersion' => 'string', + 'tokenAuthenticationVerificationValue' => 'string', + 'transStatusReason' => 'string', + 'xid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'authenticationResponse' => null, + 'cavv' => 'byte', + 'cavvAlgorithm' => null, + 'challengeCancel' => null, + 'directoryResponse' => null, + 'dsTransID' => null, + 'eci' => null, + 'riskScore' => null, + 'threeDSVersion' => null, + 'tokenAuthenticationVerificationValue' => 'byte', + 'transStatusReason' => null, + 'xid' => 'byte' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'authenticationResponse' => false, + 'cavv' => false, + 'cavvAlgorithm' => false, + 'challengeCancel' => false, + 'directoryResponse' => false, + 'dsTransID' => false, + 'eci' => false, + 'riskScore' => false, + 'threeDSVersion' => false, + 'tokenAuthenticationVerificationValue' => false, + 'transStatusReason' => false, + 'xid' => 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 = [ + 'authenticationResponse' => 'authenticationResponse', + 'cavv' => 'cavv', + 'cavvAlgorithm' => 'cavvAlgorithm', + 'challengeCancel' => 'challengeCancel', + 'directoryResponse' => 'directoryResponse', + 'dsTransID' => 'dsTransID', + 'eci' => 'eci', + 'riskScore' => 'riskScore', + 'threeDSVersion' => 'threeDSVersion', + 'tokenAuthenticationVerificationValue' => 'tokenAuthenticationVerificationValue', + 'transStatusReason' => 'transStatusReason', + 'xid' => 'xid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authenticationResponse' => 'setAuthenticationResponse', + 'cavv' => 'setCavv', + 'cavvAlgorithm' => 'setCavvAlgorithm', + 'challengeCancel' => 'setChallengeCancel', + 'directoryResponse' => 'setDirectoryResponse', + 'dsTransID' => 'setDsTransID', + 'eci' => 'setEci', + 'riskScore' => 'setRiskScore', + 'threeDSVersion' => 'setThreeDSVersion', + 'tokenAuthenticationVerificationValue' => 'setTokenAuthenticationVerificationValue', + 'transStatusReason' => 'setTransStatusReason', + 'xid' => 'setXid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authenticationResponse' => 'getAuthenticationResponse', + 'cavv' => 'getCavv', + 'cavvAlgorithm' => 'getCavvAlgorithm', + 'challengeCancel' => 'getChallengeCancel', + 'directoryResponse' => 'getDirectoryResponse', + 'dsTransID' => 'getDsTransID', + 'eci' => 'getEci', + 'riskScore' => 'getRiskScore', + 'threeDSVersion' => 'getThreeDSVersion', + 'tokenAuthenticationVerificationValue' => 'getTokenAuthenticationVerificationValue', + 'transStatusReason' => 'getTransStatusReason', + 'xid' => 'getXid' + ]; + + /** + * 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 AUTHENTICATION_RESPONSE_Y = 'Y'; + public const AUTHENTICATION_RESPONSE_N = 'N'; + public const AUTHENTICATION_RESPONSE_U = 'U'; + public const AUTHENTICATION_RESPONSE_A = 'A'; + public const CHALLENGE_CANCEL__01 = '01'; + public const CHALLENGE_CANCEL__02 = '02'; + public const CHALLENGE_CANCEL__03 = '03'; + public const CHALLENGE_CANCEL__04 = '04'; + public const CHALLENGE_CANCEL__05 = '05'; + public const CHALLENGE_CANCEL__06 = '06'; + public const CHALLENGE_CANCEL__07 = '07'; + public const DIRECTORY_RESPONSE_A = 'A'; + public const DIRECTORY_RESPONSE_C = 'C'; + public const DIRECTORY_RESPONSE_D = 'D'; + public const DIRECTORY_RESPONSE_I = 'I'; + public const DIRECTORY_RESPONSE_N = 'N'; + public const DIRECTORY_RESPONSE_R = 'R'; + public const DIRECTORY_RESPONSE_U = 'U'; + public const DIRECTORY_RESPONSE_Y = 'Y'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAuthenticationResponseAllowableValues() + { + return [ + self::AUTHENTICATION_RESPONSE_Y, + self::AUTHENTICATION_RESPONSE_N, + self::AUTHENTICATION_RESPONSE_U, + self::AUTHENTICATION_RESPONSE_A, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChallengeCancelAllowableValues() + { + return [ + self::CHALLENGE_CANCEL__01, + self::CHALLENGE_CANCEL__02, + self::CHALLENGE_CANCEL__03, + self::CHALLENGE_CANCEL__04, + self::CHALLENGE_CANCEL__05, + self::CHALLENGE_CANCEL__06, + self::CHALLENGE_CANCEL__07, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDirectoryResponseAllowableValues() + { + return [ + self::DIRECTORY_RESPONSE_A, + self::DIRECTORY_RESPONSE_C, + self::DIRECTORY_RESPONSE_D, + self::DIRECTORY_RESPONSE_I, + self::DIRECTORY_RESPONSE_N, + self::DIRECTORY_RESPONSE_R, + self::DIRECTORY_RESPONSE_U, + self::DIRECTORY_RESPONSE_Y, + ]; + } + /** + * 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('authenticationResponse', $data ?? [], null); + $this->setIfExists('cavv', $data ?? [], null); + $this->setIfExists('cavvAlgorithm', $data ?? [], null); + $this->setIfExists('challengeCancel', $data ?? [], null); + $this->setIfExists('directoryResponse', $data ?? [], null); + $this->setIfExists('dsTransID', $data ?? [], null); + $this->setIfExists('eci', $data ?? [], null); + $this->setIfExists('riskScore', $data ?? [], null); + $this->setIfExists('threeDSVersion', $data ?? [], null); + $this->setIfExists('tokenAuthenticationVerificationValue', $data ?? [], null); + $this->setIfExists('transStatusReason', $data ?? [], null); + $this->setIfExists('xid', $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->getAuthenticationResponseAllowableValues(); + if (!is_null($this->container['authenticationResponse']) && !in_array($this->container['authenticationResponse'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'authenticationResponse', must be one of '%s'", + $this->container['authenticationResponse'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChallengeCancelAllowableValues(); + if (!is_null($this->container['challengeCancel']) && !in_array($this->container['challengeCancel'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'challengeCancel', must be one of '%s'", + $this->container['challengeCancel'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDirectoryResponseAllowableValues(); + if (!is_null($this->container['directoryResponse']) && !in_array($this->container['directoryResponse'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'directoryResponse', must be one of '%s'", + $this->container['directoryResponse'], + 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 authenticationResponse + * + * @return string|null + */ + public function getAuthenticationResponse() + { + return $this->container['authenticationResponse']; + } + + /** + * Sets authenticationResponse + * + * @param string|null $authenticationResponse In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. + * + * @return self + */ + public function setAuthenticationResponse($authenticationResponse) + { + if (is_null($authenticationResponse)) { + throw new \InvalidArgumentException('non-nullable authenticationResponse cannot be null'); + } + $allowedValues = $this->getAuthenticationResponseAllowableValues(); + if (!in_array($authenticationResponse, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'authenticationResponse', must be one of '%s'", + $authenticationResponse, + implode("', '", $allowedValues) + ) + ); + } + $this->container['authenticationResponse'] = $authenticationResponse; + + return $this; + } + + /** + * Gets cavv + * + * @return string|null + */ + public function getCavv() + { + return $this->container['cavv']; + } + + /** + * Sets cavv + * + * @param string|null $cavv The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). + * + * @return self + */ + public function setCavv($cavv) + { + if (is_null($cavv)) { + throw new \InvalidArgumentException('non-nullable cavv cannot be null'); + } + $this->container['cavv'] = $cavv; + + return $this; + } + + /** + * Gets cavvAlgorithm + * + * @return string|null + */ + public function getCavvAlgorithm() + { + return $this->container['cavvAlgorithm']; + } + + /** + * Sets cavvAlgorithm + * + * @param string|null $cavvAlgorithm The CAVV algorithm used. Include this only for 3D Secure 1. + * + * @return self + */ + public function setCavvAlgorithm($cavvAlgorithm) + { + if (is_null($cavvAlgorithm)) { + throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); + } + $this->container['cavvAlgorithm'] = $cavvAlgorithm; + + return $this; + } + + /** + * Gets challengeCancel + * + * @return string|null + */ + public function getChallengeCancel() + { + return $this->container['challengeCancel']; + } + + /** + * Sets challengeCancel + * + * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * + * @return self + */ + public function setChallengeCancel($challengeCancel) + { + if (is_null($challengeCancel)) { + throw new \InvalidArgumentException('non-nullable challengeCancel cannot be null'); + } + $allowedValues = $this->getChallengeCancelAllowableValues(); + if (!in_array($challengeCancel, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'challengeCancel', must be one of '%s'", + $challengeCancel, + implode("', '", $allowedValues) + ) + ); + } + $this->container['challengeCancel'] = $challengeCancel; + + return $this; + } + + /** + * Gets directoryResponse + * + * @return string|null + */ + public function getDirectoryResponse() + { + return $this->container['directoryResponse']; + } + + /** + * Sets directoryResponse + * + * @param string|null $directoryResponse In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. + * + * @return self + */ + public function setDirectoryResponse($directoryResponse) + { + if (is_null($directoryResponse)) { + throw new \InvalidArgumentException('non-nullable directoryResponse cannot be null'); + } + $allowedValues = $this->getDirectoryResponseAllowableValues(); + if (!in_array($directoryResponse, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'directoryResponse', must be one of '%s'", + $directoryResponse, + implode("', '", $allowedValues) + ) + ); + } + $this->container['directoryResponse'] = $directoryResponse; + + return $this; + } + + /** + * Gets dsTransID + * + * @return string|null + */ + public function getDsTransID() + { + return $this->container['dsTransID']; + } + + /** + * Sets dsTransID + * + * @param string|null $dsTransID Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. + * + * @return self + */ + public function setDsTransID($dsTransID) + { + if (is_null($dsTransID)) { + throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); + } + $this->container['dsTransID'] = $dsTransID; + + return $this; + } + + /** + * Gets eci + * + * @return string|null + */ + public function getEci() + { + return $this->container['eci']; + } + + /** + * Sets eci + * + * @param string|null $eci The electronic commerce indicator. + * + * @return self + */ + public function setEci($eci) + { + if (is_null($eci)) { + throw new \InvalidArgumentException('non-nullable eci cannot be null'); + } + $this->container['eci'] = $eci; + + return $this; + } + + /** + * Gets riskScore + * + * @return string|null + */ + public function getRiskScore() + { + return $this->container['riskScore']; + } + + /** + * Sets riskScore + * + * @param string|null $riskScore Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations. + * + * @return self + */ + public function setRiskScore($riskScore) + { + if (is_null($riskScore)) { + throw new \InvalidArgumentException('non-nullable riskScore cannot be null'); + } + $this->container['riskScore'] = $riskScore; + + return $this; + } + + /** + * Gets threeDSVersion + * + * @return string|null + */ + public function getThreeDSVersion() + { + return $this->container['threeDSVersion']; + } + + /** + * Sets threeDSVersion + * + * @param string|null $threeDSVersion The version of the 3D Secure protocol. + * + * @return self + */ + public function setThreeDSVersion($threeDSVersion) + { + if (is_null($threeDSVersion)) { + throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); + } + $this->container['threeDSVersion'] = $threeDSVersion; + + return $this; + } + + /** + * Gets tokenAuthenticationVerificationValue + * + * @return string|null + */ + public function getTokenAuthenticationVerificationValue() + { + return $this->container['tokenAuthenticationVerificationValue']; + } + + /** + * Sets tokenAuthenticationVerificationValue + * + * @param string|null $tokenAuthenticationVerificationValue Network token authentication verification value (TAVV). The network token cryptogram. + * + * @return self + */ + public function setTokenAuthenticationVerificationValue($tokenAuthenticationVerificationValue) + { + if (is_null($tokenAuthenticationVerificationValue)) { + throw new \InvalidArgumentException('non-nullable tokenAuthenticationVerificationValue cannot be null'); + } + $this->container['tokenAuthenticationVerificationValue'] = $tokenAuthenticationVerificationValue; + + return $this; + } + + /** + * Gets transStatusReason + * + * @return string|null + */ + public function getTransStatusReason() + { + return $this->container['transStatusReason']; + } + + /** + * Sets transStatusReason + * + * @param string|null $transStatusReason Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). + * + * @return self + */ + public function setTransStatusReason($transStatusReason) + { + if (is_null($transStatusReason)) { + throw new \InvalidArgumentException('non-nullable transStatusReason cannot be null'); + } + $this->container['transStatusReason'] = $transStatusReason; + + return $this; + } + + /** + * Gets xid + * + * @return string|null + */ + public function getXid() + { + return $this->container['xid']; + } + + /** + * Sets xid + * + * @param string|null $xid Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). + * + * @return self + */ + public function setXid($xid) + { + if (is_null($xid)) { + throw new \InvalidArgumentException('non-nullable xid cannot be null'); + } + $this->container['xid'] = $xid; + + 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/Payment/VoidPendingRefundRequest.php b/src/Adyen/Model/Payment/VoidPendingRefundRequest.php new file mode 100644 index 000000000..4cee7d44b --- /dev/null +++ b/src/Adyen/Model/Payment/VoidPendingRefundRequest.php @@ -0,0 +1,727 @@ + + */ +class VoidPendingRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VoidPendingRefundRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'additionalData' => 'array', + 'merchantAccount' => 'string', + 'modificationAmount' => '\Adyen\Model\Payment\Amount', + 'mpiData' => '\Adyen\Model\Payment\ThreeDSecureData', + 'originalMerchantReference' => 'string', + 'originalReference' => 'string', + 'platformChargebackLogic' => '\Adyen\Model\Payment\PlatformChargebackLogic', + 'reference' => 'string', + 'splits' => '\Adyen\Model\Payment\Split[]', + 'tenderReference' => 'string', + 'uniqueTerminalId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'additionalData' => null, + 'merchantAccount' => null, + 'modificationAmount' => null, + 'mpiData' => null, + 'originalMerchantReference' => null, + 'originalReference' => null, + 'platformChargebackLogic' => null, + 'reference' => null, + 'splits' => null, + 'tenderReference' => null, + 'uniqueTerminalId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'additionalData' => false, + 'merchantAccount' => false, + 'modificationAmount' => false, + 'mpiData' => false, + 'originalMerchantReference' => false, + 'originalReference' => false, + 'platformChargebackLogic' => false, + 'reference' => false, + 'splits' => false, + 'tenderReference' => false, + 'uniqueTerminalId' => 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 = [ + 'additionalData' => 'additionalData', + 'merchantAccount' => 'merchantAccount', + 'modificationAmount' => 'modificationAmount', + 'mpiData' => 'mpiData', + 'originalMerchantReference' => 'originalMerchantReference', + 'originalReference' => 'originalReference', + 'platformChargebackLogic' => 'platformChargebackLogic', + 'reference' => 'reference', + 'splits' => 'splits', + 'tenderReference' => 'tenderReference', + 'uniqueTerminalId' => 'uniqueTerminalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'additionalData' => 'setAdditionalData', + 'merchantAccount' => 'setMerchantAccount', + 'modificationAmount' => 'setModificationAmount', + 'mpiData' => 'setMpiData', + 'originalMerchantReference' => 'setOriginalMerchantReference', + 'originalReference' => 'setOriginalReference', + 'platformChargebackLogic' => 'setPlatformChargebackLogic', + 'reference' => 'setReference', + 'splits' => 'setSplits', + 'tenderReference' => 'setTenderReference', + 'uniqueTerminalId' => 'setUniqueTerminalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'additionalData' => 'getAdditionalData', + 'merchantAccount' => 'getMerchantAccount', + 'modificationAmount' => 'getModificationAmount', + 'mpiData' => 'getMpiData', + 'originalMerchantReference' => 'getOriginalMerchantReference', + 'originalReference' => 'getOriginalReference', + 'platformChargebackLogic' => 'getPlatformChargebackLogic', + 'reference' => 'getReference', + 'splits' => 'getSplits', + 'tenderReference' => 'getTenderReference', + 'uniqueTerminalId' => 'getUniqueTerminalId' + ]; + + /** + * 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('additionalData', $data ?? [], null); + $this->setIfExists('merchantAccount', $data ?? [], null); + $this->setIfExists('modificationAmount', $data ?? [], null); + $this->setIfExists('mpiData', $data ?? [], null); + $this->setIfExists('originalMerchantReference', $data ?? [], null); + $this->setIfExists('originalReference', $data ?? [], null); + $this->setIfExists('platformChargebackLogic', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('tenderReference', $data ?? [], null); + $this->setIfExists('uniqueTerminalId', $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['merchantAccount'] === null) { + $invalidProperties[] = "'merchantAccount' 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 additionalData + * + * @return array|null + */ + public function getAdditionalData() + { + return $this->container['additionalData']; + } + + /** + * Sets additionalData + * + * @param array|null $additionalData This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. + * + * @return self + */ + public function setAdditionalData($additionalData) + { + if (is_null($additionalData)) { + throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); + } + $this->container['additionalData'] = $additionalData; + + return $this; + } + + /** + * Gets merchantAccount + * + * @return string + */ + public function getMerchantAccount() + { + return $this->container['merchantAccount']; + } + + /** + * Sets merchantAccount + * + * @param string $merchantAccount The merchant account that is used to process the payment. + * + * @return self + */ + public function setMerchantAccount($merchantAccount) + { + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); + } + $this->container['merchantAccount'] = $merchantAccount; + + return $this; + } + + /** + * Gets modificationAmount + * + * @return \Adyen\Model\Payment\Amount|null + */ + public function getModificationAmount() + { + return $this->container['modificationAmount']; + } + + /** + * Sets modificationAmount + * + * @param \Adyen\Model\Payment\Amount|null $modificationAmount modificationAmount + * + * @return self + */ + public function setModificationAmount($modificationAmount) + { + if (is_null($modificationAmount)) { + throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); + } + $this->container['modificationAmount'] = $modificationAmount; + + return $this; + } + + /** + * Gets mpiData + * + * @return \Adyen\Model\Payment\ThreeDSecureData|null + */ + public function getMpiData() + { + return $this->container['mpiData']; + } + + /** + * Sets mpiData + * + * @param \Adyen\Model\Payment\ThreeDSecureData|null $mpiData mpiData + * + * @return self + */ + public function setMpiData($mpiData) + { + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; + + return $this; + } + + /** + * Gets originalMerchantReference + * + * @return string|null + */ + public function getOriginalMerchantReference() + { + return $this->container['originalMerchantReference']; + } + + /** + * Sets originalMerchantReference + * + * @param string|null $originalMerchantReference The original merchant reference to cancel. + * + * @return self + */ + public function setOriginalMerchantReference($originalMerchantReference) + { + if (is_null($originalMerchantReference)) { + throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); + } + $this->container['originalMerchantReference'] = $originalMerchantReference; + + return $this; + } + + /** + * Gets originalReference + * + * @return string|null + */ + public function getOriginalReference() + { + return $this->container['originalReference']; + } + + /** + * Sets originalReference + * + * @param string|null $originalReference The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification + * + * @return self + */ + public function setOriginalReference($originalReference) + { + if (is_null($originalReference)) { + throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); + } + $this->container['originalReference'] = $originalReference; + + return $this; + } + + /** + * Gets platformChargebackLogic + * + * @return \Adyen\Model\Payment\PlatformChargebackLogic|null + */ + public function getPlatformChargebackLogic() + { + return $this->container['platformChargebackLogic']; + } + + /** + * Sets platformChargebackLogic + * + * @param \Adyen\Model\Payment\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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets splits + * + * @return \Adyen\Model\Payment\Split[]|null + */ + public function getSplits() + { + return $this->container['splits']; + } + + /** + * Sets splits + * + * @param \Adyen\Model\Payment\Split[]|null $splits An array of objects specifying how the amount 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). + * + * @return self + */ + public function setSplits($splits) + { + if (is_null($splits)) { + throw new \InvalidArgumentException('non-nullable splits cannot be null'); + } + $this->container['splits'] = $splits; + + return $this; + } + + /** + * Gets tenderReference + * + * @return string|null + */ + public function getTenderReference() + { + return $this->container['tenderReference']; + } + + /** + * Sets tenderReference + * + * @param string|null $tenderReference The transaction reference provided by the PED. For point-of-sale integrations only. + * + * @return self + */ + public function setTenderReference($tenderReference) + { + if (is_null($tenderReference)) { + throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); + } + $this->container['tenderReference'] = $tenderReference; + + return $this; + } + + /** + * Gets uniqueTerminalId + * + * @return string|null + */ + public function getUniqueTerminalId() + { + return $this->container['uniqueTerminalId']; + } + + /** + * Sets uniqueTerminalId + * + * @param string|null $uniqueTerminalId Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. + * + * @return self + */ + public function setUniqueTerminalId($uniqueTerminalId) + { + if (is_null($uniqueTerminalId)) { + throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); + } + $this->container['uniqueTerminalId'] = $uniqueTerminalId; + + 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/Payout/Address.php b/src/Adyen/Model/Payout/Address.php index cf463cb0b..63168faf9 100644 --- a/src/Adyen/Model/Payout/Address.php +++ b/src/Adyen/Model/Payout/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/Amount.php b/src/Adyen/Model/Payout/Amount.php index e1a3f8a08..298659024 100644 --- a/src/Adyen/Model/Payout/Amount.php +++ b/src/Adyen/Model/Payout/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/BankAccount.php b/src/Adyen/Model/Payout/BankAccount.php index 3a142f8a5..6880054d5 100644 --- a/src/Adyen/Model/Payout/BankAccount.php +++ b/src/Adyen/Model/Payout/BankAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/Card.php b/src/Adyen/Model/Payout/Card.php index c3609a76e..aa8537765 100644 --- a/src/Adyen/Model/Payout/Card.php +++ b/src/Adyen/Model/Payout/Card.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/FraudCheckResult.php b/src/Adyen/Model/Payout/FraudCheckResult.php index c679e7943..9799f9c49 100644 --- a/src/Adyen/Model/Payout/FraudCheckResult.php +++ b/src/Adyen/Model/Payout/FraudCheckResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/FraudCheckResultWrapper.php b/src/Adyen/Model/Payout/FraudCheckResultWrapper.php index 7febeab88..6afbeea7b 100644 --- a/src/Adyen/Model/Payout/FraudCheckResultWrapper.php +++ b/src/Adyen/Model/Payout/FraudCheckResultWrapper.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/FraudResult.php b/src/Adyen/Model/Payout/FraudResult.php index 464888574..925ee3250 100644 --- a/src/Adyen/Model/Payout/FraudResult.php +++ b/src/Adyen/Model/Payout/FraudResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/FundSource.php b/src/Adyen/Model/Payout/FundSource.php index 112cf98c1..30cf5a62e 100644 --- a/src/Adyen/Model/Payout/FundSource.php +++ b/src/Adyen/Model/Payout/FundSource.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ModelInterface.php b/src/Adyen/Model/Payout/ModelInterface.php index d3ae56cba..371298bff 100644 --- a/src/Adyen/Model/Payout/ModelInterface.php +++ b/src/Adyen/Model/Payout/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ModifyRequest.php b/src/Adyen/Model/Payout/ModifyRequest.php index c2c8c5002..9b01895f4 100644 --- a/src/Adyen/Model/Payout/ModifyRequest.php +++ b/src/Adyen/Model/Payout/ModifyRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ModifyResponse.php b/src/Adyen/Model/Payout/ModifyResponse.php index a57e4c7a1..c320ad3ea 100644 --- a/src/Adyen/Model/Payout/ModifyResponse.php +++ b/src/Adyen/Model/Payout/ModifyResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/Name.php b/src/Adyen/Model/Payout/Name.php index 265217eb6..f142496bf 100644 --- a/src/Adyen/Model/Payout/Name.php +++ b/src/Adyen/Model/Payout/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index 5214cc41f..0d50f4363 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/Payout/PayoutRequest.php b/src/Adyen/Model/Payout/PayoutRequest.php index 677bd2c4d..c7321e214 100644 --- a/src/Adyen/Model/Payout/PayoutRequest.php +++ b/src/Adyen/Model/Payout/PayoutRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/PayoutResponse.php b/src/Adyen/Model/Payout/PayoutResponse.php index 96119d065..4644bd519 100644 --- a/src/Adyen/Model/Payout/PayoutResponse.php +++ b/src/Adyen/Model/Payout/PayoutResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index 5174a5d7e..ecb68436f 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php index 0f0cdad8d..22f9270ff 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php index f3c086f9a..11d4d8e5d 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php index 74e8075c2..8a3e44688 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php index 40f1b4950..af2696011 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php index 4f7fdfbd7..69e9b16c3 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php index 171571496..5681ca6f7 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php index c3168d6fe..1ff00409e 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php index 3a0334a7f..b2a203100 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php index 0f1e8fac2..65b155a79 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/ServiceError.php b/src/Adyen/Model/Payout/ServiceError.php index 97ab7a828..e411c09c5 100644 --- a/src/Adyen/Model/Payout/ServiceError.php +++ b/src/Adyen/Model/Payout/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php b/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php index 53db680c6..4ab07c7bc 100644 --- a/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php +++ b/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php b/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php index b3e2bbe22..de728ac55 100644 --- a/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php +++ b/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/StoreDetailRequest.php b/src/Adyen/Model/Payout/StoreDetailRequest.php index 48102ef5b..657fc9a86 100644 --- a/src/Adyen/Model/Payout/StoreDetailRequest.php +++ b/src/Adyen/Model/Payout/StoreDetailRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/StoreDetailResponse.php b/src/Adyen/Model/Payout/StoreDetailResponse.php index 285cb13f1..f4189bf84 100644 --- a/src/Adyen/Model/Payout/StoreDetailResponse.php +++ b/src/Adyen/Model/Payout/StoreDetailResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/SubmitRequest.php b/src/Adyen/Model/Payout/SubmitRequest.php index dd8eb9627..5dfd76eb0 100644 --- a/src/Adyen/Model/Payout/SubmitRequest.php +++ b/src/Adyen/Model/Payout/SubmitRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Payout/SubmitResponse.php b/src/Adyen/Model/Payout/SubmitResponse.php index 899534a36..9ab56404b 100644 --- a/src/Adyen/Model/Payout/SubmitResponse.php +++ b/src/Adyen/Model/Payout/SubmitResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/Address.php b/src/Adyen/Model/Recurring/Address.php index 2d670e25d..a9170fe61 100644 --- a/src/Adyen/Model/Recurring/Address.php +++ b/src/Adyen/Model/Recurring/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/Amount.php b/src/Adyen/Model/Recurring/Amount.php index bdea5d488..1297f73d1 100644 --- a/src/Adyen/Model/Recurring/Amount.php +++ b/src/Adyen/Model/Recurring/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/BankAccount.php b/src/Adyen/Model/Recurring/BankAccount.php index 8153037c6..66b22b798 100644 --- a/src/Adyen/Model/Recurring/BankAccount.php +++ b/src/Adyen/Model/Recurring/BankAccount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/Card.php b/src/Adyen/Model/Recurring/Card.php index 16992994c..69a9e2068 100644 --- a/src/Adyen/Model/Recurring/Card.php +++ b/src/Adyen/Model/Recurring/Card.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/CreatePermitRequest.php b/src/Adyen/Model/Recurring/CreatePermitRequest.php index c64b169c2..6ceb81493 100644 --- a/src/Adyen/Model/Recurring/CreatePermitRequest.php +++ b/src/Adyen/Model/Recurring/CreatePermitRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/CreatePermitResult.php b/src/Adyen/Model/Recurring/CreatePermitResult.php index 74449b754..e4d12f097 100644 --- a/src/Adyen/Model/Recurring/CreatePermitResult.php +++ b/src/Adyen/Model/Recurring/CreatePermitResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/DisablePermitRequest.php b/src/Adyen/Model/Recurring/DisablePermitRequest.php index feb3b8f9e..56a244a52 100644 --- a/src/Adyen/Model/Recurring/DisablePermitRequest.php +++ b/src/Adyen/Model/Recurring/DisablePermitRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/DisablePermitResult.php b/src/Adyen/Model/Recurring/DisablePermitResult.php index 16211b62f..878d143ff 100644 --- a/src/Adyen/Model/Recurring/DisablePermitResult.php +++ b/src/Adyen/Model/Recurring/DisablePermitResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/DisableRequest.php b/src/Adyen/Model/Recurring/DisableRequest.php index 0b1b31fa1..18f922963 100644 --- a/src/Adyen/Model/Recurring/DisableRequest.php +++ b/src/Adyen/Model/Recurring/DisableRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/DisableResult.php b/src/Adyen/Model/Recurring/DisableResult.php index 4b1d5142d..310c1add7 100644 --- a/src/Adyen/Model/Recurring/DisableResult.php +++ b/src/Adyen/Model/Recurring/DisableResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/ModelInterface.php b/src/Adyen/Model/Recurring/ModelInterface.php index 62ce0dace..97a4a94c7 100644 --- a/src/Adyen/Model/Recurring/ModelInterface.php +++ b/src/Adyen/Model/Recurring/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/Name.php b/src/Adyen/Model/Recurring/Name.php index 6811b2586..0d17c4fb5 100644 --- a/src/Adyen/Model/Recurring/Name.php +++ b/src/Adyen/Model/Recurring/Name.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/NotifyShopperRequest.php b/src/Adyen/Model/Recurring/NotifyShopperRequest.php index c6e9f3769..715cea6d8 100644 --- a/src/Adyen/Model/Recurring/NotifyShopperRequest.php +++ b/src/Adyen/Model/Recurring/NotifyShopperRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/NotifyShopperResult.php b/src/Adyen/Model/Recurring/NotifyShopperResult.php index 758916e52..8768c3c48 100644 --- a/src/Adyen/Model/Recurring/NotifyShopperResult.php +++ b/src/Adyen/Model/Recurring/NotifyShopperResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index b978e00c2..3b2a857bf 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/Recurring/Permit.php b/src/Adyen/Model/Recurring/Permit.php index 7617465ba..49f13ed9a 100644 --- a/src/Adyen/Model/Recurring/Permit.php +++ b/src/Adyen/Model/Recurring/Permit.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/PermitRestriction.php b/src/Adyen/Model/Recurring/PermitRestriction.php index 6dda49a9e..6d6fe3320 100644 --- a/src/Adyen/Model/Recurring/PermitRestriction.php +++ b/src/Adyen/Model/Recurring/PermitRestriction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/PermitResult.php b/src/Adyen/Model/Recurring/PermitResult.php index 7db836906..36dc67bc1 100644 --- a/src/Adyen/Model/Recurring/PermitResult.php +++ b/src/Adyen/Model/Recurring/PermitResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index 2bc5bfd7e..431dacaa0 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/RecurringDetail.php b/src/Adyen/Model/Recurring/RecurringDetail.php index 440fa4203..94e8c889b 100644 --- a/src/Adyen/Model/Recurring/RecurringDetail.php +++ b/src/Adyen/Model/Recurring/RecurringDetail.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/RecurringDetailWrapper.php b/src/Adyen/Model/Recurring/RecurringDetailWrapper.php index de01c7a61..1ea9432e2 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailWrapper.php +++ b/src/Adyen/Model/Recurring/RecurringDetailWrapper.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/RecurringDetailsRequest.php b/src/Adyen/Model/Recurring/RecurringDetailsRequest.php index 1a949604b..62dd8287e 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailsRequest.php +++ b/src/Adyen/Model/Recurring/RecurringDetailsRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/RecurringDetailsResult.php b/src/Adyen/Model/Recurring/RecurringDetailsResult.php index c06b54680..3447d4774 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailsResult.php +++ b/src/Adyen/Model/Recurring/RecurringDetailsResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php index 9cdd0911c..4f427459b 100644 --- a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php +++ b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php index 2da929300..bec19ca61 100644 --- a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php +++ b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/ServiceError.php b/src/Adyen/Model/Recurring/ServiceError.php index 3ebef4456..dafb6df4a 100644 --- a/src/Adyen/Model/Recurring/ServiceError.php +++ b/src/Adyen/Model/Recurring/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Recurring/TokenDetails.php b/src/Adyen/Model/Recurring/TokenDetails.php index 93673a469..11e83b8b5 100644 --- a/src/Adyen/Model/Recurring/TokenDetails.php +++ b/src/Adyen/Model/Recurring/TokenDetails.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/ReportWebhook/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ReportWebhook/BalancePlatformNotificationResponse.php new file mode 100644 index 000000000..72ce32fff --- /dev/null +++ b/src/Adyen/Model/ReportWebhook/BalancePlatformNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalancePlatformNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/ReportWebhook/ModelInterface.php b/src/Adyen/Model/ReportWebhook/ModelInterface.php new file mode 100644 index 000000000..4e49cc1b0 --- /dev/null +++ b/src/Adyen/Model/ReportWebhook/ModelInterface.php @@ -0,0 +1,92 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/ReportWebhook/ReportNotificationData.php b/src/Adyen/Model/ReportWebhook/ReportNotificationData.php new file mode 100644 index 000000000..333779f8d --- /dev/null +++ b/src/Adyen/Model/ReportWebhook/ReportNotificationData.php @@ -0,0 +1,597 @@ + + */ +class ReportNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ReportNotificationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\ReportWebhook\ResourceReference', + 'balanceAccount' => '\Adyen\Model\ReportWebhook\ResourceReference', + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'downloadUrl' => 'string', + 'fileName' => 'string', + 'reportType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'balanceAccount' => null, + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'downloadUrl' => null, + 'fileName' => null, + 'reportType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'balanceAccount' => false, + 'balancePlatform' => false, + 'creationDate' => false, + 'downloadUrl' => false, + 'fileName' => false, + 'reportType' => 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 = [ + 'accountHolder' => 'accountHolder', + 'balanceAccount' => 'balanceAccount', + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'downloadUrl' => 'downloadUrl', + 'fileName' => 'fileName', + 'reportType' => 'reportType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'balanceAccount' => 'setBalanceAccount', + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'downloadUrl' => 'setDownloadUrl', + 'fileName' => 'setFileName', + 'reportType' => 'setReportType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'balanceAccount' => 'getBalanceAccount', + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'downloadUrl' => 'getDownloadUrl', + 'fileName' => 'getFileName', + 'reportType' => 'getReportType' + ]; + + /** + * 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('accountHolder', $data ?? [], null); + $this->setIfExists('balanceAccount', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('downloadUrl', $data ?? [], null); + $this->setIfExists('fileName', $data ?? [], null); + $this->setIfExists('reportType', $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['downloadUrl'] === null) { + $invalidProperties[] = "'downloadUrl' can't be null"; + } + if ($this->container['fileName'] === null) { + $invalidProperties[] = "'fileName' can't be null"; + } + if ($this->container['reportType'] === null) { + $invalidProperties[] = "'reportType' 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 accountHolder + * + * @return \Adyen\Model\ReportWebhook\ResourceReference|null + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\ReportWebhook\ResourceReference|null $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + if (is_null($accountHolder)) { + throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); + } + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets balanceAccount + * + * @return \Adyen\Model\ReportWebhook\ResourceReference|null + */ + public function getBalanceAccount() + { + return $this->container['balanceAccount']; + } + + /** + * Sets balanceAccount + * + * @param \Adyen\Model\ReportWebhook\ResourceReference|null $balanceAccount balanceAccount + * + * @return self + */ + public function setBalanceAccount($balanceAccount) + { + if (is_null($balanceAccount)) { + throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); + } + $this->container['balanceAccount'] = $balanceAccount; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets 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 downloadUrl + * + * @return string + */ + public function getDownloadUrl() + { + return $this->container['downloadUrl']; + } + + /** + * Sets downloadUrl + * + * @param string $downloadUrl The URL at which you can download the report. To download, you must authenticate your GET request with your [API credentials](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/overview). + * + * @return self + */ + public function setDownloadUrl($downloadUrl) + { + if (is_null($downloadUrl)) { + throw new \InvalidArgumentException('non-nullable downloadUrl cannot be null'); + } + $this->container['downloadUrl'] = $downloadUrl; + + return $this; + } + + /** + * Gets fileName + * + * @return string + */ + public function getFileName() + { + return $this->container['fileName']; + } + + /** + * Sets fileName + * + * @param string $fileName The filename of the report. + * + * @return self + */ + public function setFileName($fileName) + { + if (is_null($fileName)) { + throw new \InvalidArgumentException('non-nullable fileName cannot be null'); + } + $this->container['fileName'] = $fileName; + + return $this; + } + + /** + * Gets reportType + * + * @return string + */ + public function getReportType() + { + return $this->container['reportType']; + } + + /** + * Sets reportType + * + * @param string $reportType Type of report. + * + * @return self + */ + public function setReportType($reportType) + { + if (is_null($reportType)) { + throw new \InvalidArgumentException('non-nullable reportType cannot be null'); + } + $this->container['reportType'] = $reportType; + + 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/ReportWebhook/ReportNotificationRequest.php b/src/Adyen/Model/ReportWebhook/ReportNotificationRequest.php new file mode 100644 index 000000000..4f93f46fd --- /dev/null +++ b/src/Adyen/Model/ReportWebhook/ReportNotificationRequest.php @@ -0,0 +1,492 @@ + + */ +class ReportNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ReportNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\ReportWebhook\ReportNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_BALANCE_PLATFORM_REPORT_CREATED = 'balancePlatform.report.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_PLATFORM_REPORT_CREATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\ReportWebhook\ReportNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ReportWebhook\ReportNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of webhook. + * + * @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/ReportWebhook/Resource.php b/src/Adyen/Model/ReportWebhook/Resource.php new file mode 100644 index 000000000..f4676f63d --- /dev/null +++ b/src/Adyen/Model/ReportWebhook/Resource.php @@ -0,0 +1,452 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** + * 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/ReportWebhook/ResourceReference.php b/src/Adyen/Model/ReportWebhook/ResourceReference.php new file mode 100644 index 000000000..d5cbb75d5 --- /dev/null +++ b/src/Adyen/Model/ReportWebhook/ResourceReference.php @@ -0,0 +1,452 @@ + + */ +class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResourceReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'reference' => 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', + 'id' => 'id', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'reference' => 'getReference' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('reference', $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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/StoredValue/Amount.php b/src/Adyen/Model/StoredValue/Amount.php index 8c930e49d..13e882d42 100644 --- a/src/Adyen/Model/StoredValue/Amount.php +++ b/src/Adyen/Model/StoredValue/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/ModelInterface.php b/src/Adyen/Model/StoredValue/ModelInterface.php index 6c4123e43..62897679a 100644 --- a/src/Adyen/Model/StoredValue/ModelInterface.php +++ b/src/Adyen/Model/StoredValue/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index 4d9c66463..934975452 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/StoredValue/ServiceError.php b/src/Adyen/Model/StoredValue/ServiceError.php index 4dd0779a2..32c7e924e 100644 --- a/src/Adyen/Model/StoredValue/ServiceError.php +++ b/src/Adyen/Model/StoredValue/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php index 41ba2dacf..c61549851 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php index eb7fc3d1e..06aa6f998 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php index 1a160ba78..f58dd83f5 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php index a333c08e5..dbd5d53ef 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php b/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php index dcbe92e9c..d45dff5fb 100644 --- a/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php b/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php index 7e29dac89..2b54d1c3f 100644 --- a/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php b/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php index eaac91c4d..2418e52c2 100644 --- a/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php b/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php index e8b80242c..51315d085 100644 --- a/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php b/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php index 20a6eb8e5..c9c329db7 100644 --- a/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php b/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php index 0eafd3d78..a440ea4ca 100644 --- a/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php b/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php index 2ce0ad7ae..f5127bf8d 100644 --- a/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php b/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php index 194480cc4..9aae687e1 100644 --- a/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 46 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/TransactionWebhook/Amount.php b/src/Adyen/Model/TransactionWebhook/Amount.php new file mode 100644 index 000000000..e8dd18bdf --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/Amount.php @@ -0,0 +1,424 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('value', $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['value'] === null) { + $invalidProperties[] = "'value' 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 value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/TransactionWebhook/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransactionWebhook/BalancePlatformNotificationResponse.php new file mode 100644 index 000000000..14596d5c0 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/BalancePlatformNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalancePlatformNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/TransactionWebhook/ModelInterface.php b/src/Adyen/Model/TransactionWebhook/ModelInterface.php new file mode 100644 index 000000000..ace22328d --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/ModelInterface.php @@ -0,0 +1,92 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/TransactionWebhook/Resource.php b/src/Adyen/Model/TransactionWebhook/Resource.php new file mode 100644 index 000000000..d73bcaca7 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/Resource.php @@ -0,0 +1,452 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** + * 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/TransactionWebhook/ResourceReference.php b/src/Adyen/Model/TransactionWebhook/ResourceReference.php new file mode 100644 index 000000000..a4e92eaaf --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/ResourceReference.php @@ -0,0 +1,452 @@ + + */ +class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResourceReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'reference' => 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', + 'id' => 'id', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'reference' => 'getReference' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('reference', $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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/TransactionWebhook/Transaction.php b/src/Adyen/Model/TransactionWebhook/Transaction.php new file mode 100644 index 000000000..90724c219 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/Transaction.php @@ -0,0 +1,747 @@ + + */ +class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Transaction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\TransactionWebhook\ResourceReference', + 'amount' => '\Adyen\Model\TransactionWebhook\Amount', + 'balanceAccount' => '\Adyen\Model\TransactionWebhook\ResourceReference', + 'balancePlatform' => 'string', + 'bookingDate' => '\DateTime', + 'creationDate' => '\DateTime', + 'id' => 'string', + 'status' => 'string', + 'transfer' => '\Adyen\Model\TransactionWebhook\TransferData', + 'valueDate' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'amount' => null, + 'balanceAccount' => null, + 'balancePlatform' => null, + 'bookingDate' => 'date-time', + 'creationDate' => 'date-time', + 'id' => null, + 'status' => null, + 'transfer' => null, + 'valueDate' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'amount' => false, + 'balanceAccount' => false, + 'balancePlatform' => false, + 'bookingDate' => false, + 'creationDate' => false, + 'id' => false, + 'status' => false, + 'transfer' => false, + 'valueDate' => 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 = [ + 'accountHolder' => 'accountHolder', + 'amount' => 'amount', + 'balanceAccount' => 'balanceAccount', + 'balancePlatform' => 'balancePlatform', + 'bookingDate' => 'bookingDate', + 'creationDate' => 'creationDate', + 'id' => 'id', + 'status' => 'status', + 'transfer' => 'transfer', + 'valueDate' => 'valueDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'amount' => 'setAmount', + 'balanceAccount' => 'setBalanceAccount', + 'balancePlatform' => 'setBalancePlatform', + 'bookingDate' => 'setBookingDate', + 'creationDate' => 'setCreationDate', + 'id' => 'setId', + 'status' => 'setStatus', + 'transfer' => 'setTransfer', + 'valueDate' => 'setValueDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'amount' => 'getAmount', + 'balanceAccount' => 'getBalanceAccount', + 'balancePlatform' => 'getBalancePlatform', + 'bookingDate' => 'getBookingDate', + 'creationDate' => 'getCreationDate', + 'id' => 'getId', + 'status' => 'getStatus', + 'transfer' => 'getTransfer', + 'valueDate' => 'getValueDate' + ]; + + /** + * 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_BOOKED = 'booked'; + public const STATUS_PENDING = 'pending'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_BOOKED, + self::STATUS_PENDING, + ]; + } + /** + * 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('accountHolder', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('balanceAccount', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('bookingDate', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('transfer', $data ?? [], null); + $this->setIfExists('valueDate', $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['accountHolder'] === null) { + $invalidProperties[] = "'accountHolder' can't be null"; + } + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if ($this->container['balanceAccount'] === null) { + $invalidProperties[] = "'balanceAccount' can't be null"; + } + if ($this->container['balancePlatform'] === null) { + $invalidProperties[] = "'balancePlatform' can't be null"; + } + if ($this->container['bookingDate'] === null) { + $invalidProperties[] = "'bookingDate' 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) + ); + } + + if ($this->container['valueDate'] === null) { + $invalidProperties[] = "'valueDate' 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 accountHolder + * + * @return \Adyen\Model\TransactionWebhook\ResourceReference + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\TransactionWebhook\ResourceReference $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + if (is_null($accountHolder)) { + throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); + } + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\TransactionWebhook\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\TransactionWebhook\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; + } + + /** + * Gets balanceAccount + * + * @return \Adyen\Model\TransactionWebhook\ResourceReference + */ + public function getBalanceAccount() + { + return $this->container['balanceAccount']; + } + + /** + * Sets balanceAccount + * + * @param \Adyen\Model\TransactionWebhook\ResourceReference $balanceAccount balanceAccount + * + * @return self + */ + public function setBalanceAccount($balanceAccount) + { + if (is_null($balanceAccount)) { + throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); + } + $this->container['balanceAccount'] = $balanceAccount; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets bookingDate + * + * @return \DateTime + */ + public function getBookingDate() + { + return $this->container['bookingDate']; + } + + /** + * Sets bookingDate + * + * @param \DateTime $bookingDate The date the transaction was booked into the balance account. + * + * @return self + */ + public function setBookingDate($bookingDate) + { + if (is_null($bookingDate)) { + throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); + } + $this->container['bookingDate'] = $bookingDate; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the transaction. + * + * @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 + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets transfer + * + * @return \Adyen\Model\TransactionWebhook\TransferData|null + */ + public function getTransfer() + { + return $this->container['transfer']; + } + + /** + * Sets transfer + * + * @param \Adyen\Model\TransactionWebhook\TransferData|null $transfer transfer + * + * @return self + */ + public function setTransfer($transfer) + { + if (is_null($transfer)) { + throw new \InvalidArgumentException('non-nullable transfer cannot be null'); + } + $this->container['transfer'] = $transfer; + + return $this; + } + + /** + * Gets valueDate + * + * @return \DateTime + */ + public function getValueDate() + { + return $this->container['valueDate']; + } + + /** + * Sets valueDate + * + * @param \DateTime $valueDate The date the transfer amount becomes available in the balance account. + * + * @return self + */ + public function setValueDate($valueDate) + { + if (is_null($valueDate)) { + throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); + } + $this->container['valueDate'] = $valueDate; + + 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/TransactionWebhook/TransactionNotificationRequestV4.php b/src/Adyen/Model/TransactionWebhook/TransactionNotificationRequestV4.php new file mode 100644 index 000000000..47ba88927 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/TransactionNotificationRequestV4.php @@ -0,0 +1,489 @@ + + */ +class TransactionNotificationRequestV4 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransactionNotificationRequestV4'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\TransactionWebhook\Transaction', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_BALANCE_PLATFORM_TRANSACTION_CREATED = 'balancePlatform.transaction.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_PLATFORM_TRANSACTION_CREATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\TransactionWebhook\Transaction + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\TransactionWebhook\Transaction $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Type of the webhook. + * + * @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/TransactionWebhook/TransferData.php b/src/Adyen/Model/TransactionWebhook/TransferData.php new file mode 100644 index 000000000..59ee90669 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhook/TransferData.php @@ -0,0 +1,421 @@ + + */ +class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'id' => false, + 'reference' => 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', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'reference' => 'getReference' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('reference', $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['reference'] === null) { + $invalidProperties[] = "'reference' 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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string $reference The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/TransferWebhook/AULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/AULocalAccountIdentification.php new file mode 100644 index 000000000..f7e10a745 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/AULocalAccountIdentification.php @@ -0,0 +1,492 @@ + + */ +class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AULocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'bsbCode' => '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, + 'bsbCode' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'bsbCode' => 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', + 'bsbCode' => 'bsbCode', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bsbCode' => 'setBsbCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'bsbCode' => 'getBsbCode', + '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_AU_LOCAL = 'auLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_AU_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('bsbCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'auLocal'); + } + + /** + * 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['bsbCode'] === null) { + $invalidProperties[] = "'bsbCode' 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 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 bsbCode + * + * @return string + */ + public function getBsbCode() + { + return $this->container['bsbCode']; + } + + /** + * Sets bsbCode + * + * @param string $bsbCode The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + * + * @return self + */ + public function setBsbCode($bsbCode) + { + if (is_null($bsbCode)) { + throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); + } + $this->container['bsbCode'] = $bsbCode; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **auLocal** + * + * @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/TransferWebhook/AdditionalBankIdentification.php b/src/Adyen/Model/TransferWebhook/AdditionalBankIdentification.php new file mode 100644 index 000000000..eaad01dba --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/AdditionalBankIdentification.php @@ -0,0 +1,451 @@ + + */ +class AdditionalBankIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AdditionalBankIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'code' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'code' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'code' => 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 = [ + 'code' => 'code', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + '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_GB_SORT_CODE = 'gbSortCode'; + public const TYPE_US_ROUTING_NUMBER = 'usRoutingNumber'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_GB_SORT_CODE, + self::TYPE_US_ROUTING_NUMBER, + ]; + } + /** + * 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('code', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The value of the additional bank identification. + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. + * + * @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/TransferWebhook/Address.php b/src/Adyen/Model/TransferWebhook/Address.php new file mode 100644 index 000000000..d18e0797c --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/Address.php @@ -0,0 +1,557 @@ + + */ +class Address implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'line1' => 'string', + 'line2' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'line1' => null, + 'line2' => null, + 'postalCode' => null, + 'stateOrProvince' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'line1' => false, + 'line2' => false, + 'postalCode' => false, + 'stateOrProvince' => 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 = [ + 'city' => 'city', + 'country' => 'country', + 'line1' => 'line1', + 'line2' => 'line2', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'line1' => 'setLine1', + 'line2' => 'setLine2', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'line1' => 'getLine1', + 'line2' => 'getLine2', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince' + ]; + + /** + * 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('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('line1', $data ?? [], null); + $this->setIfExists('line2', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $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['country'] === null) { + $invalidProperties[] = "'country' 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 city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The name of the city. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets line1 + * + * @return string|null + */ + public function getLine1() + { + return $this->container['line1']; + } + + /** + * Sets line1 + * + * @param string|null $line1 First line of the street address. + * + * @return self + */ + public function setLine1($line1) + { + if (is_null($line1)) { + throw new \InvalidArgumentException('non-nullable line1 cannot be null'); + } + $this->container['line1'] = $line1; + + return $this; + } + + /** + * Gets line2 + * + * @return string|null + */ + public function getLine2() + { + return $this->container['line2']; + } + + /** + * Sets line2 + * + * @param string|null $line2 Second line of the street address. + * + * @return self + */ + public function setLine2($line2) + { + if (is_null($line2)) { + throw new \InvalidArgumentException('non-nullable line2 cannot be null'); + } + $this->container['line2'] = $line2; + + return $this; + } + + /** + * Gets postalCode + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string|null $postalCode The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + 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/TransferWebhook/Amount.php b/src/Adyen/Model/TransferWebhook/Amount.php new file mode 100644 index 000000000..034f63c70 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/Amount.php @@ -0,0 +1,424 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => 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', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * 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('value', $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['value'] === null) { + $invalidProperties[] = "'value' 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 value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + 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/TransferWebhook/AmountAdjustment.php b/src/Adyen/Model/TransferWebhook/AmountAdjustment.php new file mode 100644 index 000000000..e5b08645c --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/AmountAdjustment.php @@ -0,0 +1,487 @@ + + */ +class AmountAdjustment implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AmountAdjustment'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => '\Adyen\Model\TransferWebhook\Amount', + 'amountAdjustmentType' => 'string', + 'basepoints' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'amountAdjustmentType' => null, + 'basepoints' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => false, + 'amountAdjustmentType' => false, + 'basepoints' => 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 = [ + 'amount' => 'amount', + 'amountAdjustmentType' => 'amountAdjustmentType', + 'basepoints' => 'basepoints' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'amountAdjustmentType' => 'setAmountAdjustmentType', + 'basepoints' => 'setBasepoints' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'amountAdjustmentType' => 'getAmountAdjustmentType', + 'basepoints' => 'getBasepoints' + ]; + + /** + * 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 AMOUNT_ADJUSTMENT_TYPE_ATM_MARKUP = 'atmMarkup'; + public const AMOUNT_ADJUSTMENT_TYPE_AUTH_HOLD_RESERVE = 'authHoldReserve'; + public const AMOUNT_ADJUSTMENT_TYPE_EXCHANGE = 'exchange'; + public const AMOUNT_ADJUSTMENT_TYPE_FOREX_MARKUP = 'forexMarkup'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAmountAdjustmentTypeAllowableValues() + { + return [ + self::AMOUNT_ADJUSTMENT_TYPE_ATM_MARKUP, + self::AMOUNT_ADJUSTMENT_TYPE_AUTH_HOLD_RESERVE, + self::AMOUNT_ADJUSTMENT_TYPE_EXCHANGE, + self::AMOUNT_ADJUSTMENT_TYPE_FOREX_MARKUP, + ]; + } + /** + * 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('amountAdjustmentType', $data ?? [], null); + $this->setIfExists('basepoints', $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->getAmountAdjustmentTypeAllowableValues(); + if (!is_null($this->container['amountAdjustmentType']) && !in_array($this->container['amountAdjustmentType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'amountAdjustmentType', must be one of '%s'", + $this->container['amountAdjustmentType'], + 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\TransferWebhook\Amount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\TransferWebhook\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 amountAdjustmentType + * + * @return string|null + */ + public function getAmountAdjustmentType() + { + return $this->container['amountAdjustmentType']; + } + + /** + * Sets amountAdjustmentType + * + * @param string|null $amountAdjustmentType The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. + * + * @return self + */ + public function setAmountAdjustmentType($amountAdjustmentType) + { + if (is_null($amountAdjustmentType)) { + throw new \InvalidArgumentException('non-nullable amountAdjustmentType cannot be null'); + } + $allowedValues = $this->getAmountAdjustmentTypeAllowableValues(); + if (!in_array($amountAdjustmentType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'amountAdjustmentType', must be one of '%s'", + $amountAdjustmentType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['amountAdjustmentType'] = $amountAdjustmentType; + + return $this; + } + + /** + * Gets basepoints + * + * @return int|null + */ + public function getBasepoints() + { + return $this->container['basepoints']; + } + + /** + * Sets basepoints + * + * @param int|null $basepoints The basepoints associated with the applied markup. + * + * @return self + */ + public function setBasepoints($basepoints) + { + // Do nothing for nullable integers + $this->container['basepoints'] = $basepoints; + + 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/TransferWebhook/BRLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/BRLocalAccountIdentification.php new file mode 100644 index 000000000..ae70bb945 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/BRLocalAccountIdentification.php @@ -0,0 +1,529 @@ + + */ +class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BRLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'bankCode' => 'string', + 'branchNumber' => '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, + 'bankCode' => null, + 'branchNumber' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'bankCode' => false, + 'branchNumber' => 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', + 'bankCode' => 'bankCode', + 'branchNumber' => 'branchNumber', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', + 'branchNumber' => 'setBranchNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'bankCode' => 'getBankCode', + 'branchNumber' => 'getBranchNumber', + '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_BR_LOCAL = 'brLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BR_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('bankCode', $data ?? [], null); + $this->setIfExists('branchNumber', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'brLocal'); + } + + /** + * 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['bankCode'] === null) { + $invalidProperties[] = "'bankCode' can't be null"; + } + if ($this->container['branchNumber'] === null) { + $invalidProperties[] = "'branchNumber' 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 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 bankCode + * + * @return string + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string $bankCode The 3-digit bank code, with leading zeros. + * + * @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 branchNumber + * + * @return string + */ + public function getBranchNumber() + { + return $this->container['branchNumber']; + } + + /** + * Sets branchNumber + * + * @param string $branchNumber The bank account branch number, without separators or whitespace. + * + * @return self + */ + public function setBranchNumber($branchNumber) + { + if (is_null($branchNumber)) { + throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); + } + $this->container['branchNumber'] = $branchNumber; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **brLocal** + * + * @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/TransferWebhook/BalanceMutation.php b/src/Adyen/Model/TransferWebhook/BalanceMutation.php new file mode 100644 index 000000000..8ac23e740 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/BalanceMutation.php @@ -0,0 +1,486 @@ + + */ +class BalanceMutation implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalanceMutation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balance' => 'int', + 'currency' => 'string', + 'received' => 'int', + 'reserved' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balance' => 'int64', + 'currency' => null, + 'received' => 'int64', + 'reserved' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balance' => false, + 'currency' => false, + 'received' => false, + 'reserved' => 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 = [ + 'balance' => 'balance', + 'currency' => 'currency', + 'received' => 'received', + 'reserved' => 'reserved' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balance' => 'setBalance', + 'currency' => 'setCurrency', + 'received' => 'setReceived', + 'reserved' => 'setReserved' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balance' => 'getBalance', + 'currency' => 'getCurrency', + 'received' => 'getReceived', + 'reserved' => 'getReserved' + ]; + + /** + * 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('balance', $data ?? [], null); + $this->setIfExists('currency', $data ?? [], null); + $this->setIfExists('received', $data ?? [], null); + $this->setIfExists('reserved', $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 balance + * + * @return int|null + */ + public function getBalance() + { + return $this->container['balance']; + } + + /** + * Sets balance + * + * @param int|null $balance The amount in the payment's currency that is debited or credited on the balance accounting register. + * + * @return self + */ + public function setBalance($balance) + { + if (is_null($balance)) { + throw new \InvalidArgumentException('non-nullable balance cannot be null'); + } + $this->container['balance'] = $balance; + + return $this; + } + + /** + * Gets currency + * + * @return string|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $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 received + * + * @return int|null + */ + public function getReceived() + { + return $this->container['received']; + } + + /** + * Sets received + * + * @param int|null $received The amount in the payment's currency that is debited or credited on the received accounting register. + * + * @return self + */ + public function setReceived($received) + { + if (is_null($received)) { + throw new \InvalidArgumentException('non-nullable received cannot be null'); + } + $this->container['received'] = $received; + + return $this; + } + + /** + * Gets reserved + * + * @return int|null + */ + public function getReserved() + { + return $this->container['reserved']; + } + + /** + * Sets reserved + * + * @param int|null $reserved The amount in the payment's currency that is debited or credited on the reserved accounting register. + * + * @return self + */ + public function setReserved($reserved) + { + if (is_null($reserved)) { + throw new \InvalidArgumentException('non-nullable reserved cannot be null'); + } + $this->container['reserved'] = $reserved; + + 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/TransferWebhook/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransferWebhook/BalancePlatformNotificationResponse.php new file mode 100644 index 000000000..23fc94059 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/BalancePlatformNotificationResponse.php @@ -0,0 +1,384 @@ + + */ +class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BalancePlatformNotificationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'notificationResponse' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'notificationResponse' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'notificationResponse' => 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 = [ + 'notificationResponse' => 'notificationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notificationResponse' => 'setNotificationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notificationResponse' => 'getNotificationResponse' + ]; + + /** + * 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('notificationResponse', $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 notificationResponse + * + * @return string|null + */ + public function getNotificationResponse() + { + return $this->container['notificationResponse']; + } + + /** + * Sets notificationResponse + * + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @return self + */ + public function setNotificationResponse($notificationResponse) + { + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); + } + $this->container['notificationResponse'] = $notificationResponse; + + 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/TransferWebhook/BankAccountV3.php b/src/Adyen/Model/TransferWebhook/BankAccountV3.php new file mode 100644 index 000000000..108d30d49 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/BankAccountV3.php @@ -0,0 +1,424 @@ + + */ +class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankAccountV3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\TransferWebhook\PartyIdentification', + 'accountIdentification' => '\Adyen\Model\TransferWebhook\BankAccountV3AccountIdentification' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'accountIdentification' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'accountIdentification' => 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 = [ + 'accountHolder' => 'accountHolder', + 'accountIdentification' => 'accountIdentification' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'accountIdentification' => 'setAccountIdentification' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'accountIdentification' => 'getAccountIdentification' + ]; + + /** + * 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('accountHolder', $data ?? [], null); + $this->setIfExists('accountIdentification', $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['accountHolder'] === null) { + $invalidProperties[] = "'accountHolder' can't be null"; + } + if ($this->container['accountIdentification'] === null) { + $invalidProperties[] = "'accountIdentification' 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 accountHolder + * + * @return \Adyen\Model\TransferWebhook\PartyIdentification + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\TransferWebhook\PartyIdentification $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + if (is_null($accountHolder)) { + throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); + } + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets accountIdentification + * + * @return \Adyen\Model\TransferWebhook\BankAccountV3AccountIdentification + */ + public function getAccountIdentification() + { + return $this->container['accountIdentification']; + } + + /** + * Sets accountIdentification + * + * @param \Adyen\Model\TransferWebhook\BankAccountV3AccountIdentification $accountIdentification accountIdentification + * + * @return self + */ + public function setAccountIdentification($accountIdentification) + { + if (is_null($accountIdentification)) { + throw new \InvalidArgumentException('non-nullable accountIdentification cannot be null'); + } + $this->container['accountIdentification'] = $accountIdentification; + + 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/TransferWebhook/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhook/BankAccountV3AccountIdentification.php new file mode 100644 index 000000000..e9cd6324f --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/BankAccountV3AccountIdentification.php @@ -0,0 +1,901 @@ + + */ +class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankAccountV3_accountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'bsbCode' => 'string', + 'type' => 'string', + 'bankCode' => 'string', + 'branchNumber' => 'string', + 'accountType' => 'string', + 'institutionNumber' => 'string', + 'transitNumber' => 'string', + 'clearingCode' => 'string', + 'iban' => 'string', + 'additionalBankIdentification' => '\Adyen\Model\TransferWebhook\AdditionalBankIdentification', + 'bic' => 'string', + 'clearingNumber' => 'string', + 'sortCode' => 'string', + 'routingNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountNumber' => null, + 'bsbCode' => null, + 'type' => null, + 'bankCode' => null, + 'branchNumber' => null, + 'accountType' => null, + 'institutionNumber' => null, + 'transitNumber' => null, + 'clearingCode' => null, + 'iban' => null, + 'additionalBankIdentification' => null, + 'bic' => null, + 'clearingNumber' => null, + 'sortCode' => null, + 'routingNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'bsbCode' => false, + 'type' => false, + 'bankCode' => false, + 'branchNumber' => false, + 'accountType' => false, + 'institutionNumber' => false, + 'transitNumber' => false, + 'clearingCode' => false, + 'iban' => false, + 'additionalBankIdentification' => false, + 'bic' => false, + 'clearingNumber' => false, + 'sortCode' => false, + 'routingNumber' => 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', + 'bsbCode' => 'bsbCode', + 'type' => 'type', + 'bankCode' => 'bankCode', + 'branchNumber' => 'branchNumber', + 'accountType' => 'accountType', + 'institutionNumber' => 'institutionNumber', + 'transitNumber' => 'transitNumber', + 'clearingCode' => 'clearingCode', + 'iban' => 'iban', + 'additionalBankIdentification' => 'additionalBankIdentification', + 'bic' => 'bic', + 'clearingNumber' => 'clearingNumber', + 'sortCode' => 'sortCode', + 'routingNumber' => 'routingNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bsbCode' => 'setBsbCode', + 'type' => 'setType', + 'bankCode' => 'setBankCode', + 'branchNumber' => 'setBranchNumber', + 'accountType' => 'setAccountType', + 'institutionNumber' => 'setInstitutionNumber', + 'transitNumber' => 'setTransitNumber', + 'clearingCode' => 'setClearingCode', + 'iban' => 'setIban', + 'additionalBankIdentification' => 'setAdditionalBankIdentification', + 'bic' => 'setBic', + 'clearingNumber' => 'setClearingNumber', + 'sortCode' => 'setSortCode', + 'routingNumber' => 'setRoutingNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'bsbCode' => 'getBsbCode', + 'type' => 'getType', + 'bankCode' => 'getBankCode', + 'branchNumber' => 'getBranchNumber', + 'accountType' => 'getAccountType', + 'institutionNumber' => 'getInstitutionNumber', + 'transitNumber' => 'getTransitNumber', + 'clearingCode' => 'getClearingCode', + 'iban' => 'getIban', + 'additionalBankIdentification' => 'getAdditionalBankIdentification', + 'bic' => 'getBic', + 'clearingNumber' => 'getClearingNumber', + 'sortCode' => 'getSortCode', + 'routingNumber' => 'getRoutingNumber' + ]; + + /** + * 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('accountNumber', $data ?? [], null); + $this->setIfExists('bsbCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('branchNumber', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('institutionNumber', $data ?? [], null); + $this->setIfExists('transitNumber', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); + $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('additionalBankIdentification', $data ?? [], null); + $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('clearingNumber', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); + $this->setIfExists('routingNumber', $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['accountNumber'] === null) { + $invalidProperties[] = "'accountNumber' can't be null"; + } + if ($this->container['bsbCode'] === null) { + $invalidProperties[] = "'bsbCode' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + + if ($this->container['bankCode'] === null) { + $invalidProperties[] = "'bankCode' can't be null"; + } + if ($this->container['branchNumber'] === null) { + $invalidProperties[] = "'branchNumber' can't be null"; + } + + if ($this->container['institutionNumber'] === null) { + $invalidProperties[] = "'institutionNumber' can't be null"; + } + if ($this->container['transitNumber'] === null) { + $invalidProperties[] = "'transitNumber' can't be null"; + } + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; + } + if ($this->container['iban'] === null) { + $invalidProperties[] = "'iban' can't be null"; + } + if ($this->container['bic'] === null) { + $invalidProperties[] = "'bic' can't be null"; + } + if ($this->container['clearingNumber'] === null) { + $invalidProperties[] = "'clearingNumber' can't be null"; + } + if ($this->container['sortCode'] === null) { + $invalidProperties[] = "'sortCode' can't be null"; + } + if ($this->container['routingNumber'] === null) { + $invalidProperties[] = "'routingNumber' 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 accountNumber + * + * @return string + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string $accountNumber The 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 bsbCode + * + * @return string + */ + public function getBsbCode() + { + return $this->container['bsbCode']; + } + + /** + * Sets bsbCode + * + * @param string $bsbCode The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + * + * @return self + */ + public function setBsbCode($bsbCode) + { + if (is_null($bsbCode)) { + throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); + } + $this->container['bsbCode'] = $bsbCode; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **usLocal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets bankCode + * + * @return string + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (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 branchNumber + * + * @return string + */ + public function getBranchNumber() + { + return $this->container['branchNumber']; + } + + /** + * Sets branchNumber + * + * @param string $branchNumber The bank account branch number, without separators or whitespace. + * + * @return self + */ + public function setBranchNumber($branchNumber) + { + if (is_null($branchNumber)) { + throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); + } + $this->container['branchNumber'] = $branchNumber; + + return $this; + } + + /** + * Gets accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets institutionNumber + * + * @return string + */ + public function getInstitutionNumber() + { + return $this->container['institutionNumber']; + } + + /** + * Sets institutionNumber + * + * @param string $institutionNumber The 3-digit institution number, without separators or whitespace. + * + * @return self + */ + public function setInstitutionNumber($institutionNumber) + { + if (is_null($institutionNumber)) { + throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); + } + $this->container['institutionNumber'] = $institutionNumber; + + return $this; + } + + /** + * Gets transitNumber + * + * @return string + */ + public function getTransitNumber() + { + return $this->container['transitNumber']; + } + + /** + * Sets transitNumber + * + * @param string $transitNumber The 5-digit transit number, without separators or whitespace. + * + * @return self + */ + public function setTransitNumber($transitNumber) + { + if (is_null($transitNumber)) { + throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); + } + $this->container['transitNumber'] = $transitNumber; + + return $this; + } + + /** + * Gets clearingCode + * + * @return string + */ + public function getClearingCode() + { + return $this->container['clearingCode']; + } + + /** + * Sets clearingCode + * + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. + * + * @return self + */ + public function setClearingCode($clearingCode) + { + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); + } + $this->container['clearingCode'] = $clearingCode; + + return $this; + } + + /** + * Gets iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets additionalBankIdentification + * + * @return \Adyen\Model\TransferWebhook\AdditionalBankIdentification|null + */ + public function getAdditionalBankIdentification() + { + return $this->container['additionalBankIdentification']; + } + + /** + * Sets additionalBankIdentification + * + * @param \Adyen\Model\TransferWebhook\AdditionalBankIdentification|null $additionalBankIdentification additionalBankIdentification + * + * @return self + */ + public function setAdditionalBankIdentification($additionalBankIdentification) + { + if (is_null($additionalBankIdentification)) { + throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); + } + $this->container['additionalBankIdentification'] = $additionalBankIdentification; + + 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 clearingNumber + * + * @return string + */ + public function getClearingNumber() + { + return $this->container['clearingNumber']; + } + + /** + * Sets clearingNumber + * + * @param string $clearingNumber The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + * + * @return self + */ + public function setClearingNumber($clearingNumber) + { + if (is_null($clearingNumber)) { + throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); + } + $this->container['clearingNumber'] = $clearingNumber; + + return $this; + } + + /** + * Gets sortCode + * + * @return string + */ + public function getSortCode() + { + return $this->container['sortCode']; + } + + /** + * Sets sortCode + * + * @param string $sortCode The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + * + * @return self + */ + public function setSortCode($sortCode) + { + if (is_null($sortCode)) { + throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); + } + $this->container['sortCode'] = $sortCode; + + return $this; + } + + /** + * Gets routingNumber + * + * @return string + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string $routingNumber The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + if (is_null($routingNumber)) { + throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); + } + $this->container['routingNumber'] = $routingNumber; + + 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/TransferWebhook/BankCategoryData.php b/src/Adyen/Model/TransferWebhook/BankCategoryData.php new file mode 100644 index 000000000..5802cfc3b --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/BankCategoryData.php @@ -0,0 +1,490 @@ + + */ +class BankCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankCategoryData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'priority' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'priority' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'priority' => 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 = [ + 'priority' => 'priority', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'priority' => 'setPriority', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'priority' => 'getPriority', + '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 PRIORITY_CROSS_BORDER = 'crossBorder'; + public const PRIORITY_FAST = 'fast'; + public const PRIORITY_INSTANT = 'instant'; + public const PRIORITY_INTERNAL = 'internal'; + public const PRIORITY_REGULAR = 'regular'; + public const PRIORITY_WIRE = 'wire'; + public const TYPE_BANK = 'bank'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPriorityAllowableValues() + { + return [ + self::PRIORITY_CROSS_BORDER, + self::PRIORITY_FAST, + self::PRIORITY_INSTANT, + self::PRIORITY_INTERNAL, + self::PRIORITY_REGULAR, + self::PRIORITY_WIRE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK, + ]; + } + /** + * 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('priority', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'bank'); + } + + /** + * 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->getPriorityAllowableValues(); + if (!is_null($this->container['priority']) && !in_array($this->container['priority'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'priority', must be one of '%s'", + $this->container['priority'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets priority + * + * @return string|null + */ + public function getPriority() + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * + * @return self + */ + public function setPriority($priority) + { + if (is_null($priority)) { + throw new \InvalidArgumentException('non-nullable priority cannot be null'); + } + $allowedValues = $this->getPriorityAllowableValues(); + if (!in_array($priority, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'priority', must be one of '%s'", + $priority, + implode("', '", $allowedValues) + ) + ); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **bank** + * + * @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/TransferWebhook/CALocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/CALocalAccountIdentification.php new file mode 100644 index 000000000..fd34e5753 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/CALocalAccountIdentification.php @@ -0,0 +1,596 @@ + + */ +class CALocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CALocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'accountType' => 'string', + 'institutionNumber' => 'string', + 'transitNumber' => '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, + 'accountType' => null, + 'institutionNumber' => null, + 'transitNumber' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'accountType' => false, + 'institutionNumber' => false, + 'transitNumber' => 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', + 'accountType' => 'accountType', + 'institutionNumber' => 'institutionNumber', + 'transitNumber' => 'transitNumber', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'accountType' => 'setAccountType', + 'institutionNumber' => 'setInstitutionNumber', + 'transitNumber' => 'setTransitNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'accountType' => 'getAccountType', + 'institutionNumber' => 'getInstitutionNumber', + 'transitNumber' => 'getTransitNumber', + '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 ACCOUNT_TYPE_CHECKING = 'checking'; + public const ACCOUNT_TYPE_SAVINGS = 'savings'; + public const TYPE_CA_LOCAL = 'caLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountTypeAllowableValues() + { + return [ + self::ACCOUNT_TYPE_CHECKING, + self::ACCOUNT_TYPE_SAVINGS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CA_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('accountType', $data ?? [], 'checking'); + $this->setIfExists('institutionNumber', $data ?? [], null); + $this->setIfExists('transitNumber', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'caLocal'); + } + + /** + * 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"; + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!is_null($this->container['accountType']) && !in_array($this->container['accountType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountType', must be one of '%s'", + $this->container['accountType'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['institutionNumber'] === null) { + $invalidProperties[] = "'institutionNumber' can't be null"; + } + if ($this->container['transitNumber'] === null) { + $invalidProperties[] = "'transitNumber' 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 5- to 12-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 accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!in_array($accountType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountType', must be one of '%s'", + $accountType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets institutionNumber + * + * @return string + */ + public function getInstitutionNumber() + { + return $this->container['institutionNumber']; + } + + /** + * Sets institutionNumber + * + * @param string $institutionNumber The 3-digit institution number, without separators or whitespace. + * + * @return self + */ + public function setInstitutionNumber($institutionNumber) + { + if (is_null($institutionNumber)) { + throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); + } + $this->container['institutionNumber'] = $institutionNumber; + + return $this; + } + + /** + * Gets transitNumber + * + * @return string + */ + public function getTransitNumber() + { + return $this->container['transitNumber']; + } + + /** + * Sets transitNumber + * + * @param string $transitNumber The 5-digit transit number, without separators or whitespace. + * + * @return self + */ + public function setTransitNumber($transitNumber) + { + if (is_null($transitNumber)) { + throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); + } + $this->container['transitNumber'] = $transitNumber; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **caLocal** + * + * @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/TransferWebhook/CZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/CZLocalAccountIdentification.php new file mode 100644 index 000000000..90454c4e9 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/CZLocalAccountIdentification.php @@ -0,0 +1,492 @@ + + */ +class CZLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CZLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => '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, + 'bankCode' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => 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', + 'bankCode' => 'bankCode', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + '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_CZ_LOCAL = 'czLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CZ_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('bankCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'czLocal'); + } + + /** + * 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['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 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) + * + * @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 bankCode + * + * @return string + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string $bankCode The 4-digit bank code (Kód banky), 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 **czLocal** + * + * @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/TransferWebhook/CounterpartyV3.php b/src/Adyen/Model/TransferWebhook/CounterpartyV3.php new file mode 100644 index 000000000..d99a8ef51 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/CounterpartyV3.php @@ -0,0 +1,486 @@ + + */ +class CounterpartyV3 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CounterpartyV3'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balanceAccountId' => 'string', + 'bankAccount' => '\Adyen\Model\TransferWebhook\BankAccountV3', + 'merchant' => '\Adyen\Model\TransferWebhook\MerchantData', + 'transferInstrumentId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balanceAccountId' => null, + 'bankAccount' => null, + 'merchant' => null, + 'transferInstrumentId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balanceAccountId' => false, + 'bankAccount' => false, + 'merchant' => 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 = [ + 'balanceAccountId' => 'balanceAccountId', + 'bankAccount' => 'bankAccount', + 'merchant' => 'merchant', + 'transferInstrumentId' => 'transferInstrumentId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balanceAccountId' => 'setBalanceAccountId', + 'bankAccount' => 'setBankAccount', + 'merchant' => 'setMerchant', + 'transferInstrumentId' => 'setTransferInstrumentId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balanceAccountId' => 'getBalanceAccountId', + 'bankAccount' => 'getBankAccount', + 'merchant' => 'getMerchant', + '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('balanceAccountId', $data ?? [], null); + $this->setIfExists('bankAccount', $data ?? [], null); + $this->setIfExists('merchant', $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 balanceAccountId + * + * @return string|null + */ + public function getBalanceAccountId() + { + return $this->container['balanceAccountId']; + } + + /** + * Sets balanceAccountId + * + * @param string|null $balanceAccountId Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). + * + * @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 bankAccount + * + * @return \Adyen\Model\TransferWebhook\BankAccountV3|null + */ + public function getBankAccount() + { + return $this->container['bankAccount']; + } + + /** + * Sets bankAccount + * + * @param \Adyen\Model\TransferWebhook\BankAccountV3|null $bankAccount bankAccount + * + * @return self + */ + public function setBankAccount($bankAccount) + { + if (is_null($bankAccount)) { + throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); + } + $this->container['bankAccount'] = $bankAccount; + + return $this; + } + + /** + * Gets merchant + * + * @return \Adyen\Model\TransferWebhook\MerchantData|null + */ + public function getMerchant() + { + return $this->container['merchant']; + } + + /** + * Sets merchant + * + * @param \Adyen\Model\TransferWebhook\MerchantData|null $merchant merchant + * + * @return self + */ + public function setMerchant($merchant) + { + if (is_null($merchant)) { + throw new \InvalidArgumentException('non-nullable merchant cannot be null'); + } + $this->container['merchant'] = $merchant; + + return $this; + } + + /** + * Gets transferInstrumentId + * + * @return string|null + */ + public function getTransferInstrumentId() + { + return $this->container['transferInstrumentId']; + } + + /** + * Sets transferInstrumentId + * + * @param string|null $transferInstrumentId Unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * + * @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/TransferWebhook/DKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/DKLocalAccountIdentification.php new file mode 100644 index 000000000..0ce425f39 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/DKLocalAccountIdentification.php @@ -0,0 +1,492 @@ + + */ +class DKLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DKLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => '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, + 'bankCode' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => 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', + 'bankCode' => 'bankCode', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + '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_DK_LOCAL = 'dkLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_DK_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('bankCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'dkLocal'); + } + + /** + * 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['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 4-10 digits bank account number (Kontonummer) (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 bankCode + * + * @return string + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (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 **dkLocal** + * + * @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/TransferWebhook/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/HKLocalAccountIdentification.php new file mode 100644 index 000000000..091744ca7 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/HKLocalAccountIdentification.php @@ -0,0 +1,492 @@ + + */ +class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'HKLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'clearingCode' => '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, + 'clearingCode' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'clearingCode' => 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', + 'clearingCode' => 'clearingCode', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'clearingCode' => 'setClearingCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'clearingCode' => 'getClearingCode', + '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_HK_LOCAL = 'hkLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_HK_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('clearingCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'hkLocal'); + } + + /** + * 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['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' 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 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * + * @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 clearingCode + * + * @return string + */ + public function getClearingCode() + { + return $this->container['clearingCode']; + } + + /** + * Sets clearingCode + * + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. + * + * @return self + */ + public function setClearingCode($clearingCode) + { + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); + } + $this->container['clearingCode'] = $clearingCode; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **hkLocal** + * + * @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/TransferWebhook/HULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/HULocalAccountIdentification.php new file mode 100644 index 000000000..4b224c124 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/HULocalAccountIdentification.php @@ -0,0 +1,455 @@ + + */ +class HULocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'HULocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => '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, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => 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', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + '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_HU_LOCAL = 'huLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_HU_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('type', $data ?? [], 'huLocal'); + } + + /** + * 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['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 24-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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **huLocal** + * + * @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/TransferWebhook/IbanAccountIdentification.php b/src/Adyen/Model/TransferWebhook/IbanAccountIdentification.php new file mode 100644 index 000000000..87f39703d --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/IbanAccountIdentification.php @@ -0,0 +1,455 @@ + + */ +class IbanAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'IbanAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'iban' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'iban' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'iban' => 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 = [ + 'iban' => 'iban', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'iban' => 'setIban', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'iban' => 'getIban', + '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_IBAN = 'iban'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_IBAN, + ]; + } + /** + * 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('iban', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'iban'); + } + + /** + * 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['iban'] === null) { + $invalidProperties[] = "'iban' 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 iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **iban** + * + * @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/TransferWebhook/InternalCategoryData.php b/src/Adyen/Model/TransferWebhook/InternalCategoryData.php new file mode 100644 index 000000000..3560de18f --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/InternalCategoryData.php @@ -0,0 +1,483 @@ + + */ +class InternalCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'InternalCategoryData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'modificationMerchantReference' => 'string', + 'modificationPspReference' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'modificationMerchantReference' => null, + 'modificationPspReference' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'modificationMerchantReference' => false, + 'modificationPspReference' => 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 = [ + 'modificationMerchantReference' => 'modificationMerchantReference', + 'modificationPspReference' => 'modificationPspReference', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'modificationMerchantReference' => 'setModificationMerchantReference', + 'modificationPspReference' => 'setModificationPspReference', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'modificationMerchantReference' => 'getModificationMerchantReference', + 'modificationPspReference' => 'getModificationPspReference', + '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_INTERNAL = 'internal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_INTERNAL, + ]; + } + /** + * 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('modificationMerchantReference', $data ?? [], null); + $this->setIfExists('modificationPspReference', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'internal'); + } + + /** + * 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->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 modificationMerchantReference + * + * @return string|null + */ + public function getModificationMerchantReference() + { + return $this->container['modificationMerchantReference']; + } + + /** + * Sets modificationMerchantReference + * + * @param string|null $modificationMerchantReference The capture's merchant reference included in the transfer. + * + * @return self + */ + public function setModificationMerchantReference($modificationMerchantReference) + { + if (is_null($modificationMerchantReference)) { + throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); + } + $this->container['modificationMerchantReference'] = $modificationMerchantReference; + + return $this; + } + + /** + * Gets modificationPspReference + * + * @return string|null + */ + public function getModificationPspReference() + { + return $this->container['modificationPspReference']; + } + + /** + * Sets modificationPspReference + * + * @param string|null $modificationPspReference The capture reference included in the transfer. + * + * @return self + */ + public function setModificationPspReference($modificationPspReference) + { + if (is_null($modificationPspReference)) { + throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); + } + $this->container['modificationPspReference'] = $modificationPspReference; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **internal** + * + * @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/TransferWebhook/IssuedCard.php b/src/Adyen/Model/TransferWebhook/IssuedCard.php new file mode 100644 index 000000000..9afe39f41 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/IssuedCard.php @@ -0,0 +1,639 @@ + + */ +class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'IssuedCard'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'panEntryMode' => 'string', + 'processingType' => 'string', + 'relayedAuthorisationData' => '\Adyen\Model\TransferWebhook\RelayedAuthorisationData', + 'type' => 'string', + 'validationFacts' => '\Adyen\Model\TransferWebhook\TransferNotificationValidationFact[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'panEntryMode' => null, + 'processingType' => null, + 'relayedAuthorisationData' => null, + 'type' => null, + 'validationFacts' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'panEntryMode' => false, + 'processingType' => false, + 'relayedAuthorisationData' => false, + 'type' => false, + 'validationFacts' => 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 = [ + 'panEntryMode' => 'panEntryMode', + 'processingType' => 'processingType', + 'relayedAuthorisationData' => 'relayedAuthorisationData', + 'type' => 'type', + 'validationFacts' => 'validationFacts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'panEntryMode' => 'setPanEntryMode', + 'processingType' => 'setProcessingType', + 'relayedAuthorisationData' => 'setRelayedAuthorisationData', + 'type' => 'setType', + 'validationFacts' => 'setValidationFacts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'panEntryMode' => 'getPanEntryMode', + 'processingType' => 'getProcessingType', + 'relayedAuthorisationData' => 'getRelayedAuthorisationData', + 'type' => 'getType', + 'validationFacts' => 'getValidationFacts' + ]; + + /** + * 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 PAN_ENTRY_MODE_CHIP = 'chip'; + public const PAN_ENTRY_MODE_COF = 'cof'; + public const PAN_ENTRY_MODE_CONTACTLESS = 'contactless'; + public const PAN_ENTRY_MODE_ECOMMERCE = 'ecommerce'; + public const PAN_ENTRY_MODE_MAGSTRIPE = 'magstripe'; + public const PAN_ENTRY_MODE_MANUAL = 'manual'; + public const PAN_ENTRY_MODE_TOKEN = 'token'; + public const PROCESSING_TYPE_ATM_WITHDRAW = 'atmWithdraw'; + public const PROCESSING_TYPE_BALANCE_INQUIRY = 'balanceInquiry'; + public const PROCESSING_TYPE_ECOMMERCE = 'ecommerce'; + public const PROCESSING_TYPE_MOTO = 'moto'; + public const PROCESSING_TYPE_POS = 'pos'; + public const PROCESSING_TYPE_PURCHASE_WITH_CASHBACK = 'purchaseWithCashback'; + public const PROCESSING_TYPE_RECURRING = 'recurring'; + public const PROCESSING_TYPE_TOKEN = 'token'; + public const TYPE_ISSUED_CARD = 'issuedCard'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPanEntryModeAllowableValues() + { + return [ + self::PAN_ENTRY_MODE_CHIP, + self::PAN_ENTRY_MODE_COF, + self::PAN_ENTRY_MODE_CONTACTLESS, + self::PAN_ENTRY_MODE_ECOMMERCE, + self::PAN_ENTRY_MODE_MAGSTRIPE, + self::PAN_ENTRY_MODE_MANUAL, + self::PAN_ENTRY_MODE_TOKEN, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_ATM_WITHDRAW, + self::PROCESSING_TYPE_BALANCE_INQUIRY, + self::PROCESSING_TYPE_ECOMMERCE, + self::PROCESSING_TYPE_MOTO, + self::PROCESSING_TYPE_POS, + self::PROCESSING_TYPE_PURCHASE_WITH_CASHBACK, + self::PROCESSING_TYPE_RECURRING, + self::PROCESSING_TYPE_TOKEN, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ISSUED_CARD, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('panEntryMode', $data ?? [], null); + $this->setIfExists('processingType', $data ?? [], null); + $this->setIfExists('relayedAuthorisationData', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'issuedCard'); + $this->setIfExists('validationFacts', $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->getPanEntryModeAllowableValues(); + if (!is_null($this->container['panEntryMode']) && !in_array($this->container['panEntryMode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'panEntryMode', must be one of '%s'", + $this->container['panEntryMode'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets panEntryMode + * + * @return string|null + */ + public function getPanEntryMode() + { + return $this->container['panEntryMode']; + } + + /** + * Sets panEntryMode + * + * @param string|null $panEntryMode Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + * + * @return self + */ + public function setPanEntryMode($panEntryMode) + { + if (is_null($panEntryMode)) { + throw new \InvalidArgumentException('non-nullable panEntryMode cannot be null'); + } + $allowedValues = $this->getPanEntryModeAllowableValues(); + if (!in_array($panEntryMode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'panEntryMode', must be one of '%s'", + $panEntryMode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['panEntryMode'] = $panEntryMode; + + return $this; + } + + /** + * Gets processingType + * + * @return string|null + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string|null $processingType Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + * + * @return self + */ + public function setProcessingType($processingType) + { + if (is_null($processingType)) { + throw new \InvalidArgumentException('non-nullable processingType cannot be null'); + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets relayedAuthorisationData + * + * @return \Adyen\Model\TransferWebhook\RelayedAuthorisationData|null + */ + public function getRelayedAuthorisationData() + { + return $this->container['relayedAuthorisationData']; + } + + /** + * Sets relayedAuthorisationData + * + * @param \Adyen\Model\TransferWebhook\RelayedAuthorisationData|null $relayedAuthorisationData relayedAuthorisationData + * + * @return self + */ + public function setRelayedAuthorisationData($relayedAuthorisationData) + { + if (is_null($relayedAuthorisationData)) { + throw new \InvalidArgumentException('non-nullable relayedAuthorisationData cannot be null'); + } + $this->container['relayedAuthorisationData'] = $relayedAuthorisationData; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **issuedCard** + * + * @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 validationFacts + * + * @return \Adyen\Model\TransferWebhook\TransferNotificationValidationFact[]|null + */ + public function getValidationFacts() + { + return $this->container['validationFacts']; + } + + /** + * Sets validationFacts + * + * @param \Adyen\Model\TransferWebhook\TransferNotificationValidationFact[]|null $validationFacts The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + * + * @return self + */ + public function setValidationFacts($validationFacts) + { + if (is_null($validationFacts)) { + throw new \InvalidArgumentException('non-nullable validationFacts cannot be null'); + } + $this->container['validationFacts'] = $validationFacts; + + 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/TransferWebhook/MerchantData.php b/src/Adyen/Model/TransferWebhook/MerchantData.php new file mode 100644 index 000000000..cb949185a --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/MerchantData.php @@ -0,0 +1,520 @@ + + */ +class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MerchantData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acquirerId' => 'string', + 'mcc' => 'string', + 'merchantId' => 'string', + 'nameLocation' => '\Adyen\Model\TransferWebhook\NameLocation', + 'postalCode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acquirerId' => null, + 'mcc' => null, + 'merchantId' => null, + 'nameLocation' => null, + 'postalCode' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acquirerId' => false, + 'mcc' => false, + 'merchantId' => false, + 'nameLocation' => false, + 'postalCode' => 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 = [ + 'acquirerId' => 'acquirerId', + 'mcc' => 'mcc', + 'merchantId' => 'merchantId', + 'nameLocation' => 'nameLocation', + 'postalCode' => 'postalCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acquirerId' => 'setAcquirerId', + 'mcc' => 'setMcc', + 'merchantId' => 'setMerchantId', + 'nameLocation' => 'setNameLocation', + 'postalCode' => 'setPostalCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acquirerId' => 'getAcquirerId', + 'mcc' => 'getMcc', + 'merchantId' => 'getMerchantId', + 'nameLocation' => 'getNameLocation', + 'postalCode' => 'getPostalCode' + ]; + + /** + * 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('acquirerId', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('merchantId', $data ?? [], null); + $this->setIfExists('nameLocation', $data ?? [], null); + $this->setIfExists('postalCode', $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 acquirerId + * + * @return string|null + */ + public function getAcquirerId() + { + return $this->container['acquirerId']; + } + + /** + * Sets acquirerId + * + * @param string|null $acquirerId The unique identifier of the merchant's acquirer. + * + * @return self + */ + public function setAcquirerId($acquirerId) + { + if (is_null($acquirerId)) { + throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); + } + $this->container['acquirerId'] = $acquirerId; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc The merchant category code. + * + * @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 merchantId + * + * @return string|null + */ + public function getMerchantId() + { + return $this->container['merchantId']; + } + + /** + * Sets merchantId + * + * @param string|null $merchantId The merchant identifier. + * + * @return self + */ + public function setMerchantId($merchantId) + { + if (is_null($merchantId)) { + throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); + } + $this->container['merchantId'] = $merchantId; + + return $this; + } + + /** + * Gets nameLocation + * + * @return \Adyen\Model\TransferWebhook\NameLocation|null + */ + public function getNameLocation() + { + return $this->container['nameLocation']; + } + + /** + * Sets nameLocation + * + * @param \Adyen\Model\TransferWebhook\NameLocation|null $nameLocation nameLocation + * + * @return self + */ + public function setNameLocation($nameLocation) + { + if (is_null($nameLocation)) { + throw new \InvalidArgumentException('non-nullable nameLocation cannot be null'); + } + $this->container['nameLocation'] = $nameLocation; + + return $this; + } + + /** + * Gets postalCode + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string|null $postalCode The merchant postal code. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + 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/TransferWebhook/ModelInterface.php b/src/Adyen/Model/TransferWebhook/ModelInterface.php new file mode 100644 index 000000000..c1d023c74 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/ModelInterface.php @@ -0,0 +1,92 @@ + + */ +class Modification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Modification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'direction' => 'string', + 'id' => 'string', + 'reference' => 'string', + 'status' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'direction' => null, + 'id' => null, + 'reference' => null, + 'status' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'direction' => false, + 'id' => false, + 'reference' => false, + 'status' => 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 = [ + 'direction' => 'direction', + 'id' => 'id', + 'reference' => 'reference', + 'status' => 'status', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'direction' => 'setDirection', + 'id' => 'setId', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'direction' => 'getDirection', + 'id' => 'getId', + 'reference' => 'getReference', + 'status' => 'getStatus', + '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 STATUS_APPROVAL_PENDING = 'approvalPending'; + public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING = 'atmWithdrawalReversalPending'; + public const STATUS_ATM_WITHDRAWAL_REVERSED = 'atmWithdrawalReversed'; + public const STATUS_AUTH_ADJUSTMENT_AUTHORISED = 'authAdjustmentAuthorised'; + public const STATUS_AUTH_ADJUSTMENT_ERROR = 'authAdjustmentError'; + public const STATUS_AUTH_ADJUSTMENT_REFUSED = 'authAdjustmentRefused'; + public const STATUS_AUTHORISED = 'authorised'; + public const STATUS_BANK_TRANSFER = 'bankTransfer'; + public const STATUS_BANK_TRANSFER_PENDING = 'bankTransferPending'; + public const STATUS_BOOKED = 'booked'; + public const STATUS_BOOKING_PENDING = 'bookingPending'; + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_CAPTURE_PENDING = 'capturePending'; + 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'; + public const STATUS_CREDITED = 'credited'; + public const STATUS_DEPOSIT_CORRECTION = 'depositCorrection'; + public const STATUS_DEPOSIT_CORRECTION_PENDING = 'depositCorrectionPending'; + public const STATUS_DISPUTE = 'dispute'; + public const STATUS_DISPUTE_CLOSED = 'disputeClosed'; + public const STATUS_DISPUTE_EXPIRED = 'disputeExpired'; + public const STATUS_DISPUTE_NEEDS_REVIEW = 'disputeNeedsReview'; + public const STATUS_ERROR = 'error'; + public const STATUS_EXPIRED = 'expired'; + public const STATUS_FAILED = 'failed'; + public const STATUS_FEE = 'fee'; + public const STATUS_FEE_PENDING = 'feePending'; + public const STATUS_INTERNAL_TRANSFER = 'internalTransfer'; + public const STATUS_INTERNAL_TRANSFER_PENDING = 'internalTransferPending'; + public const STATUS_INVOICE_DEDUCTION = 'invoiceDeduction'; + public const STATUS_INVOICE_DEDUCTION_PENDING = 'invoiceDeductionPending'; + public const STATUS_MANUAL_CORRECTION_PENDING = 'manualCorrectionPending'; + public const STATUS_MANUALLY_CORRECTED = 'manuallyCorrected'; + public const STATUS_MATCHED_STATEMENT = 'matchedStatement'; + public const STATUS_MATCHED_STATEMENT_PENDING = 'matchedStatementPending'; + public const STATUS_MERCHANT_PAYIN = 'merchantPayin'; + public const STATUS_MERCHANT_PAYIN_PENDING = 'merchantPayinPending'; + public const STATUS_MERCHANT_PAYIN_REVERSED = 'merchantPayinReversed'; + public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; + public const STATUS_MISC_COST = 'miscCost'; + public const STATUS_MISC_COST_PENDING = 'miscCostPending'; + public const STATUS_PAYMENT_COST = 'paymentCost'; + public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_RECEIVED = 'received'; + public const STATUS_REFUND_PENDING = 'refundPending'; + 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'; + public const STATUS_RETURNED = 'returned'; + public const STATUS_SECOND_CHARGEBACK = 'secondChargeback'; + public const STATUS_SECOND_CHARGEBACK_PENDING = 'secondChargebackPending'; + public const STATUS_UNDEFINED = 'undefined'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_APPROVAL_PENDING, + self::STATUS_ATM_WITHDRAWAL, + self::STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING, + self::STATUS_ATM_WITHDRAWAL_REVERSED, + self::STATUS_AUTH_ADJUSTMENT_AUTHORISED, + self::STATUS_AUTH_ADJUSTMENT_ERROR, + self::STATUS_AUTH_ADJUSTMENT_REFUSED, + self::STATUS_AUTHORISED, + self::STATUS_BANK_TRANSFER, + self::STATUS_BANK_TRANSFER_PENDING, + self::STATUS_BOOKED, + self::STATUS_BOOKING_PENDING, + self::STATUS_CANCELLED, + self::STATUS_CAPTURE_PENDING, + 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, + self::STATUS_CREDITED, + self::STATUS_DEPOSIT_CORRECTION, + self::STATUS_DEPOSIT_CORRECTION_PENDING, + self::STATUS_DISPUTE, + self::STATUS_DISPUTE_CLOSED, + self::STATUS_DISPUTE_EXPIRED, + self::STATUS_DISPUTE_NEEDS_REVIEW, + self::STATUS_ERROR, + self::STATUS_EXPIRED, + self::STATUS_FAILED, + self::STATUS_FEE, + self::STATUS_FEE_PENDING, + self::STATUS_INTERNAL_TRANSFER, + self::STATUS_INTERNAL_TRANSFER_PENDING, + self::STATUS_INVOICE_DEDUCTION, + self::STATUS_INVOICE_DEDUCTION_PENDING, + self::STATUS_MANUAL_CORRECTION_PENDING, + self::STATUS_MANUALLY_CORRECTED, + self::STATUS_MATCHED_STATEMENT, + self::STATUS_MATCHED_STATEMENT_PENDING, + self::STATUS_MERCHANT_PAYIN, + self::STATUS_MERCHANT_PAYIN_PENDING, + self::STATUS_MERCHANT_PAYIN_REVERSED, + self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, + self::STATUS_MISC_COST, + self::STATUS_MISC_COST_PENDING, + self::STATUS_PAYMENT_COST, + self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_RECEIVED, + self::STATUS_REFUND_PENDING, + 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, + self::STATUS_RETURNED, + self::STATUS_SECOND_CHARGEBACK, + self::STATUS_SECOND_CHARGEBACK_PENDING, + self::STATUS_UNDEFINED, + ]; + } + /** + * 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('direction', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->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 direction + * + * @return string|null + */ + public function getDirection() + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param string|null $direction The direction of the money movement. + * + * @return self + */ + public function setDirection($direction) + { + if (is_null($direction)) { + throw new \InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Our reference for the modification. + * + * @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 reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the modification, used internally within your platform. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the transfer event. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of transfer modification. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + /** + * 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/TransferWebhook/NOLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/NOLocalAccountIdentification.php new file mode 100644 index 000000000..e72ab534c --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/NOLocalAccountIdentification.php @@ -0,0 +1,455 @@ + + */ +class NOLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NOLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => '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, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => 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', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + '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_NO_LOCAL = 'noLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_NO_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('type', $data ?? [], 'noLocal'); + } + + /** + * 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['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 11-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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **noLocal** + * + * @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/TransferWebhook/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/NZLocalAccountIdentification.php new file mode 100644 index 000000000..989f10eb6 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/NZLocalAccountIdentification.php @@ -0,0 +1,455 @@ + + */ +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', + '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, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => 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', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + '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('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['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 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. + * + * @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 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/TransferWebhook/NameLocation.php b/src/Adyen/Model/TransferWebhook/NameLocation.php new file mode 100644 index 000000000..0fd69e385 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/NameLocation.php @@ -0,0 +1,554 @@ + + */ +class NameLocation implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NameLocation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'countryOfOrigin' => 'string', + 'name' => 'string', + 'rawData' => 'string', + 'state' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'countryOfOrigin' => null, + 'name' => null, + 'rawData' => null, + 'state' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'countryOfOrigin' => false, + 'name' => false, + 'rawData' => false, + 'state' => 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 = [ + 'city' => 'city', + 'country' => 'country', + 'countryOfOrigin' => 'countryOfOrigin', + 'name' => 'name', + 'rawData' => 'rawData', + 'state' => 'state' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'countryOfOrigin' => 'setCountryOfOrigin', + 'name' => 'setName', + 'rawData' => 'setRawData', + 'state' => 'setState' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'countryOfOrigin' => 'getCountryOfOrigin', + 'name' => 'getName', + 'rawData' => 'getRawData', + 'state' => 'getState' + ]; + + /** + * 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('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('countryOfOrigin', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('rawData', $data ?? [], null); + $this->setIfExists('state', $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 city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The city where the merchant is located. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets countryOfOrigin + * + * @return string|null + */ + public function getCountryOfOrigin() + { + return $this->container['countryOfOrigin']; + } + + /** + * Sets countryOfOrigin + * + * @param string|null $countryOfOrigin The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies. + * + * @return self + */ + public function setCountryOfOrigin($countryOfOrigin) + { + if (is_null($countryOfOrigin)) { + throw new \InvalidArgumentException('non-nullable countryOfOrigin cannot be null'); + } + $this->container['countryOfOrigin'] = $countryOfOrigin; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the merchant's shop or service. + * + * @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 rawData + * + * @return string|null + */ + public function getRawData() + { + return $this->container['rawData']; + } + + /** + * Sets rawData + * + * @param string|null $rawData The raw data. + * + * @return self + */ + public function setRawData($rawData) + { + if (is_null($rawData)) { + throw new \InvalidArgumentException('non-nullable rawData cannot be null'); + } + $this->container['rawData'] = $rawData; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state The state where the merchant is located. + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + 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/TransferWebhook/NumberAndBicAccountIdentification.php b/src/Adyen/Model/TransferWebhook/NumberAndBicAccountIdentification.php new file mode 100644 index 000000000..97974203f --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/NumberAndBicAccountIdentification.php @@ -0,0 +1,526 @@ + + */ +class NumberAndBicAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NumberAndBicAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'additionalBankIdentification' => '\Adyen\Model\TransferWebhook\AdditionalBankIdentification', + '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, + 'additionalBankIdentification' => null, + 'bic' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'additionalBankIdentification' => 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', + 'additionalBankIdentification' => 'additionalBankIdentification', + 'bic' => 'bic', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'additionalBankIdentification' => 'setAdditionalBankIdentification', + 'bic' => 'setBic', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'additionalBankIdentification' => 'getAdditionalBankIdentification', + '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_NUMBER_AND_BIC = 'numberAndBic'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_NUMBER_AND_BIC, + ]; + } + /** + * 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('additionalBankIdentification', $data ?? [], null); + $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'numberAndBic'); + } + + /** + * 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"; + } + 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 bank account number, without separators or whitespace. The length and format depends on the bank or country. + * + * @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 additionalBankIdentification + * + * @return \Adyen\Model\TransferWebhook\AdditionalBankIdentification|null + */ + public function getAdditionalBankIdentification() + { + return $this->container['additionalBankIdentification']; + } + + /** + * Sets additionalBankIdentification + * + * @param \Adyen\Model\TransferWebhook\AdditionalBankIdentification|null $additionalBankIdentification additionalBankIdentification + * + * @return self + */ + public function setAdditionalBankIdentification($additionalBankIdentification) + { + if (is_null($additionalBankIdentification)) { + throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); + } + $this->container['additionalBankIdentification'] = $additionalBankIdentification; + + 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 + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **numberAndBic** + * + * @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/TransferWebhook/ObjectSerializer.php b/src/Adyen/Model/TransferWebhook/ObjectSerializer.php new file mode 100644 index 000000000..a390485e2 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/ObjectSerializer.php @@ -0,0 +1,316 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/TransferWebhook/PLLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/PLLocalAccountIdentification.php new file mode 100644 index 000000000..934aa2f5a --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/PLLocalAccountIdentification.php @@ -0,0 +1,455 @@ + + */ +class PLLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PLLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => '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, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => 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', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + '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_PL_LOCAL = 'plLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PL_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('type', $data ?? [], 'plLocal'); + } + + /** + * 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['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 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), 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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **plLocal** + * + * @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/TransferWebhook/PartyIdentification.php b/src/Adyen/Model/TransferWebhook/PartyIdentification.php new file mode 100644 index 000000000..32c265fad --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/PartyIdentification.php @@ -0,0 +1,626 @@ + + */ +class PartyIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PartyIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'address' => '\Adyen\Model\TransferWebhook\Address', + 'dateOfBirth' => '\DateTime', + 'firstName' => 'string', + 'fullName' => 'string', + 'lastName' => 'string', + 'reference' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'address' => null, + 'dateOfBirth' => 'date', + 'firstName' => null, + 'fullName' => null, + 'lastName' => null, + 'reference' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'address' => false, + 'dateOfBirth' => false, + 'firstName' => false, + 'fullName' => false, + 'lastName' => false, + 'reference' => 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 = [ + 'address' => 'address', + 'dateOfBirth' => 'dateOfBirth', + 'firstName' => 'firstName', + 'fullName' => 'fullName', + 'lastName' => 'lastName', + 'reference' => 'reference', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'dateOfBirth' => 'setDateOfBirth', + 'firstName' => 'setFirstName', + 'fullName' => 'setFullName', + 'lastName' => 'setLastName', + 'reference' => 'setReference', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'dateOfBirth' => 'getDateOfBirth', + 'firstName' => 'getFirstName', + 'fullName' => 'getFullName', + 'lastName' => 'getLastName', + 'reference' => 'getReference', + '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_INDIVIDUAL = 'individual'; + public const TYPE_ORGANIZATION = 'organization'; + public const TYPE_UNKNOWN = 'unknown'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_INDIVIDUAL, + self::TYPE_ORGANIZATION, + self::TYPE_UNKNOWN, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('fullName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'unknown'); + } + + /** + * 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['fullName'] === null) { + $invalidProperties[] = "'fullName' 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 address + * + * @return \Adyen\Model\TransferWebhook\Address|null + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Adyen\Model\TransferWebhook\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 dateOfBirth + * + * @return \DateTime|null + */ + public function getDateOfBirth() + { + return $this->container['dateOfBirth']; + } + + /** + * 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**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. + * + * @return self + */ + public function setDateOfBirth($dateOfBirth) + { + if (is_null($dateOfBirth)) { + throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName First name of the individual. Allowed only when `type` is **individual**. + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets fullName + * + * @return string + */ + public function getFullName() + { + return $this->container['fullName']; + } + + /** + * Sets fullName + * + * @param string $fullName The name of the entity. + * + * @return self + */ + public function setFullName($fullName) + { + if (is_null($fullName)) { + throw new \InvalidArgumentException('non-nullable fullName cannot be null'); + } + $this->container['fullName'] = $fullName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName Last name of the individual. Allowed only when `type` is **individual**. + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @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 + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of entity that owns the bank account. Possible values: **individual**, **organization**, or **unknown**. + * + * @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/TransferWebhook/PaymentInstrument.php b/src/Adyen/Model/TransferWebhook/PaymentInstrument.php new file mode 100644 index 000000000..c2130e87d --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/PaymentInstrument.php @@ -0,0 +1,486 @@ + + */ +class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentInstrument'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'reference' => 'string', + 'tokenType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'reference' => null, + 'tokenType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'reference' => false, + 'tokenType' => 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', + 'id' => 'id', + 'reference' => 'reference', + 'tokenType' => 'tokenType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'reference' => 'setReference', + 'tokenType' => 'setTokenType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'reference' => 'getReference', + 'tokenType' => 'getTokenType' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('tokenType', $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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets tokenType + * + * @return string|null + */ + public function getTokenType() + { + return $this->container['tokenType']; + } + + /** + * Sets tokenType + * + * @param string|null $tokenType The type of wallet the network token is associated with. + * + * @return self + */ + public function setTokenType($tokenType) + { + if (is_null($tokenType)) { + throw new \InvalidArgumentException('non-nullable tokenType cannot be null'); + } + $this->container['tokenType'] = $tokenType; + + 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/TransferWebhook/PlatformPayment.php b/src/Adyen/Model/TransferWebhook/PlatformPayment.php new file mode 100644 index 000000000..b8f5597bc --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/PlatformPayment.php @@ -0,0 +1,640 @@ + + */ +class PlatformPayment implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PlatformPayment'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'modificationMerchantReference' => 'string', + 'modificationPspReference' => 'string', + 'paymentMerchantReference' => 'string', + 'platformPaymentType' => 'string', + 'pspPaymentReference' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'modificationMerchantReference' => null, + 'modificationPspReference' => null, + 'paymentMerchantReference' => null, + 'platformPaymentType' => null, + 'pspPaymentReference' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'modificationMerchantReference' => false, + 'modificationPspReference' => false, + 'paymentMerchantReference' => false, + 'platformPaymentType' => false, + 'pspPaymentReference' => 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 = [ + 'modificationMerchantReference' => 'modificationMerchantReference', + 'modificationPspReference' => 'modificationPspReference', + 'paymentMerchantReference' => 'paymentMerchantReference', + 'platformPaymentType' => 'platformPaymentType', + 'pspPaymentReference' => 'pspPaymentReference', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'modificationMerchantReference' => 'setModificationMerchantReference', + 'modificationPspReference' => 'setModificationPspReference', + 'paymentMerchantReference' => 'setPaymentMerchantReference', + 'platformPaymentType' => 'setPlatformPaymentType', + 'pspPaymentReference' => 'setPspPaymentReference', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'modificationMerchantReference' => 'getModificationMerchantReference', + 'modificationPspReference' => 'getModificationPspReference', + 'paymentMerchantReference' => 'getPaymentMerchantReference', + 'platformPaymentType' => 'getPlatformPaymentType', + 'pspPaymentReference' => 'getPspPaymentReference', + '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 PLATFORM_PAYMENT_TYPE_ACQUIRING_FEES = 'AcquiringFees'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_COMMISSION = 'AdyenCommission'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_FEES = 'AdyenFees'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_MARKUP = 'AdyenMarkup'; + public const PLATFORM_PAYMENT_TYPE_BALANCE_ACCOUNT = 'BalanceAccount'; + public const PLATFORM_PAYMENT_TYPE_COMMISSION = 'Commission'; + public const PLATFORM_PAYMENT_TYPE__DEFAULT = 'Default'; + public const PLATFORM_PAYMENT_TYPE_INTERCHANGE = 'Interchange'; + public const PLATFORM_PAYMENT_TYPE_PAYMENT_FEE = 'PaymentFee'; + public const PLATFORM_PAYMENT_TYPE_REMAINDER = 'Remainder'; + public const PLATFORM_PAYMENT_TYPE_SCHEME_FEE = 'SchemeFee'; + public const PLATFORM_PAYMENT_TYPE_TOP_UP = 'TopUp'; + public const PLATFORM_PAYMENT_TYPE_VAT = 'VAT'; + public const TYPE_PLATFORM_PAYMENT = 'platformPayment'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlatformPaymentTypeAllowableValues() + { + return [ + self::PLATFORM_PAYMENT_TYPE_ACQUIRING_FEES, + self::PLATFORM_PAYMENT_TYPE_ADYEN_COMMISSION, + self::PLATFORM_PAYMENT_TYPE_ADYEN_FEES, + self::PLATFORM_PAYMENT_TYPE_ADYEN_MARKUP, + self::PLATFORM_PAYMENT_TYPE_BALANCE_ACCOUNT, + self::PLATFORM_PAYMENT_TYPE_COMMISSION, + self::PLATFORM_PAYMENT_TYPE__DEFAULT, + self::PLATFORM_PAYMENT_TYPE_INTERCHANGE, + self::PLATFORM_PAYMENT_TYPE_PAYMENT_FEE, + self::PLATFORM_PAYMENT_TYPE_REMAINDER, + self::PLATFORM_PAYMENT_TYPE_SCHEME_FEE, + self::PLATFORM_PAYMENT_TYPE_TOP_UP, + self::PLATFORM_PAYMENT_TYPE_VAT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PLATFORM_PAYMENT, + ]; + } + /** + * 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('modificationMerchantReference', $data ?? [], null); + $this->setIfExists('modificationPspReference', $data ?? [], null); + $this->setIfExists('paymentMerchantReference', $data ?? [], null); + $this->setIfExists('platformPaymentType', $data ?? [], null); + $this->setIfExists('pspPaymentReference', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'platformPayment'); + } + + /** + * 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->getPlatformPaymentTypeAllowableValues(); + if (!is_null($this->container['platformPaymentType']) && !in_array($this->container['platformPaymentType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'platformPaymentType', must be one of '%s'", + $this->container['platformPaymentType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets modificationMerchantReference + * + * @return string|null + */ + public function getModificationMerchantReference() + { + return $this->container['modificationMerchantReference']; + } + + /** + * Sets modificationMerchantReference + * + * @param string|null $modificationMerchantReference The capture's merchant reference included in the transfer. + * + * @return self + */ + public function setModificationMerchantReference($modificationMerchantReference) + { + if (is_null($modificationMerchantReference)) { + throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); + } + $this->container['modificationMerchantReference'] = $modificationMerchantReference; + + return $this; + } + + /** + * Gets modificationPspReference + * + * @return string|null + */ + public function getModificationPspReference() + { + return $this->container['modificationPspReference']; + } + + /** + * Sets modificationPspReference + * + * @param string|null $modificationPspReference The capture reference included in the transfer. + * + * @return self + */ + public function setModificationPspReference($modificationPspReference) + { + if (is_null($modificationPspReference)) { + throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); + } + $this->container['modificationPspReference'] = $modificationPspReference; + + return $this; + } + + /** + * Gets paymentMerchantReference + * + * @return string|null + */ + public function getPaymentMerchantReference() + { + return $this->container['paymentMerchantReference']; + } + + /** + * Sets paymentMerchantReference + * + * @param string|null $paymentMerchantReference The payment's merchant reference included in the transfer. + * + * @return self + */ + public function setPaymentMerchantReference($paymentMerchantReference) + { + if (is_null($paymentMerchantReference)) { + throw new \InvalidArgumentException('non-nullable paymentMerchantReference cannot be null'); + } + $this->container['paymentMerchantReference'] = $paymentMerchantReference; + + return $this; + } + + /** + * Gets platformPaymentType + * + * @return string|null + */ + public function getPlatformPaymentType() + { + return $this->container['platformPaymentType']; + } + + /** + * Sets platformPaymentType + * + * @param string|null $platformPaymentType The type of the related split. + * + * @return self + */ + public function setPlatformPaymentType($platformPaymentType) + { + if (is_null($platformPaymentType)) { + throw new \InvalidArgumentException('non-nullable platformPaymentType cannot be null'); + } + $allowedValues = $this->getPlatformPaymentTypeAllowableValues(); + if (!in_array($platformPaymentType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'platformPaymentType', must be one of '%s'", + $platformPaymentType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['platformPaymentType'] = $platformPaymentType; + + return $this; + } + + /** + * Gets pspPaymentReference + * + * @return string|null + */ + public function getPspPaymentReference() + { + return $this->container['pspPaymentReference']; + } + + /** + * Sets pspPaymentReference + * + * @param string|null $pspPaymentReference The payment reference included in the transfer. + * + * @return self + */ + public function setPspPaymentReference($pspPaymentReference) + { + if (is_null($pspPaymentReference)) { + throw new \InvalidArgumentException('non-nullable pspPaymentReference cannot be null'); + } + $this->container['pspPaymentReference'] = $pspPaymentReference; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **platformPayment** + * + * @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/TransferWebhook/RelayedAuthorisationData.php b/src/Adyen/Model/TransferWebhook/RelayedAuthorisationData.php new file mode 100644 index 000000000..85d3e0755 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/RelayedAuthorisationData.php @@ -0,0 +1,418 @@ + + */ +class RelayedAuthorisationData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RelayedAuthorisationData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'metadata' => 'array', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'metadata' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'metadata' => false, + 'reference' => 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 = [ + 'metadata' => 'metadata', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'metadata' => 'setMetadata', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'metadata' => 'getMetadata', + 'reference' => 'getReference' + ]; + + /** + * 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('metadata', $data ?? [], null); + $this->setIfExists('reference', $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 metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. + * + * @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 + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the relayed authorisation data. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/TransferWebhook/Resource.php b/src/Adyen/Model/TransferWebhook/Resource.php new file mode 100644 index 000000000..160dbfbf5 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/Resource.php @@ -0,0 +1,452 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** + * 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/TransferWebhook/ResourceReference.php b/src/Adyen/Model/TransferWebhook/ResourceReference.php new file mode 100644 index 000000000..ddec6a554 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/ResourceReference.php @@ -0,0 +1,452 @@ + + */ +class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResourceReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'reference' => 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', + 'id' => 'id', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'reference' => 'getReference' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('reference', $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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + 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/TransferWebhook/SELocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/SELocalAccountIdentification.php new file mode 100644 index 000000000..8abe4878f --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/SELocalAccountIdentification.php @@ -0,0 +1,492 @@ + + */ +class SELocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SELocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'clearingNumber' => '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, + 'clearingNumber' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'clearingNumber' => 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', + 'clearingNumber' => 'clearingNumber', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'clearingNumber' => 'setClearingNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'clearingNumber' => 'getClearingNumber', + '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_SE_LOCAL = 'seLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_SE_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('clearingNumber', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'seLocal'); + } + + /** + * 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['clearingNumber'] === null) { + $invalidProperties[] = "'clearingNumber' 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- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, 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 clearingNumber + * + * @return string + */ + public function getClearingNumber() + { + return $this->container['clearingNumber']; + } + + /** + * Sets clearingNumber + * + * @param string $clearingNumber The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + * + * @return self + */ + public function setClearingNumber($clearingNumber) + { + if (is_null($clearingNumber)) { + throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); + } + $this->container['clearingNumber'] = $clearingNumber; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **seLocal** + * + * @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/TransferWebhook/SGLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/SGLocalAccountIdentification.php new file mode 100644 index 000000000..ce6549b2d --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/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/TransferWebhook/TransactionEventViolation.php b/src/Adyen/Model/TransferWebhook/TransactionEventViolation.php new file mode 100644 index 000000000..4c5328103 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransactionEventViolation.php @@ -0,0 +1,452 @@ + + */ +class TransactionEventViolation implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransactionEventViolation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'reason' => 'string', + 'transactionRule' => '\Adyen\Model\TransferWebhook\TransactionRuleReference', + 'transactionRuleSource' => '\Adyen\Model\TransferWebhook\TransactionRuleSource' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'reason' => null, + 'transactionRule' => null, + 'transactionRuleSource' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'reason' => false, + 'transactionRule' => false, + 'transactionRuleSource' => 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 = [ + 'reason' => 'reason', + 'transactionRule' => 'transactionRule', + 'transactionRuleSource' => 'transactionRuleSource' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'reason' => 'setReason', + 'transactionRule' => 'setTransactionRule', + 'transactionRuleSource' => 'setTransactionRuleSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'reason' => 'getReason', + 'transactionRule' => 'getTransactionRule', + 'transactionRuleSource' => 'getTransactionRuleSource' + ]; + + /** + * 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('reason', $data ?? [], null); + $this->setIfExists('transactionRule', $data ?? [], null); + $this->setIfExists('transactionRuleSource', $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 reason + * + * @return string|null + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason An explanation about why the transaction rule failed. + * + * @return self + */ + public function setReason($reason) + { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets transactionRule + * + * @return \Adyen\Model\TransferWebhook\TransactionRuleReference|null + */ + public function getTransactionRule() + { + return $this->container['transactionRule']; + } + + /** + * Sets transactionRule + * + * @param \Adyen\Model\TransferWebhook\TransactionRuleReference|null $transactionRule transactionRule + * + * @return self + */ + public function setTransactionRule($transactionRule) + { + if (is_null($transactionRule)) { + throw new \InvalidArgumentException('non-nullable transactionRule cannot be null'); + } + $this->container['transactionRule'] = $transactionRule; + + return $this; + } + + /** + * Gets transactionRuleSource + * + * @return \Adyen\Model\TransferWebhook\TransactionRuleSource|null + */ + public function getTransactionRuleSource() + { + return $this->container['transactionRuleSource']; + } + + /** + * Sets transactionRuleSource + * + * @param \Adyen\Model\TransferWebhook\TransactionRuleSource|null $transactionRuleSource transactionRuleSource + * + * @return self + */ + public function setTransactionRuleSource($transactionRuleSource) + { + if (is_null($transactionRuleSource)) { + throw new \InvalidArgumentException('non-nullable transactionRuleSource cannot be null'); + } + $this->container['transactionRuleSource'] = $transactionRuleSource; + + 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/TransferWebhook/TransactionRuleReference.php b/src/Adyen/Model/TransferWebhook/TransactionRuleReference.php new file mode 100644 index 000000000..d65d77c07 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransactionRuleReference.php @@ -0,0 +1,518 @@ + + */ +class TransactionRuleReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransactionRuleReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'outcomeType' => 'string', + 'reference' => 'string', + 'score' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'outcomeType' => null, + 'reference' => null, + 'score' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'outcomeType' => false, + 'reference' => false, + 'score' => 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 = [ + 'description' => 'description', + 'id' => 'id', + 'outcomeType' => 'outcomeType', + 'reference' => 'reference', + 'score' => 'score' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'outcomeType' => 'setOutcomeType', + 'reference' => 'setReference', + 'score' => 'setScore' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'outcomeType' => 'getOutcomeType', + 'reference' => 'getReference', + 'score' => 'getScore' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('outcomeType', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('score', $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 description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @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 id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets outcomeType + * + * @return string|null + */ + public function getOutcomeType() + { + return $this->container['outcomeType']; + } + + /** + * Sets outcomeType + * + * @param string|null $outcomeType The outcome type of the rule. + * + * @return self + */ + public function setOutcomeType($outcomeType) + { + if (is_null($outcomeType)) { + throw new \InvalidArgumentException('non-nullable outcomeType cannot be null'); + } + $this->container['outcomeType'] = $outcomeType; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets score + * + * @return int|null + */ + public function getScore() + { + return $this->container['score']; + } + + /** + * Sets score + * + * @param int|null $score The score of the rule in case it's a scoreBased rule. + * + * @return self + */ + public function setScore($score) + { + // Do nothing for nullable integers + $this->container['score'] = $score; + + 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/TransferWebhook/TransactionRuleSource.php b/src/Adyen/Model/TransferWebhook/TransactionRuleSource.php new file mode 100644 index 000000000..3b2c5ba6a --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransactionRuleSource.php @@ -0,0 +1,418 @@ + + */ +class TransactionRuleSource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransactionRuleSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'id' => 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 = [ + 'id' => 'id', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id ID of the resource, when applicable. + * + * @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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + /** + * 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/TransferWebhook/TransactionRulesResult.php b/src/Adyen/Model/TransferWebhook/TransactionRulesResult.php new file mode 100644 index 000000000..812be3051 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransactionRulesResult.php @@ -0,0 +1,484 @@ + + */ +class TransactionRulesResult implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransactionRulesResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'advice' => 'string', + 'allHardBlockRulesPassed' => 'bool', + 'score' => 'int', + 'triggeredTransactionRules' => '\Adyen\Model\TransferWebhook\TransactionEventViolation[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'advice' => null, + 'allHardBlockRulesPassed' => null, + 'score' => 'int32', + 'triggeredTransactionRules' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'advice' => false, + 'allHardBlockRulesPassed' => false, + 'score' => true, + 'triggeredTransactionRules' => 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 = [ + 'advice' => 'advice', + 'allHardBlockRulesPassed' => 'allHardBlockRulesPassed', + 'score' => 'score', + 'triggeredTransactionRules' => 'triggeredTransactionRules' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'advice' => 'setAdvice', + 'allHardBlockRulesPassed' => 'setAllHardBlockRulesPassed', + 'score' => 'setScore', + 'triggeredTransactionRules' => 'setTriggeredTransactionRules' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'advice' => 'getAdvice', + 'allHardBlockRulesPassed' => 'getAllHardBlockRulesPassed', + 'score' => 'getScore', + 'triggeredTransactionRules' => 'getTriggeredTransactionRules' + ]; + + /** + * 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('advice', $data ?? [], null); + $this->setIfExists('allHardBlockRulesPassed', $data ?? [], null); + $this->setIfExists('score', $data ?? [], null); + $this->setIfExists('triggeredTransactionRules', $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 advice + * + * @return string|null + */ + public function getAdvice() + { + return $this->container['advice']; + } + + /** + * Sets advice + * + * @param string|null $advice The advice given by the Risk analysis. + * + * @return self + */ + public function setAdvice($advice) + { + if (is_null($advice)) { + throw new \InvalidArgumentException('non-nullable advice cannot be null'); + } + $this->container['advice'] = $advice; + + return $this; + } + + /** + * Gets allHardBlockRulesPassed + * + * @return bool|null + */ + public function getAllHardBlockRulesPassed() + { + return $this->container['allHardBlockRulesPassed']; + } + + /** + * Sets allHardBlockRulesPassed + * + * @param bool|null $allHardBlockRulesPassed Indicates whether the transaction passed the evaluation for all hardblock rules + * + * @return self + */ + public function setAllHardBlockRulesPassed($allHardBlockRulesPassed) + { + if (is_null($allHardBlockRulesPassed)) { + throw new \InvalidArgumentException('non-nullable allHardBlockRulesPassed cannot be null'); + } + $this->container['allHardBlockRulesPassed'] = $allHardBlockRulesPassed; + + return $this; + } + + /** + * Gets score + * + * @return int|null + */ + public function getScore() + { + return $this->container['score']; + } + + /** + * Sets score + * + * @param int|null $score The score of the Risk analysis. + * + * @return self + */ + public function setScore($score) + { + // Do nothing for nullable integers + $this->container['score'] = $score; + + return $this; + } + + /** + * Gets triggeredTransactionRules + * + * @return \Adyen\Model\TransferWebhook\TransactionEventViolation[]|null + */ + public function getTriggeredTransactionRules() + { + return $this->container['triggeredTransactionRules']; + } + + /** + * Sets triggeredTransactionRules + * + * @param \Adyen\Model\TransferWebhook\TransactionEventViolation[]|null $triggeredTransactionRules Array containing all the transaction rules that the transaction triggered. + * + * @return self + */ + public function setTriggeredTransactionRules($triggeredTransactionRules) + { + if (is_null($triggeredTransactionRules)) { + throw new \InvalidArgumentException('non-nullable triggeredTransactionRules cannot be null'); + } + $this->container['triggeredTransactionRules'] = $triggeredTransactionRules; + + 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/TransferWebhook/TransferData.php b/src/Adyen/Model/TransferWebhook/TransferData.php new file mode 100644 index 000000000..0bc186922 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransferData.php @@ -0,0 +1,1490 @@ + + */ +class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\TransferWebhook\ResourceReference', + 'amount' => '\Adyen\Model\TransferWebhook\Amount', + 'balanceAccount' => '\Adyen\Model\TransferWebhook\ResourceReference', + 'balancePlatform' => 'string', + 'balances' => '\Adyen\Model\TransferWebhook\BalanceMutation[]', + 'category' => 'string', + 'categoryData' => '\Adyen\Model\TransferWebhook\TransferDataCategoryData', + 'counterparty' => '\Adyen\Model\TransferWebhook\CounterpartyV3', + 'creationDate' => '\DateTime', + 'description' => 'string', + 'direction' => 'string', + 'events' => '\Adyen\Model\TransferWebhook\TransferEvent[]', + 'id' => 'string', + 'paymentInstrument' => '\Adyen\Model\TransferWebhook\PaymentInstrument', + 'reason' => 'string', + 'reference' => 'string', + 'referenceForBeneficiary' => 'string', + 'sequenceNumber' => 'int', + 'status' => 'string', + 'tracking' => '\Adyen\Model\TransferWebhook\TransferNotificationTransferTracking', + 'transactionRulesResult' => '\Adyen\Model\TransferWebhook\TransactionRulesResult', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'amount' => null, + 'balanceAccount' => null, + 'balancePlatform' => null, + 'balances' => null, + 'category' => null, + 'categoryData' => null, + 'counterparty' => null, + 'creationDate' => 'date-time', + 'description' => null, + 'direction' => null, + 'events' => null, + 'id' => null, + 'paymentInstrument' => null, + 'reason' => null, + 'reference' => null, + 'referenceForBeneficiary' => null, + 'sequenceNumber' => 'int32', + 'status' => null, + 'tracking' => null, + 'transactionRulesResult' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'amount' => false, + 'balanceAccount' => false, + 'balancePlatform' => false, + 'balances' => false, + 'category' => false, + 'categoryData' => false, + 'counterparty' => false, + 'creationDate' => false, + 'description' => false, + 'direction' => false, + 'events' => false, + 'id' => false, + 'paymentInstrument' => false, + 'reason' => false, + 'reference' => false, + 'referenceForBeneficiary' => false, + 'sequenceNumber' => true, + 'status' => false, + 'tracking' => false, + 'transactionRulesResult' => 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 = [ + 'accountHolder' => 'accountHolder', + 'amount' => 'amount', + 'balanceAccount' => 'balanceAccount', + 'balancePlatform' => 'balancePlatform', + 'balances' => 'balances', + 'category' => 'category', + 'categoryData' => 'categoryData', + 'counterparty' => 'counterparty', + 'creationDate' => 'creationDate', + 'description' => 'description', + 'direction' => 'direction', + 'events' => 'events', + 'id' => 'id', + 'paymentInstrument' => 'paymentInstrument', + 'reason' => 'reason', + 'reference' => 'reference', + 'referenceForBeneficiary' => 'referenceForBeneficiary', + 'sequenceNumber' => 'sequenceNumber', + 'status' => 'status', + 'tracking' => 'tracking', + 'transactionRulesResult' => 'transactionRulesResult', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'amount' => 'setAmount', + 'balanceAccount' => 'setBalanceAccount', + 'balancePlatform' => 'setBalancePlatform', + 'balances' => 'setBalances', + 'category' => 'setCategory', + 'categoryData' => 'setCategoryData', + 'counterparty' => 'setCounterparty', + 'creationDate' => 'setCreationDate', + 'description' => 'setDescription', + 'direction' => 'setDirection', + 'events' => 'setEvents', + 'id' => 'setId', + 'paymentInstrument' => 'setPaymentInstrument', + 'reason' => 'setReason', + 'reference' => 'setReference', + 'referenceForBeneficiary' => 'setReferenceForBeneficiary', + 'sequenceNumber' => 'setSequenceNumber', + 'status' => 'setStatus', + 'tracking' => 'setTracking', + 'transactionRulesResult' => 'setTransactionRulesResult', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'amount' => 'getAmount', + 'balanceAccount' => 'getBalanceAccount', + 'balancePlatform' => 'getBalancePlatform', + 'balances' => 'getBalances', + 'category' => 'getCategory', + 'categoryData' => 'getCategoryData', + 'counterparty' => 'getCounterparty', + 'creationDate' => 'getCreationDate', + 'description' => 'getDescription', + 'direction' => 'getDirection', + 'events' => 'getEvents', + 'id' => 'getId', + 'paymentInstrument' => 'getPaymentInstrument', + 'reason' => 'getReason', + 'reference' => 'getReference', + 'referenceForBeneficiary' => 'getReferenceForBeneficiary', + 'sequenceNumber' => 'getSequenceNumber', + 'status' => 'getStatus', + 'tracking' => 'getTracking', + 'transactionRulesResult' => 'getTransactionRulesResult', + '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 CATEGORY_BANK = 'bank'; + public const CATEGORY_INTERNAL = 'internal'; + public const CATEGORY_ISSUED_CARD = 'issuedCard'; + public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; + public const DIRECTION_INCOMING = 'incoming'; + public const DIRECTION_OUTGOING = 'outgoing'; + public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; + public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; + public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; + public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; + public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; + public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; + public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; + public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; + public const REASON_ERROR = 'error'; + public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; + public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; + public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; + public const REASON_UNKNOWN = 'unknown'; + public const STATUS_APPROVAL_PENDING = 'approvalPending'; + public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING = 'atmWithdrawalReversalPending'; + public const STATUS_ATM_WITHDRAWAL_REVERSED = 'atmWithdrawalReversed'; + public const STATUS_AUTH_ADJUSTMENT_AUTHORISED = 'authAdjustmentAuthorised'; + public const STATUS_AUTH_ADJUSTMENT_ERROR = 'authAdjustmentError'; + public const STATUS_AUTH_ADJUSTMENT_REFUSED = 'authAdjustmentRefused'; + public const STATUS_AUTHORISED = 'authorised'; + public const STATUS_BANK_TRANSFER = 'bankTransfer'; + public const STATUS_BANK_TRANSFER_PENDING = 'bankTransferPending'; + public const STATUS_BOOKED = 'booked'; + public const STATUS_BOOKING_PENDING = 'bookingPending'; + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_CAPTURE_PENDING = 'capturePending'; + 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'; + public const STATUS_CREDITED = 'credited'; + public const STATUS_DEPOSIT_CORRECTION = 'depositCorrection'; + public const STATUS_DEPOSIT_CORRECTION_PENDING = 'depositCorrectionPending'; + public const STATUS_DISPUTE = 'dispute'; + public const STATUS_DISPUTE_CLOSED = 'disputeClosed'; + public const STATUS_DISPUTE_EXPIRED = 'disputeExpired'; + public const STATUS_DISPUTE_NEEDS_REVIEW = 'disputeNeedsReview'; + public const STATUS_ERROR = 'error'; + public const STATUS_EXPIRED = 'expired'; + public const STATUS_FAILED = 'failed'; + public const STATUS_FEE = 'fee'; + public const STATUS_FEE_PENDING = 'feePending'; + public const STATUS_INTERNAL_TRANSFER = 'internalTransfer'; + public const STATUS_INTERNAL_TRANSFER_PENDING = 'internalTransferPending'; + public const STATUS_INVOICE_DEDUCTION = 'invoiceDeduction'; + public const STATUS_INVOICE_DEDUCTION_PENDING = 'invoiceDeductionPending'; + public const STATUS_MANUAL_CORRECTION_PENDING = 'manualCorrectionPending'; + public const STATUS_MANUALLY_CORRECTED = 'manuallyCorrected'; + public const STATUS_MATCHED_STATEMENT = 'matchedStatement'; + public const STATUS_MATCHED_STATEMENT_PENDING = 'matchedStatementPending'; + public const STATUS_MERCHANT_PAYIN = 'merchantPayin'; + public const STATUS_MERCHANT_PAYIN_PENDING = 'merchantPayinPending'; + public const STATUS_MERCHANT_PAYIN_REVERSED = 'merchantPayinReversed'; + public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; + public const STATUS_MISC_COST = 'miscCost'; + public const STATUS_MISC_COST_PENDING = 'miscCostPending'; + public const STATUS_PAYMENT_COST = 'paymentCost'; + public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_RECEIVED = 'received'; + public const STATUS_REFUND_PENDING = 'refundPending'; + 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'; + public const STATUS_RETURNED = 'returned'; + public const STATUS_SECOND_CHARGEBACK = 'secondChargeback'; + public const STATUS_SECOND_CHARGEBACK_PENDING = 'secondChargebackPending'; + public const STATUS_UNDEFINED = 'undefined'; + public const TYPE_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const TYPE_ATM_WITHDRAWAL_REVERSAL = 'atmWithdrawalReversal'; + public const TYPE_BALANCE_ADJUSTMENT = 'balanceAdjustment'; + public const TYPE_BALANCE_MIGRATION = 'balanceMigration'; + public const TYPE_BALANCE_ROLLOVER = 'balanceRollover'; + 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_CASH_OUT_FEE = 'cashOutFee'; + public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; + public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; + public const TYPE_CHARGEBACK = 'chargeback'; + public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; + public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; + public const TYPE_CHARGEBACK_REVERSAL_CORRECTION = 'chargebackReversalCorrection'; + public const TYPE_DEPOSIT_CORRECTION = 'depositCorrection'; + public const TYPE_FEE = 'fee'; + public const TYPE_GRANT = 'grant'; + public const TYPE_INSTALLMENT = 'installment'; + public const TYPE_INSTALLMENT_REVERSAL = 'installmentReversal'; + public const TYPE_INTERNAL_TRANSFER = 'internalTransfer'; + public const TYPE_INVOICE_DEDUCTION = 'invoiceDeduction'; + public const TYPE_LEFTOVER = 'leftover'; + public const TYPE_MANUAL_CORRECTION = 'manualCorrection'; + public const TYPE_MISC_COST = 'miscCost'; + public const TYPE_PAYMENT = 'payment'; + public const TYPE_PAYMENT_COST = 'paymentCost'; + public const TYPE_REFUND = 'refund'; + public const TYPE_REFUND_REVERSAL = 'refundReversal'; + public const TYPE_REPAYMENT = 'repayment'; + public const TYPE_RESERVE_ADJUSTMENT = 'reserveAdjustment'; + public const TYPE_SECOND_CHARGEBACK = 'secondChargeback'; + public const TYPE_SECOND_CHARGEBACK_CORRECTION = 'secondChargebackCorrection'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCategoryAllowableValues() + { + return [ + self::CATEGORY_BANK, + self::CATEGORY_INTERNAL, + self::CATEGORY_ISSUED_CARD, + self::CATEGORY_PLATFORM_PAYMENT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDirectionAllowableValues() + { + return [ + self::DIRECTION_INCOMING, + self::DIRECTION_OUTGOING, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getReasonAllowableValues() + { + return [ + self::REASON_AMOUNT_LIMIT_EXCEEDED, + self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, + self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, + self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, + self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, + self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, + self::REASON_COUNTERPARTY_BANK_TIMED_OUT, + self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, + self::REASON_ERROR, + self::REASON_NOT_ENOUGH_BALANCE, + self::REASON_REFUSED_BY_COUNTERPARTY_BANK, + self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, + self::REASON_UNKNOWN, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_APPROVAL_PENDING, + self::STATUS_ATM_WITHDRAWAL, + self::STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING, + self::STATUS_ATM_WITHDRAWAL_REVERSED, + self::STATUS_AUTH_ADJUSTMENT_AUTHORISED, + self::STATUS_AUTH_ADJUSTMENT_ERROR, + self::STATUS_AUTH_ADJUSTMENT_REFUSED, + self::STATUS_AUTHORISED, + self::STATUS_BANK_TRANSFER, + self::STATUS_BANK_TRANSFER_PENDING, + self::STATUS_BOOKED, + self::STATUS_BOOKING_PENDING, + self::STATUS_CANCELLED, + self::STATUS_CAPTURE_PENDING, + 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, + self::STATUS_CREDITED, + self::STATUS_DEPOSIT_CORRECTION, + self::STATUS_DEPOSIT_CORRECTION_PENDING, + self::STATUS_DISPUTE, + self::STATUS_DISPUTE_CLOSED, + self::STATUS_DISPUTE_EXPIRED, + self::STATUS_DISPUTE_NEEDS_REVIEW, + self::STATUS_ERROR, + self::STATUS_EXPIRED, + self::STATUS_FAILED, + self::STATUS_FEE, + self::STATUS_FEE_PENDING, + self::STATUS_INTERNAL_TRANSFER, + self::STATUS_INTERNAL_TRANSFER_PENDING, + self::STATUS_INVOICE_DEDUCTION, + self::STATUS_INVOICE_DEDUCTION_PENDING, + self::STATUS_MANUAL_CORRECTION_PENDING, + self::STATUS_MANUALLY_CORRECTED, + self::STATUS_MATCHED_STATEMENT, + self::STATUS_MATCHED_STATEMENT_PENDING, + self::STATUS_MERCHANT_PAYIN, + self::STATUS_MERCHANT_PAYIN_PENDING, + self::STATUS_MERCHANT_PAYIN_REVERSED, + self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, + self::STATUS_MISC_COST, + self::STATUS_MISC_COST_PENDING, + self::STATUS_PAYMENT_COST, + self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_RECEIVED, + self::STATUS_REFUND_PENDING, + 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, + self::STATUS_RETURNED, + self::STATUS_SECOND_CHARGEBACK, + self::STATUS_SECOND_CHARGEBACK_PENDING, + self::STATUS_UNDEFINED, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ATM_WITHDRAWAL, + self::TYPE_ATM_WITHDRAWAL_REVERSAL, + self::TYPE_BALANCE_ADJUSTMENT, + self::TYPE_BALANCE_MIGRATION, + self::TYPE_BALANCE_ROLLOVER, + self::TYPE_BANK_TRANSFER, + self::TYPE_CAPTURE, + self::TYPE_CAPTURE_REVERSAL, + self::TYPE_CARD_TRANSFER, + self::TYPE_CASH_OUT_FEE, + self::TYPE_CASH_OUT_FUNDING, + self::TYPE_CASH_OUT_INSTRUCTION, + self::TYPE_CHARGEBACK, + self::TYPE_CHARGEBACK_CORRECTION, + self::TYPE_CHARGEBACK_REVERSAL, + self::TYPE_CHARGEBACK_REVERSAL_CORRECTION, + self::TYPE_DEPOSIT_CORRECTION, + self::TYPE_FEE, + self::TYPE_GRANT, + self::TYPE_INSTALLMENT, + self::TYPE_INSTALLMENT_REVERSAL, + self::TYPE_INTERNAL_TRANSFER, + self::TYPE_INVOICE_DEDUCTION, + self::TYPE_LEFTOVER, + self::TYPE_MANUAL_CORRECTION, + self::TYPE_MISC_COST, + self::TYPE_PAYMENT, + self::TYPE_PAYMENT_COST, + self::TYPE_REFUND, + self::TYPE_REFUND_REVERSAL, + self::TYPE_REPAYMENT, + self::TYPE_RESERVE_ADJUSTMENT, + self::TYPE_SECOND_CHARGEBACK, + self::TYPE_SECOND_CHARGEBACK_CORRECTION, + ]; + } + /** + * 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('accountHolder', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('balanceAccount', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('balances', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('categoryData', $data ?? [], null); + $this->setIfExists('counterparty', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('events', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentInstrument', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('referenceForBeneficiary', $data ?? [], null); + $this->setIfExists('sequenceNumber', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('tracking', $data ?? [], null); + $this->setIfExists('transactionRulesResult', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } + $allowedValues = $this->getCategoryAllowableValues(); + if (!is_null($this->container['category']) && !in_array($this->container['category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'category', must be one of '%s'", + $this->container['category'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDirectionAllowableValues(); + if (!is_null($this->container['direction']) && !in_array($this->container['direction'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'direction', must be one of '%s'", + $this->container['direction'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getReasonAllowableValues(); + if (!is_null($this->container['reason']) && !in_array($this->container['reason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'reason', must be one of '%s'", + $this->container['reason'], + implode("', '", $allowedValues) + ); + } + + 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) + ); + } + + $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 accountHolder + * + * @return \Adyen\Model\TransferWebhook\ResourceReference|null + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\TransferWebhook\ResourceReference|null $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + if (is_null($accountHolder)) { + throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); + } + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\TransferWebhook\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\TransferWebhook\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; + } + + /** + * Gets balanceAccount + * + * @return \Adyen\Model\TransferWebhook\ResourceReference|null + */ + public function getBalanceAccount() + { + return $this->container['balanceAccount']; + } + + /** + * Sets balanceAccount + * + * @param \Adyen\Model\TransferWebhook\ResourceReference|null $balanceAccount balanceAccount + * + * @return self + */ + public function setBalanceAccount($balanceAccount) + { + if (is_null($balanceAccount)) { + throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); + } + $this->container['balanceAccount'] = $balanceAccount; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets balances + * + * @return \Adyen\Model\TransferWebhook\BalanceMutation[]|null + */ + public function getBalances() + { + return $this->container['balances']; + } + + /** + * Sets balances + * + * @param \Adyen\Model\TransferWebhook\BalanceMutation[]|null $balances The list of the latest balance statuses in the transfer. + * + * @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 category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * + * @return self + */ + public function setCategory($category) + { + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); + } + $allowedValues = $this->getCategoryAllowableValues(); + if (!in_array($category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'category', must be one of '%s'", + $category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets categoryData + * + * @return \Adyen\Model\TransferWebhook\TransferDataCategoryData|null + */ + public function getCategoryData() + { + return $this->container['categoryData']; + } + + /** + * Sets categoryData + * + * @param \Adyen\Model\TransferWebhook\TransferDataCategoryData|null $categoryData categoryData + * + * @return self + */ + public function setCategoryData($categoryData) + { + if (is_null($categoryData)) { + throw new \InvalidArgumentException('non-nullable categoryData cannot be null'); + } + $this->container['categoryData'] = $categoryData; + + return $this; + } + + /** + * Gets counterparty + * + * @return \Adyen\Model\TransferWebhook\CounterpartyV3|null + */ + public function getCounterparty() + { + return $this->container['counterparty']; + } + + /** + * Sets counterparty + * + * @param \Adyen\Model\TransferWebhook\CounterpartyV3|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 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 + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** + * + * @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 direction + * + * @return string|null + */ + public function getDirection() + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param string|null $direction The direction of the transfer. Possible values: **incoming**, **outgoing**. + * + * @return self + */ + public function setDirection($direction) + { + if (is_null($direction)) { + throw new \InvalidArgumentException('non-nullable direction cannot be null'); + } + $allowedValues = $this->getDirectionAllowableValues(); + if (!in_array($direction, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'direction', must be one of '%s'", + $direction, + implode("', '", $allowedValues) + ) + ); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets events + * + * @return \Adyen\Model\TransferWebhook\TransferEvent[]|null + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \Adyen\Model\TransferWebhook\TransferEvent[]|null $events The list of events leading up to the current status of the transfer. + * + * @return self + */ + public function setEvents($events) + { + if (is_null($events)) { + throw new \InvalidArgumentException('non-nullable events cannot be null'); + } + $this->container['events'] = $events; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets paymentInstrument + * + * @return \Adyen\Model\TransferWebhook\PaymentInstrument|null + */ + public function getPaymentInstrument() + { + return $this->container['paymentInstrument']; + } + + /** + * Sets paymentInstrument + * + * @param \Adyen\Model\TransferWebhook\PaymentInstrument|null $paymentInstrument paymentInstrument + * + * @return self + */ + public function setPaymentInstrument($paymentInstrument) + { + if (is_null($paymentInstrument)) { + throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); + } + $this->container['paymentInstrument'] = $paymentInstrument; + + return $this; + } + + /** + * Gets reason + * + * @return string|null + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason Additional information about the status of the transfer. + * + * @return self + */ + public function setReason($reason) + { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } + $allowedValues = $this->getReasonAllowableValues(); + if (!in_array($reason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'reason', must be one of '%s'", + $reason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets referenceForBeneficiary + * + * @return string|null + */ + public function getReferenceForBeneficiary() + { + return $this->container['referenceForBeneficiary']; + } + + /** + * Sets referenceForBeneficiary + * + * @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 + */ + public function setReferenceForBeneficiary($referenceForBeneficiary) + { + if (is_null($referenceForBeneficiary)) { + throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); + } + $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; + + return $this; + } + + /** + * Gets sequenceNumber + * + * @return int|null + */ + public function getSequenceNumber() + { + return $this->container['sequenceNumber']; + } + + /** + * Sets sequenceNumber + * + * @param int|null $sequenceNumber The sequence number of the transfer notification. The numbers start from 1 and increase with each new notification for a specific transfer. It can help you restore the correct sequence of events even if they arrive out of order. + * + * @return self + */ + public function setSequenceNumber($sequenceNumber) + { + // Do nothing for nullable integers + $this->container['sequenceNumber'] = $sequenceNumber; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The result of the transfer. For example, **authorised**, **refused**, or **error**. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets tracking + * + * @return \Adyen\Model\TransferWebhook\TransferNotificationTransferTracking|null + */ + public function getTracking() + { + return $this->container['tracking']; + } + + /** + * Sets tracking + * + * @param \Adyen\Model\TransferWebhook\TransferNotificationTransferTracking|null $tracking tracking + * + * @return self + */ + public function setTracking($tracking) + { + if (is_null($tracking)) { + throw new \InvalidArgumentException('non-nullable tracking cannot be null'); + } + $this->container['tracking'] = $tracking; + + return $this; + } + + /** + * Gets transactionRulesResult + * + * @return \Adyen\Model\TransferWebhook\TransactionRulesResult|null + */ + public function getTransactionRulesResult() + { + return $this->container['transactionRulesResult']; + } + + /** + * Sets transactionRulesResult + * + * @param \Adyen\Model\TransferWebhook\TransactionRulesResult|null $transactionRulesResult transactionRulesResult + * + * @return self + */ + public function setTransactionRulesResult($transactionRulesResult) + { + if (is_null($transactionRulesResult)) { + throw new \InvalidArgumentException('non-nullable transactionRulesResult cannot be null'); + } + $this->container['transactionRulesResult'] = $transactionRulesResult; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + * + * @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/TransferWebhook/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhook/TransferDataCategoryData.php new file mode 100644 index 000000000..70575d8d2 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransferDataCategoryData.php @@ -0,0 +1,729 @@ + + */ +class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferData_categoryData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'priority' => 'string', + 'type' => 'string', + 'modificationMerchantReference' => 'string', + 'modificationPspReference' => 'string', + 'panEntryMode' => 'string', + 'processingType' => 'string', + 'relayedAuthorisationData' => '\Adyen\Model\TransferWebhook\RelayedAuthorisationData', + 'validationFacts' => '\Adyen\Model\TransferWebhook\TransferNotificationValidationFact[]', + 'paymentMerchantReference' => 'string', + 'platformPaymentType' => 'string', + 'pspPaymentReference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'priority' => null, + 'type' => null, + 'modificationMerchantReference' => null, + 'modificationPspReference' => null, + 'panEntryMode' => null, + 'processingType' => null, + 'relayedAuthorisationData' => null, + 'validationFacts' => null, + 'paymentMerchantReference' => null, + 'platformPaymentType' => null, + 'pspPaymentReference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'priority' => false, + 'type' => false, + 'modificationMerchantReference' => false, + 'modificationPspReference' => false, + 'panEntryMode' => false, + 'processingType' => false, + 'relayedAuthorisationData' => false, + 'validationFacts' => false, + 'paymentMerchantReference' => false, + 'platformPaymentType' => false, + 'pspPaymentReference' => 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 = [ + 'priority' => 'priority', + 'type' => 'type', + 'modificationMerchantReference' => 'modificationMerchantReference', + 'modificationPspReference' => 'modificationPspReference', + 'panEntryMode' => 'panEntryMode', + 'processingType' => 'processingType', + 'relayedAuthorisationData' => 'relayedAuthorisationData', + 'validationFacts' => 'validationFacts', + 'paymentMerchantReference' => 'paymentMerchantReference', + 'platformPaymentType' => 'platformPaymentType', + 'pspPaymentReference' => 'pspPaymentReference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'priority' => 'setPriority', + 'type' => 'setType', + 'modificationMerchantReference' => 'setModificationMerchantReference', + 'modificationPspReference' => 'setModificationPspReference', + 'panEntryMode' => 'setPanEntryMode', + 'processingType' => 'setProcessingType', + 'relayedAuthorisationData' => 'setRelayedAuthorisationData', + 'validationFacts' => 'setValidationFacts', + 'paymentMerchantReference' => 'setPaymentMerchantReference', + 'platformPaymentType' => 'setPlatformPaymentType', + 'pspPaymentReference' => 'setPspPaymentReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'priority' => 'getPriority', + 'type' => 'getType', + 'modificationMerchantReference' => 'getModificationMerchantReference', + 'modificationPspReference' => 'getModificationPspReference', + 'panEntryMode' => 'getPanEntryMode', + 'processingType' => 'getProcessingType', + 'relayedAuthorisationData' => 'getRelayedAuthorisationData', + 'validationFacts' => 'getValidationFacts', + 'paymentMerchantReference' => 'getPaymentMerchantReference', + 'platformPaymentType' => 'getPlatformPaymentType', + 'pspPaymentReference' => 'getPspPaymentReference' + ]; + + /** + * 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('priority', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('modificationMerchantReference', $data ?? [], null); + $this->setIfExists('modificationPspReference', $data ?? [], null); + $this->setIfExists('panEntryMode', $data ?? [], null); + $this->setIfExists('processingType', $data ?? [], null); + $this->setIfExists('relayedAuthorisationData', $data ?? [], null); + $this->setIfExists('validationFacts', $data ?? [], null); + $this->setIfExists('paymentMerchantReference', $data ?? [], null); + $this->setIfExists('platformPaymentType', $data ?? [], null); + $this->setIfExists('pspPaymentReference', $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 priority + * + * @return string|null + */ + public function getPriority() + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * + * @return self + */ + public function setPriority($priority) + { + if (is_null($priority)) { + throw new \InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **platformPayment** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets modificationMerchantReference + * + * @return string|null + */ + public function getModificationMerchantReference() + { + return $this->container['modificationMerchantReference']; + } + + /** + * Sets modificationMerchantReference + * + * @param string|null $modificationMerchantReference The capture's merchant reference included in the transfer. + * + * @return self + */ + public function setModificationMerchantReference($modificationMerchantReference) + { + if (is_null($modificationMerchantReference)) { + throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); + } + $this->container['modificationMerchantReference'] = $modificationMerchantReference; + + return $this; + } + + /** + * Gets modificationPspReference + * + * @return string|null + */ + public function getModificationPspReference() + { + return $this->container['modificationPspReference']; + } + + /** + * Sets modificationPspReference + * + * @param string|null $modificationPspReference The capture reference included in the transfer. + * + * @return self + */ + public function setModificationPspReference($modificationPspReference) + { + if (is_null($modificationPspReference)) { + throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); + } + $this->container['modificationPspReference'] = $modificationPspReference; + + return $this; + } + + /** + * Gets panEntryMode + * + * @return string|null + */ + public function getPanEntryMode() + { + return $this->container['panEntryMode']; + } + + /** + * Sets panEntryMode + * + * @param string|null $panEntryMode Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + * + * @return self + */ + public function setPanEntryMode($panEntryMode) + { + if (is_null($panEntryMode)) { + throw new \InvalidArgumentException('non-nullable panEntryMode cannot be null'); + } + $this->container['panEntryMode'] = $panEntryMode; + + return $this; + } + + /** + * Gets processingType + * + * @return string|null + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string|null $processingType Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + * + * @return self + */ + public function setProcessingType($processingType) + { + if (is_null($processingType)) { + throw new \InvalidArgumentException('non-nullable processingType cannot be null'); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets relayedAuthorisationData + * + * @return \Adyen\Model\TransferWebhook\RelayedAuthorisationData|null + */ + public function getRelayedAuthorisationData() + { + return $this->container['relayedAuthorisationData']; + } + + /** + * Sets relayedAuthorisationData + * + * @param \Adyen\Model\TransferWebhook\RelayedAuthorisationData|null $relayedAuthorisationData relayedAuthorisationData + * + * @return self + */ + public function setRelayedAuthorisationData($relayedAuthorisationData) + { + if (is_null($relayedAuthorisationData)) { + throw new \InvalidArgumentException('non-nullable relayedAuthorisationData cannot be null'); + } + $this->container['relayedAuthorisationData'] = $relayedAuthorisationData; + + return $this; + } + + /** + * Gets validationFacts + * + * @return \Adyen\Model\TransferWebhook\TransferNotificationValidationFact[]|null + */ + public function getValidationFacts() + { + return $this->container['validationFacts']; + } + + /** + * Sets validationFacts + * + * @param \Adyen\Model\TransferWebhook\TransferNotificationValidationFact[]|null $validationFacts The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + * + * @return self + */ + public function setValidationFacts($validationFacts) + { + if (is_null($validationFacts)) { + throw new \InvalidArgumentException('non-nullable validationFacts cannot be null'); + } + $this->container['validationFacts'] = $validationFacts; + + return $this; + } + + /** + * Gets paymentMerchantReference + * + * @return string|null + */ + public function getPaymentMerchantReference() + { + return $this->container['paymentMerchantReference']; + } + + /** + * Sets paymentMerchantReference + * + * @param string|null $paymentMerchantReference The payment's merchant reference included in the transfer. + * + * @return self + */ + public function setPaymentMerchantReference($paymentMerchantReference) + { + if (is_null($paymentMerchantReference)) { + throw new \InvalidArgumentException('non-nullable paymentMerchantReference cannot be null'); + } + $this->container['paymentMerchantReference'] = $paymentMerchantReference; + + return $this; + } + + /** + * Gets platformPaymentType + * + * @return string|null + */ + public function getPlatformPaymentType() + { + return $this->container['platformPaymentType']; + } + + /** + * Sets platformPaymentType + * + * @param string|null $platformPaymentType The type of the related split. + * + * @return self + */ + public function setPlatformPaymentType($platformPaymentType) + { + if (is_null($platformPaymentType)) { + throw new \InvalidArgumentException('non-nullable platformPaymentType cannot be null'); + } + $this->container['platformPaymentType'] = $platformPaymentType; + + return $this; + } + + /** + * Gets pspPaymentReference + * + * @return string|null + */ + public function getPspPaymentReference() + { + return $this->container['pspPaymentReference']; + } + + /** + * Sets pspPaymentReference + * + * @param string|null $pspPaymentReference The payment reference included in the transfer. + * + * @return self + */ + public function setPspPaymentReference($pspPaymentReference) + { + if (is_null($pspPaymentReference)) { + throw new \InvalidArgumentException('non-nullable pspPaymentReference cannot be null'); + } + $this->container['pspPaymentReference'] = $pspPaymentReference; + + 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/TransferWebhook/TransferEvent.php b/src/Adyen/Model/TransferWebhook/TransferEvent.php new file mode 100644 index 000000000..34b75b5e4 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransferEvent.php @@ -0,0 +1,1145 @@ + + */ +class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferEvent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => '\Adyen\Model\TransferWebhook\Amount', + 'amountAdjustments' => '\Adyen\Model\TransferWebhook\AmountAdjustment[]', + 'bookingDate' => '\DateTime', + 'estimatedArrivalTime' => '\DateTime', + 'id' => 'string', + 'modification' => '\Adyen\Model\TransferWebhook\Modification', + 'mutations' => '\Adyen\Model\TransferWebhook\BalanceMutation[]', + 'originalAmount' => '\Adyen\Model\TransferWebhook\Amount', + 'reason' => 'string', + 'schemeTraceID' => 'string', + 'schemeUniqueTransactionID' => 'string', + 'status' => 'string', + 'transactionId' => 'string', + 'type' => 'string', + 'updateDate' => '\DateTime', + 'valueDate' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'amountAdjustments' => null, + 'bookingDate' => 'date-time', + 'estimatedArrivalTime' => 'date-time', + 'id' => null, + 'modification' => null, + 'mutations' => null, + 'originalAmount' => null, + 'reason' => null, + 'schemeTraceID' => null, + 'schemeUniqueTransactionID' => null, + 'status' => null, + 'transactionId' => null, + 'type' => null, + 'updateDate' => 'date-time', + 'valueDate' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => false, + 'amountAdjustments' => false, + 'bookingDate' => false, + 'estimatedArrivalTime' => false, + 'id' => false, + 'modification' => false, + 'mutations' => false, + 'originalAmount' => false, + 'reason' => false, + 'schemeTraceID' => false, + 'schemeUniqueTransactionID' => false, + 'status' => false, + 'transactionId' => false, + 'type' => false, + 'updateDate' => false, + 'valueDate' => 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', + 'amountAdjustments' => 'amountAdjustments', + 'bookingDate' => 'bookingDate', + 'estimatedArrivalTime' => 'estimatedArrivalTime', + 'id' => 'id', + 'modification' => 'modification', + 'mutations' => 'mutations', + 'originalAmount' => 'originalAmount', + 'reason' => 'reason', + 'schemeTraceID' => 'schemeTraceID', + 'schemeUniqueTransactionID' => 'schemeUniqueTransactionID', + 'status' => 'status', + 'transactionId' => 'transactionId', + 'type' => 'type', + 'updateDate' => 'updateDate', + 'valueDate' => 'valueDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'amountAdjustments' => 'setAmountAdjustments', + 'bookingDate' => 'setBookingDate', + 'estimatedArrivalTime' => 'setEstimatedArrivalTime', + 'id' => 'setId', + 'modification' => 'setModification', + 'mutations' => 'setMutations', + 'originalAmount' => 'setOriginalAmount', + 'reason' => 'setReason', + 'schemeTraceID' => 'setSchemeTraceID', + 'schemeUniqueTransactionID' => 'setSchemeUniqueTransactionID', + 'status' => 'setStatus', + 'transactionId' => 'setTransactionId', + 'type' => 'setType', + 'updateDate' => 'setUpdateDate', + 'valueDate' => 'setValueDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'amountAdjustments' => 'getAmountAdjustments', + 'bookingDate' => 'getBookingDate', + 'estimatedArrivalTime' => 'getEstimatedArrivalTime', + 'id' => 'getId', + 'modification' => 'getModification', + 'mutations' => 'getMutations', + 'originalAmount' => 'getOriginalAmount', + 'reason' => 'getReason', + 'schemeTraceID' => 'getSchemeTraceID', + 'schemeUniqueTransactionID' => 'getSchemeUniqueTransactionID', + 'status' => 'getStatus', + 'transactionId' => 'getTransactionId', + 'type' => 'getType', + 'updateDate' => 'getUpdateDate', + 'valueDate' => 'getValueDate' + ]; + + /** + * 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 REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; + public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; + public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; + public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; + public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; + public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; + public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; + public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; + public const REASON_ERROR = 'error'; + public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; + public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; + public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; + public const REASON_UNKNOWN = 'unknown'; + public const STATUS_APPROVAL_PENDING = 'approvalPending'; + public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING = 'atmWithdrawalReversalPending'; + public const STATUS_ATM_WITHDRAWAL_REVERSED = 'atmWithdrawalReversed'; + public const STATUS_AUTH_ADJUSTMENT_AUTHORISED = 'authAdjustmentAuthorised'; + public const STATUS_AUTH_ADJUSTMENT_ERROR = 'authAdjustmentError'; + public const STATUS_AUTH_ADJUSTMENT_REFUSED = 'authAdjustmentRefused'; + public const STATUS_AUTHORISED = 'authorised'; + public const STATUS_BANK_TRANSFER = 'bankTransfer'; + public const STATUS_BANK_TRANSFER_PENDING = 'bankTransferPending'; + public const STATUS_BOOKED = 'booked'; + public const STATUS_BOOKING_PENDING = 'bookingPending'; + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_CAPTURE_PENDING = 'capturePending'; + 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'; + public const STATUS_CREDITED = 'credited'; + public const STATUS_DEPOSIT_CORRECTION = 'depositCorrection'; + public const STATUS_DEPOSIT_CORRECTION_PENDING = 'depositCorrectionPending'; + public const STATUS_DISPUTE = 'dispute'; + public const STATUS_DISPUTE_CLOSED = 'disputeClosed'; + public const STATUS_DISPUTE_EXPIRED = 'disputeExpired'; + public const STATUS_DISPUTE_NEEDS_REVIEW = 'disputeNeedsReview'; + public const STATUS_ERROR = 'error'; + public const STATUS_EXPIRED = 'expired'; + public const STATUS_FAILED = 'failed'; + public const STATUS_FEE = 'fee'; + public const STATUS_FEE_PENDING = 'feePending'; + public const STATUS_INTERNAL_TRANSFER = 'internalTransfer'; + public const STATUS_INTERNAL_TRANSFER_PENDING = 'internalTransferPending'; + public const STATUS_INVOICE_DEDUCTION = 'invoiceDeduction'; + public const STATUS_INVOICE_DEDUCTION_PENDING = 'invoiceDeductionPending'; + public const STATUS_MANUAL_CORRECTION_PENDING = 'manualCorrectionPending'; + public const STATUS_MANUALLY_CORRECTED = 'manuallyCorrected'; + public const STATUS_MATCHED_STATEMENT = 'matchedStatement'; + public const STATUS_MATCHED_STATEMENT_PENDING = 'matchedStatementPending'; + public const STATUS_MERCHANT_PAYIN = 'merchantPayin'; + public const STATUS_MERCHANT_PAYIN_PENDING = 'merchantPayinPending'; + public const STATUS_MERCHANT_PAYIN_REVERSED = 'merchantPayinReversed'; + public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; + public const STATUS_MISC_COST = 'miscCost'; + public const STATUS_MISC_COST_PENDING = 'miscCostPending'; + public const STATUS_PAYMENT_COST = 'paymentCost'; + public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_RECEIVED = 'received'; + public const STATUS_REFUND_PENDING = 'refundPending'; + 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'; + public const STATUS_RETURNED = 'returned'; + public const STATUS_SECOND_CHARGEBACK = 'secondChargeback'; + public const STATUS_SECOND_CHARGEBACK_PENDING = 'secondChargebackPending'; + public const STATUS_UNDEFINED = 'undefined'; + public const TYPE_ACCOUNTING = 'accounting'; + public const TYPE_TRACKING = 'tracking'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getReasonAllowableValues() + { + return [ + self::REASON_AMOUNT_LIMIT_EXCEEDED, + self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, + self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, + self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, + self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, + self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, + self::REASON_COUNTERPARTY_BANK_TIMED_OUT, + self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, + self::REASON_ERROR, + self::REASON_NOT_ENOUGH_BALANCE, + self::REASON_REFUSED_BY_COUNTERPARTY_BANK, + self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, + self::REASON_UNKNOWN, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_APPROVAL_PENDING, + self::STATUS_ATM_WITHDRAWAL, + self::STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING, + self::STATUS_ATM_WITHDRAWAL_REVERSED, + self::STATUS_AUTH_ADJUSTMENT_AUTHORISED, + self::STATUS_AUTH_ADJUSTMENT_ERROR, + self::STATUS_AUTH_ADJUSTMENT_REFUSED, + self::STATUS_AUTHORISED, + self::STATUS_BANK_TRANSFER, + self::STATUS_BANK_TRANSFER_PENDING, + self::STATUS_BOOKED, + self::STATUS_BOOKING_PENDING, + self::STATUS_CANCELLED, + self::STATUS_CAPTURE_PENDING, + 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, + self::STATUS_CREDITED, + self::STATUS_DEPOSIT_CORRECTION, + self::STATUS_DEPOSIT_CORRECTION_PENDING, + self::STATUS_DISPUTE, + self::STATUS_DISPUTE_CLOSED, + self::STATUS_DISPUTE_EXPIRED, + self::STATUS_DISPUTE_NEEDS_REVIEW, + self::STATUS_ERROR, + self::STATUS_EXPIRED, + self::STATUS_FAILED, + self::STATUS_FEE, + self::STATUS_FEE_PENDING, + self::STATUS_INTERNAL_TRANSFER, + self::STATUS_INTERNAL_TRANSFER_PENDING, + self::STATUS_INVOICE_DEDUCTION, + self::STATUS_INVOICE_DEDUCTION_PENDING, + self::STATUS_MANUAL_CORRECTION_PENDING, + self::STATUS_MANUALLY_CORRECTED, + self::STATUS_MATCHED_STATEMENT, + self::STATUS_MATCHED_STATEMENT_PENDING, + self::STATUS_MERCHANT_PAYIN, + self::STATUS_MERCHANT_PAYIN_PENDING, + self::STATUS_MERCHANT_PAYIN_REVERSED, + self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, + self::STATUS_MISC_COST, + self::STATUS_MISC_COST_PENDING, + self::STATUS_PAYMENT_COST, + self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_RECEIVED, + self::STATUS_REFUND_PENDING, + 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, + self::STATUS_RETURNED, + self::STATUS_SECOND_CHARGEBACK, + self::STATUS_SECOND_CHARGEBACK_PENDING, + self::STATUS_UNDEFINED, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ACCOUNTING, + self::TYPE_TRACKING, + ]; + } + /** + * 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('amountAdjustments', $data ?? [], null); + $this->setIfExists('bookingDate', $data ?? [], null); + $this->setIfExists('estimatedArrivalTime', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('modification', $data ?? [], null); + $this->setIfExists('mutations', $data ?? [], null); + $this->setIfExists('originalAmount', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('schemeTraceID', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionID', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('transactionId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('updateDate', $data ?? [], null); + $this->setIfExists('valueDate', $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->getReasonAllowableValues(); + if (!is_null($this->container['reason']) && !in_array($this->container['reason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'reason', must be one of '%s'", + $this->container['reason'], + implode("', '", $allowedValues) + ); + } + + $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) + ); + } + + $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 amount + * + * @return \Adyen\Model\TransferWebhook\Amount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\TransferWebhook\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 amountAdjustments + * + * @return \Adyen\Model\TransferWebhook\AmountAdjustment[]|null + */ + public function getAmountAdjustments() + { + return $this->container['amountAdjustments']; + } + + /** + * Sets amountAdjustments + * + * @param \Adyen\Model\TransferWebhook\AmountAdjustment[]|null $amountAdjustments The amount adjustments in this transfer. + * + * @return self + */ + public function setAmountAdjustments($amountAdjustments) + { + if (is_null($amountAdjustments)) { + throw new \InvalidArgumentException('non-nullable amountAdjustments cannot be null'); + } + $this->container['amountAdjustments'] = $amountAdjustments; + + return $this; + } + + /** + * Gets bookingDate + * + * @return \DateTime|null + */ + public function getBookingDate() + { + return $this->container['bookingDate']; + } + + /** + * Sets bookingDate + * + * @param \DateTime|null $bookingDate The date when the transfer request was sent. + * + * @return self + */ + public function setBookingDate($bookingDate) + { + if (is_null($bookingDate)) { + throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); + } + $this->container['bookingDate'] = $bookingDate; + + return $this; + } + + /** + * Gets estimatedArrivalTime + * + * @return \DateTime|null + */ + public function getEstimatedArrivalTime() + { + return $this->container['estimatedArrivalTime']; + } + + /** + * Sets estimatedArrivalTime + * + * @param \DateTime|null $estimatedArrivalTime The estimated time the beneficiary should have access to the funds. + * + * @return self + */ + public function setEstimatedArrivalTime($estimatedArrivalTime) + { + if (is_null($estimatedArrivalTime)) { + throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); + } + $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the transfer event. + * + * @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 modification + * + * @return \Adyen\Model\TransferWebhook\Modification|null + */ + public function getModification() + { + return $this->container['modification']; + } + + /** + * Sets modification + * + * @param \Adyen\Model\TransferWebhook\Modification|null $modification modification + * + * @return self + */ + public function setModification($modification) + { + if (is_null($modification)) { + throw new \InvalidArgumentException('non-nullable modification cannot be null'); + } + $this->container['modification'] = $modification; + + return $this; + } + + /** + * Gets mutations + * + * @return \Adyen\Model\TransferWebhook\BalanceMutation[]|null + */ + public function getMutations() + { + return $this->container['mutations']; + } + + /** + * Sets mutations + * + * @param \Adyen\Model\TransferWebhook\BalanceMutation[]|null $mutations The list of the balance mutation per event. + * + * @return self + */ + public function setMutations($mutations) + { + if (is_null($mutations)) { + throw new \InvalidArgumentException('non-nullable mutations cannot be null'); + } + $this->container['mutations'] = $mutations; + + return $this; + } + + /** + * Gets originalAmount + * + * @return \Adyen\Model\TransferWebhook\Amount|null + */ + public function getOriginalAmount() + { + return $this->container['originalAmount']; + } + + /** + * Sets originalAmount + * + * @param \Adyen\Model\TransferWebhook\Amount|null $originalAmount originalAmount + * + * @return self + */ + public function setOriginalAmount($originalAmount) + { + if (is_null($originalAmount)) { + throw new \InvalidArgumentException('non-nullable originalAmount cannot be null'); + } + $this->container['originalAmount'] = $originalAmount; + + return $this; + } + + /** + * Gets reason + * + * @return string|null + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason The reason for the transfer status. + * + * @return self + */ + public function setReason($reason) + { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } + $allowedValues = $this->getReasonAllowableValues(); + if (!in_array($reason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'reason', must be one of '%s'", + $reason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets schemeTraceID + * + * @return string|null + */ + public function getSchemeTraceID() + { + return $this->container['schemeTraceID']; + } + + /** + * Sets schemeTraceID + * + * @param string|null $schemeTraceID SchemeTraceID retrieved from scheme. + * + * @return self + */ + public function setSchemeTraceID($schemeTraceID) + { + if (is_null($schemeTraceID)) { + throw new \InvalidArgumentException('non-nullable schemeTraceID cannot be null'); + } + $this->container['schemeTraceID'] = $schemeTraceID; + + return $this; + } + + /** + * Gets schemeUniqueTransactionID + * + * @return string|null + */ + public function getSchemeUniqueTransactionID() + { + return $this->container['schemeUniqueTransactionID']; + } + + /** + * Sets schemeUniqueTransactionID + * + * @param string|null $schemeUniqueTransactionID SchemeUniqueTransactionID retrieved from scheme. + * + * @return self + */ + public function setSchemeUniqueTransactionID($schemeUniqueTransactionID) + { + if (is_null($schemeUniqueTransactionID)) { + throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionID cannot be null'); + } + $this->container['schemeUniqueTransactionID'] = $schemeUniqueTransactionID; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the transfer event. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets transactionId + * + * @return string|null + */ + public function getTransactionId() + { + return $this->container['transactionId']; + } + + /** + * Sets transactionId + * + * @param string|null $transactionId The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. + * + * @return self + */ + public function setTransactionId($transactionId) + { + if (is_null($transactionId)) { + throw new \InvalidArgumentException('non-nullable transactionId cannot be null'); + } + $this->container['transactionId'] = $transactionId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of the transfer event. Possible values: **accounting**, **tracking**. + * + * @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 updateDate + * + * @return \DateTime|null + */ + public function getUpdateDate() + { + return $this->container['updateDate']; + } + + /** + * Sets updateDate + * + * @param \DateTime|null $updateDate The date when the tracking status was updated. + * + * @return self + */ + public function setUpdateDate($updateDate) + { + if (is_null($updateDate)) { + throw new \InvalidArgumentException('non-nullable updateDate cannot be null'); + } + $this->container['updateDate'] = $updateDate; + + return $this; + } + + /** + * Gets valueDate + * + * @return \DateTime|null + */ + public function getValueDate() + { + return $this->container['valueDate']; + } + + /** + * Sets valueDate + * + * @param \DateTime|null $valueDate A future date, when the funds are expected to be deducted from or credited to the balance account. + * + * @return self + */ + public function setValueDate($valueDate) + { + if (is_null($valueDate)) { + throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); + } + $this->container['valueDate'] = $valueDate; + + 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/TransferWebhook/TransferNotificationRequest.php b/src/Adyen/Model/TransferWebhook/TransferNotificationRequest.php new file mode 100644 index 000000000..30d5b28bd --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransferNotificationRequest.php @@ -0,0 +1,491 @@ + + */ +class TransferNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Adyen\Model\TransferWebhook\TransferData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'data' => false, + 'environment' => 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 = [ + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_CREATED = 'balancePlatform.transfer.created'; + public const TYPE_UPDATED = 'balancePlatform.transfer.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CREATED, + self::TYPE_UPDATED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' 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 data + * + * @return \Adyen\Model\TransferWebhook\TransferData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\TransferWebhook\TransferData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of webhook. + * + * @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/TransferWebhook/TransferNotificationTransferTracking.php b/src/Adyen/Model/TransferWebhook/TransferNotificationTransferTracking.php new file mode 100644 index 000000000..c5c82afe1 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransferNotificationTransferTracking.php @@ -0,0 +1,449 @@ + + */ +class TransferNotificationTransferTracking implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferNotificationTransferTracking'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'estimatedArrivalTime' => '\DateTime', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'estimatedArrivalTime' => 'date-time', + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'estimatedArrivalTime' => 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 = [ + 'estimatedArrivalTime' => 'estimatedArrivalTime', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'estimatedArrivalTime' => 'setEstimatedArrivalTime', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'estimatedArrivalTime' => 'getEstimatedArrivalTime', + '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_CREDITED = 'credited'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_CREDITED, + ]; + } + /** + * 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('estimatedArrivalTime', $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 estimatedArrivalTime + * + * @return \DateTime|null + */ + public function getEstimatedArrivalTime() + { + return $this->container['estimatedArrivalTime']; + } + + /** + * Sets estimatedArrivalTime + * + * @param \DateTime|null $estimatedArrivalTime The estimated time the beneficiary should have access to the funds. + * + * @return self + */ + public function setEstimatedArrivalTime($estimatedArrivalTime) + { + if (is_null($estimatedArrivalTime)) { + throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); + } + $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The tracking status of the transfer. + * + * @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/TransferWebhook/TransferNotificationValidationFact.php b/src/Adyen/Model/TransferWebhook/TransferNotificationValidationFact.php new file mode 100644 index 000000000..ff1a79118 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/TransferNotificationValidationFact.php @@ -0,0 +1,418 @@ + + */ +class TransferNotificationValidationFact implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferNotificationValidationFact'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'result' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'result' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'result' => 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 = [ + 'result' => 'result', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('result', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets result + * + * @return string|null + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string|null $result The evaluation result of the validation fact. + * + * @return self + */ + public function setResult($result) + { + if (is_null($result)) { + throw new \InvalidArgumentException('non-nullable result cannot be null'); + } + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of the validation fact. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + /** + * 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/TransferWebhook/UKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/UKLocalAccountIdentification.php new file mode 100644 index 000000000..ccc4a46de --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/UKLocalAccountIdentification.php @@ -0,0 +1,492 @@ + + */ +class UKLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UKLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'sortCode' => '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, + 'sortCode' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'sortCode' => 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', + 'sortCode' => 'sortCode', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'sortCode' => 'setSortCode', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'sortCode' => 'getSortCode', + '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_UK_LOCAL = 'ukLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_UK_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('sortCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'ukLocal'); + } + + /** + * 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['sortCode'] === null) { + $invalidProperties[] = "'sortCode' 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 8-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 sortCode + * + * @return string + */ + public function getSortCode() + { + return $this->container['sortCode']; + } + + /** + * Sets sortCode + * + * @param string $sortCode The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + * + * @return self + */ + public function setSortCode($sortCode) + { + if (is_null($sortCode)) { + throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); + } + $this->container['sortCode'] = $sortCode; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **ukLocal** + * + * @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/TransferWebhook/USLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhook/USLocalAccountIdentification.php new file mode 100644 index 000000000..7cd14d828 --- /dev/null +++ b/src/Adyen/Model/TransferWebhook/USLocalAccountIdentification.php @@ -0,0 +1,559 @@ + + */ +class USLocalAccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'USLocalAccountIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountNumber' => 'string', + 'accountType' => 'string', + 'routingNumber' => '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, + 'accountType' => null, + 'routingNumber' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountNumber' => false, + 'accountType' => false, + 'routingNumber' => 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', + 'accountType' => 'accountType', + 'routingNumber' => 'routingNumber', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountNumber' => 'setAccountNumber', + 'accountType' => 'setAccountType', + 'routingNumber' => 'setRoutingNumber', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountNumber' => 'getAccountNumber', + 'accountType' => 'getAccountType', + 'routingNumber' => 'getRoutingNumber', + '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 ACCOUNT_TYPE_CHECKING = 'checking'; + public const ACCOUNT_TYPE_SAVINGS = 'savings'; + public const TYPE_US_LOCAL = 'usLocal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountTypeAllowableValues() + { + return [ + self::ACCOUNT_TYPE_CHECKING, + self::ACCOUNT_TYPE_SAVINGS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_US_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('accountType', $data ?? [], 'checking'); + $this->setIfExists('routingNumber', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'usLocal'); + } + + /** + * 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"; + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!is_null($this->container['accountType']) && !in_array($this->container['accountType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountType', must be one of '%s'", + $this->container['accountType'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['routingNumber'] === null) { + $invalidProperties[] = "'routingNumber' 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 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 accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!in_array($accountType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountType', must be one of '%s'", + $accountType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets routingNumber + * + * @return string + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string $routingNumber The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + if (is_null($routingNumber)) { + throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); + } + $this->container['routingNumber'] = $routingNumber; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **usLocal** + * + * @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/AULocalAccountIdentification.php b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php index d7f3f1320..1901e209e 100644 --- a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/AdditionalBankIdentification.php b/src/Adyen/Model/Transfers/AdditionalBankIdentification.php index 983b3d199..2849aa165 100644 --- a/src/Adyen/Model/Transfers/AdditionalBankIdentification.php +++ b/src/Adyen/Model/Transfers/AdditionalBankIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Address.php b/src/Adyen/Model/Transfers/Address.php index 97a25739c..02c0bc1a1 100644 --- a/src/Adyen/Model/Transfers/Address.php +++ b/src/Adyen/Model/Transfers/Address.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Amount.php b/src/Adyen/Model/Transfers/Amount.php index 014877e31..e815d3976 100644 --- a/src/Adyen/Model/Transfers/Amount.php +++ b/src/Adyen/Model/Transfers/Amount.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php index 42e3edac1..d29b31f15 100644 --- a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/BankAccountV3.php b/src/Adyen/Model/Transfers/BankAccountV3.php index e9f0d8fbd..1517a9cac 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3.php +++ b/src/Adyen/Model/Transfers/BankAccountV3.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index e45e78b18..97edbf1f2 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/BankCategoryData.php b/src/Adyen/Model/Transfers/BankCategoryData.php index 4b03e9bf6..fc0929a90 100644 --- a/src/Adyen/Model/Transfers/BankCategoryData.php +++ b/src/Adyen/Model/Transfers/BankCategoryData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php index 91a857145..5e939e144 100644 --- a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php index 73312b310..c5e52c35f 100644 --- a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CapitalBalance.php b/src/Adyen/Model/Transfers/CapitalBalance.php index a3486c494..ee4190a6b 100644 --- a/src/Adyen/Model/Transfers/CapitalBalance.php +++ b/src/Adyen/Model/Transfers/CapitalBalance.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CapitalGrant.php b/src/Adyen/Model/Transfers/CapitalGrant.php index 106a6143a..e600887b9 100644 --- a/src/Adyen/Model/Transfers/CapitalGrant.php +++ b/src/Adyen/Model/Transfers/CapitalGrant.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CapitalGrantInfo.php b/src/Adyen/Model/Transfers/CapitalGrantInfo.php index 6753311ae..aa362b6c0 100644 --- a/src/Adyen/Model/Transfers/CapitalGrantInfo.php +++ b/src/Adyen/Model/Transfers/CapitalGrantInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CapitalGrants.php b/src/Adyen/Model/Transfers/CapitalGrants.php index 14feb173f..613eb4023 100644 --- a/src/Adyen/Model/Transfers/CapitalGrants.php +++ b/src/Adyen/Model/Transfers/CapitalGrants.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Counterparty.php b/src/Adyen/Model/Transfers/Counterparty.php index 298f4c82a..335d26e10 100644 --- a/src/Adyen/Model/Transfers/Counterparty.php +++ b/src/Adyen/Model/Transfers/Counterparty.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CounterpartyInfoV3.php b/src/Adyen/Model/Transfers/CounterpartyInfoV3.php index fb839c8e8..8913205e2 100644 --- a/src/Adyen/Model/Transfers/CounterpartyInfoV3.php +++ b/src/Adyen/Model/Transfers/CounterpartyInfoV3.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/CounterpartyV3.php b/src/Adyen/Model/Transfers/CounterpartyV3.php index be41f8a7f..90d2c0a28 100644 --- a/src/Adyen/Model/Transfers/CounterpartyV3.php +++ b/src/Adyen/Model/Transfers/CounterpartyV3.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php index 2aa95f5b4..bf06c781b 100644 --- a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Fee.php b/src/Adyen/Model/Transfers/Fee.php index 4cfb78de5..fbd1834ab 100644 --- a/src/Adyen/Model/Transfers/Fee.php +++ b/src/Adyen/Model/Transfers/Fee.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php index 23f3fa7d6..428854511 100644 --- a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php index ec1ad8fdc..c3b357222 100644 --- a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/IbanAccountIdentification.php b/src/Adyen/Model/Transfers/IbanAccountIdentification.php index f37773acd..bb4ca9f90 100644 --- a/src/Adyen/Model/Transfers/IbanAccountIdentification.php +++ b/src/Adyen/Model/Transfers/IbanAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/InternalCategoryData.php b/src/Adyen/Model/Transfers/InternalCategoryData.php index 43ac989fa..c0f6bd6dc 100644 --- a/src/Adyen/Model/Transfers/InternalCategoryData.php +++ b/src/Adyen/Model/Transfers/InternalCategoryData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/InvalidField.php b/src/Adyen/Model/Transfers/InvalidField.php index b22c3e664..d2f208b79 100644 --- a/src/Adyen/Model/Transfers/InvalidField.php +++ b/src/Adyen/Model/Transfers/InvalidField.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/IssuedCard.php b/src/Adyen/Model/Transfers/IssuedCard.php index 609bfd23b..9d49c912c 100644 --- a/src/Adyen/Model/Transfers/IssuedCard.php +++ b/src/Adyen/Model/Transfers/IssuedCard.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Link.php b/src/Adyen/Model/Transfers/Link.php index 946316cc0..4f9ec8529 100644 --- a/src/Adyen/Model/Transfers/Link.php +++ b/src/Adyen/Model/Transfers/Link.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Links.php b/src/Adyen/Model/Transfers/Links.php index ac5160f3d..d34293ace 100644 --- a/src/Adyen/Model/Transfers/Links.php +++ b/src/Adyen/Model/Transfers/Links.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/MerchantData.php b/src/Adyen/Model/Transfers/MerchantData.php index 61f58df75..f69baa932 100644 --- a/src/Adyen/Model/Transfers/MerchantData.php +++ b/src/Adyen/Model/Transfers/MerchantData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ModelInterface.php b/src/Adyen/Model/Transfers/ModelInterface.php index 0ad344c02..d5e6438fe 100644 --- a/src/Adyen/Model/Transfers/ModelInterface.php +++ b/src/Adyen/Model/Transfers/ModelInterface.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php index 7c8bf6781..0e98b008a 100644 --- a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php index 9420baf71..c58c71a56 100644 --- a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/NameLocation.php b/src/Adyen/Model/Transfers/NameLocation.php index 325cd7479..1fe9d58bf 100644 --- a/src/Adyen/Model/Transfers/NameLocation.php +++ b/src/Adyen/Model/Transfers/NameLocation.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php index c25ef7da2..838ca66e1 100644 --- a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index 3dd1e96c3..349b367b3 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -65,7 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { @@ -261,7 +260,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php index e606da286..b021cd4f0 100644 --- a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/PartyIdentification.php b/src/Adyen/Model/Transfers/PartyIdentification.php index c2d7aedaa..c98e9e0b1 100644 --- a/src/Adyen/Model/Transfers/PartyIdentification.php +++ b/src/Adyen/Model/Transfers/PartyIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/PaymentInstrument.php b/src/Adyen/Model/Transfers/PaymentInstrument.php index 486575d98..c87a1e306 100644 --- a/src/Adyen/Model/Transfers/PaymentInstrument.php +++ b/src/Adyen/Model/Transfers/PaymentInstrument.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/PlatformPayment.php b/src/Adyen/Model/Transfers/PlatformPayment.php index fc9484056..98fb4eb36 100644 --- a/src/Adyen/Model/Transfers/PlatformPayment.php +++ b/src/Adyen/Model/Transfers/PlatformPayment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/RelayedAuthorisationData.php b/src/Adyen/Model/Transfers/RelayedAuthorisationData.php index 46c355e43..ddebe348d 100644 --- a/src/Adyen/Model/Transfers/RelayedAuthorisationData.php +++ b/src/Adyen/Model/Transfers/RelayedAuthorisationData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Repayment.php b/src/Adyen/Model/Transfers/Repayment.php index 5a30bb190..19a030ed4 100644 --- a/src/Adyen/Model/Transfers/Repayment.php +++ b/src/Adyen/Model/Transfers/Repayment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/RepaymentTerm.php b/src/Adyen/Model/Transfers/RepaymentTerm.php index b7f4fad7a..411942e52 100644 --- a/src/Adyen/Model/Transfers/RepaymentTerm.php +++ b/src/Adyen/Model/Transfers/RepaymentTerm.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ResourceReference.php b/src/Adyen/Model/Transfers/ResourceReference.php index 052a78ced..3d03ed587 100644 --- a/src/Adyen/Model/Transfers/ResourceReference.php +++ b/src/Adyen/Model/Transfers/ResourceReference.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/RestServiceError.php b/src/Adyen/Model/Transfers/RestServiceError.php index f561c550c..9fdb48796 100644 --- a/src/Adyen/Model/Transfers/RestServiceError.php +++ b/src/Adyen/Model/Transfers/RestServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ReturnTransferRequest.php b/src/Adyen/Model/Transfers/ReturnTransferRequest.php index fa55bd297..1adde00b7 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferRequest.php +++ b/src/Adyen/Model/Transfers/ReturnTransferRequest.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ReturnTransferResponse.php b/src/Adyen/Model/Transfers/ReturnTransferResponse.php index cec67a9e3..0b2a1c76b 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferResponse.php +++ b/src/Adyen/Model/Transfers/ReturnTransferResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php index 03eae460b..725ce9f94 100644 --- a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php index 62a19bf6e..f977fb557 100644 --- a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ServiceError.php b/src/Adyen/Model/Transfers/ServiceError.php index f0cca127e..00ece6de7 100644 --- a/src/Adyen/Model/Transfers/ServiceError.php +++ b/src/Adyen/Model/Transfers/ServiceError.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/ThresholdRepayment.php b/src/Adyen/Model/Transfers/ThresholdRepayment.php index fb5d25d5a..71e5ead29 100644 --- a/src/Adyen/Model/Transfers/ThresholdRepayment.php +++ b/src/Adyen/Model/Transfers/ThresholdRepayment.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index d6b6e6ff1..403f416be 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/TransactionSearchResponse.php b/src/Adyen/Model/Transfers/TransactionSearchResponse.php index 4bbb69e34..edb4d16f2 100644 --- a/src/Adyen/Model/Transfers/TransactionSearchResponse.php +++ b/src/Adyen/Model/Transfers/TransactionSearchResponse.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index a01d01ab6..3de4d767e 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/TransferCategoryData.php b/src/Adyen/Model/Transfers/TransferCategoryData.php index 8c033e8e8..5a13c43bd 100644 --- a/src/Adyen/Model/Transfers/TransferCategoryData.php +++ b/src/Adyen/Model/Transfers/TransferCategoryData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/TransferData.php b/src/Adyen/Model/Transfers/TransferData.php index e842ce880..5bf9a9409 100644 --- a/src/Adyen/Model/Transfers/TransferData.php +++ b/src/Adyen/Model/Transfers/TransferData.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index 37b63583f..f1e94a103 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php b/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php index 2a50fecee..a757324cf 100644 --- a/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php index f5ea22bae..f2e41ce36 100644 --- a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php index ee1586d28..477399633 100644 --- a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php index b791650f3..e9f5f976c 100644 --- a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php +++ b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php @@ -5,7 +5,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/BalanceControl/GeneralApi.php b/src/Adyen/Service/BalanceControl/GeneralApi.php new file mode 100644 index 000000000..6e6d57b65 --- /dev/null +++ b/src/Adyen/Service/BalanceControl/GeneralApi.php @@ -0,0 +1,56 @@ +baseURL = $this->createBaseUrl("https://pal-test.adyen.com/pal/servlet/BalanceControl/v1"); + } + + /** + * Start a balance transfer + * + * @param \Adyen\Model\BalanceControl\BalanceTransferRequest $balanceTransferRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalanceControl\BalanceTransferResponse + * @throws AdyenException + */ + public function balanceTransfer(\Adyen\Model\BalanceControl\BalanceTransferRequest $balanceTransferRequest, array $requestOptions = null): \Adyen\Model\BalanceControl\BalanceTransferResponse + { + $endpoint = $this->baseURL . "/balanceTransfer"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $balanceTransferRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalanceControl\BalanceTransferResponse::class); + } +} diff --git a/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php b/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php index dfcf60197..10b3b8f2a 100644 --- a/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php +++ b/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,6 +39,21 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); } + /** + * Create an account holder + * + * @param \Adyen\Model\BalancePlatform\AccountHolderInfo $accountHolderInfo + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\AccountHolder + * @throws AdyenException + */ + public function createAccountHolder(\Adyen\Model\BalancePlatform\AccountHolderInfo $accountHolderInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\AccountHolder + { + $endpoint = $this->baseURL . "/accountHolders"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $accountHolderInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\AccountHolder::class); + } + /** * Get an account holder * @@ -99,19 +114,4 @@ public function updateAccountHolder(string $id, \Adyen\Model\BalancePlatform\Acc $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $accountHolderUpdateRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\AccountHolder::class); } - - /** - * Create an account holder - * - * @param \Adyen\Model\BalancePlatform\AccountHolderInfo $accountHolderInfo - * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\AccountHolder - * @throws AdyenException - */ - public function createAccountHolder(\Adyen\Model\BalancePlatform\AccountHolderInfo $accountHolderInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\AccountHolder - { - $endpoint = $this->baseURL . "/accountHolders"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $accountHolderInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\AccountHolder::class); - } } diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 0ae12cde8..cf5cbe309 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,50 +39,81 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); } + /** + * Create a balance account + * + * @param \Adyen\Model\BalancePlatform\BalanceAccountInfo $balanceAccountInfo + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\BalanceAccount + * @throws AdyenException + */ + public function createBalanceAccount(\Adyen\Model\BalancePlatform\BalanceAccountInfo $balanceAccountInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\BalanceAccount + { + $endpoint = $this->baseURL . "/balanceAccounts"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $balanceAccountInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalanceAccount::class); + } + + /** + * Create a sweep + * + * @param string $balanceAccountId + * @param \Adyen\Model\BalancePlatform\CreateSweepConfigurationV2 $createSweepConfigurationV2 + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\SweepConfigurationV2 + * @throws AdyenException + */ + public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatform\CreateSweepConfigurationV2 $createSweepConfigurationV2, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 + { + $endpoint = $this->baseURL . str_replace(['{balanceAccountId}'], [$balanceAccountId], "/balanceAccounts/{balanceAccountId}/sweeps"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createSweepConfigurationV2->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\SweepConfigurationV2::class); + } + /** * Delete a sweep * * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** - * Get all sweeps for a balance account + * Get all payment instruments for a balance account * - * @param string $balanceAccountId + * @param string $id * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\BalancePlatform\BalanceSweepConfigurationsResponse + * @return \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse * @throws AdyenException */ - public function getAllSweepsForBalanceAccount(string $balanceAccountId, array $requestOptions = null): \Adyen\Model\BalancePlatform\BalanceSweepConfigurationsResponse + public function getAllPaymentInstrumentsForBalanceAccount(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse { - $endpoint = $this->baseURL . str_replace(['{balanceAccountId}'], [$balanceAccountId], "/balanceAccounts/{balanceAccountId}/sweeps"); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balanceAccounts/{id}/paymentInstruments"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalanceSweepConfigurationsResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse::class); } /** - * Get a sweep + * Get all sweeps for a balance account * * @param string $balanceAccountId - * @param string $sweepId - * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\SweepConfigurationV2 + * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\BalancePlatform\BalanceSweepConfigurationsResponse * @throws AdyenException */ - public function getSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 + public function getAllSweepsForBalanceAccount(string $balanceAccountId, array $requestOptions = null): \Adyen\Model\BalancePlatform\BalanceSweepConfigurationsResponse { - $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); + $endpoint = $this->baseURL . str_replace(['{balanceAccountId}'], [$balanceAccountId], "/balanceAccounts/{balanceAccountId}/sweeps"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\SweepConfigurationV2::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalanceSweepConfigurationsResponse::class); } /** @@ -101,34 +132,18 @@ public function getBalanceAccount(string $id, array $requestOptions = null): \Ad } /** - * Get all payment instruments for a balance account - * - * @param string $id - * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse - * @throws AdyenException - */ - public function getAllPaymentInstrumentsForBalanceAccount(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse - { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balanceAccounts/{id}/paymentInstruments"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedPaymentInstrumentsResponse::class); - } - - /** - * Update a sweep + * Get a sweep * * @param string $balanceAccountId * @param string $sweepId - * @param \Adyen\Model\BalancePlatform\UpdateSweepConfigurationV2 $updateSweepConfigurationV2 * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\SweepConfigurationV2 * @throws AdyenException */ - public function updateSweep(string $balanceAccountId, string $sweepId, \Adyen\Model\BalancePlatform\UpdateSweepConfigurationV2 $updateSweepConfigurationV2, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 + public function getSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateSweepConfigurationV2->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\SweepConfigurationV2::class); } @@ -149,33 +164,19 @@ public function updateBalanceAccount(string $id, \Adyen\Model\BalancePlatform\Ba } /** - * Create a balance account - * - * @param \Adyen\Model\BalancePlatform\BalanceAccountInfo $balanceAccountInfo - * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\BalanceAccount - * @throws AdyenException - */ - public function createBalanceAccount(\Adyen\Model\BalancePlatform\BalanceAccountInfo $balanceAccountInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\BalanceAccount - { - $endpoint = $this->baseURL . "/balanceAccounts"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $balanceAccountInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalanceAccount::class); - } - - /** - * Create a sweep + * Update a sweep * * @param string $balanceAccountId - * @param \Adyen\Model\BalancePlatform\CreateSweepConfigurationV2 $createSweepConfigurationV2 + * @param string $sweepId + * @param \Adyen\Model\BalancePlatform\UpdateSweepConfigurationV2 $updateSweepConfigurationV2 * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\SweepConfigurationV2 * @throws AdyenException */ - public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatform\CreateSweepConfigurationV2 $createSweepConfigurationV2, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 + public function updateSweep(string $balanceAccountId, string $sweepId, \Adyen\Model\BalancePlatform\UpdateSweepConfigurationV2 $updateSweepConfigurationV2, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 { - $endpoint = $this->baseURL . str_replace(['{balanceAccountId}'], [$balanceAccountId], "/balanceAccounts/{balanceAccountId}/sweeps"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createSweepConfigurationV2->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateSweepConfigurationV2->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\SweepConfigurationV2::class); } } diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index 6197e93ac..99bc3b6bd 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -44,12 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php b/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php index 44ba3ba83..db4742658 100644 --- a/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/GrantAccountsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/BalancePlatform/GrantOffersApi.php b/src/Adyen/Service/BalancePlatform/GrantOffersApi.php index f07b49615..895f3b39c 100644 --- a/src/Adyen/Service/BalancePlatform/GrantOffersApi.php +++ b/src/Adyen/Service/BalancePlatform/GrantOffersApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index 5b9df002c..2e704599b 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -60,12 +60,13 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsApi.php b/src/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsApi.php index f8724c14c..b33272d05 100644 --- a/src/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsApi.php +++ b/src/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,17 +40,17 @@ public function __construct(Client $client) } /** - * Get a payment instrument group + * Create a payment instrument group * - * @param string $id + * @param \Adyen\Model\BalancePlatform\PaymentInstrumentGroupInfo $paymentInstrumentGroupInfo * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\PaymentInstrumentGroup * @throws AdyenException */ - public function getPaymentInstrumentGroup(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrumentGroup + public function createPaymentInstrumentGroup(\Adyen\Model\BalancePlatform\PaymentInstrumentGroupInfo $paymentInstrumentGroupInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrumentGroup { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstrumentGroups/{id}"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + $endpoint = $this->baseURL . "/paymentInstrumentGroups"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentInstrumentGroupInfo->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaymentInstrumentGroup::class); } @@ -70,17 +70,17 @@ public function getAllTransactionRulesForPaymentInstrumentGroup(string $id, arra } /** - * Create a payment instrument group + * Get a payment instrument group * - * @param \Adyen\Model\BalancePlatform\PaymentInstrumentGroupInfo $paymentInstrumentGroupInfo + * @param string $id * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\PaymentInstrumentGroup * @throws AdyenException */ - public function createPaymentInstrumentGroup(\Adyen\Model\BalancePlatform\PaymentInstrumentGroupInfo $paymentInstrumentGroupInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrumentGroup + public function getPaymentInstrumentGroup(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrumentGroup { - $endpoint = $this->baseURL . "/paymentInstrumentGroups"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentInstrumentGroupInfo->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstrumentGroups/{id}"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaymentInstrumentGroup::class); } } diff --git a/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php b/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php index 5113efda7..77105265c 100644 --- a/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php +++ b/src/Adyen/Service/BalancePlatform/PaymentInstrumentsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,33 +40,33 @@ public function __construct(Client $client) } /** - * Get a payment instrument + * Create a payment instrument * - * @param string $id + * @param \Adyen\Model\BalancePlatform\PaymentInstrumentInfo $paymentInstrumentInfo * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\PaymentInstrument * @throws AdyenException */ - public function getPaymentInstrument(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrument + public function createPaymentInstrument(\Adyen\Model\BalancePlatform\PaymentInstrumentInfo $paymentInstrumentInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrument { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + $endpoint = $this->baseURL . "/paymentInstruments"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentInstrumentInfo->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaymentInstrument::class); } /** - * List network tokens + * Get all transaction rules for a payment instrument * * @param string $id * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\ListNetworkTokensResponse + * @return \Adyen\Model\BalancePlatform\TransactionRulesResponse * @throws AdyenException */ - public function listNetworkTokens(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\ListNetworkTokensResponse + public function getAllTransactionRulesForPaymentInstrument(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\TransactionRulesResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}/networkTokens"); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}/transactionRules"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\ListNetworkTokensResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\TransactionRulesResponse::class); } /** @@ -85,48 +85,48 @@ public function getPanOfPaymentInstrument(string $id, array $requestOptions = nu } /** - * Get all transaction rules for a payment instrument + * Get a payment instrument * * @param string $id * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\TransactionRulesResponse + * @return \Adyen\Model\BalancePlatform\PaymentInstrument * @throws AdyenException */ - public function getAllTransactionRulesForPaymentInstrument(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\TransactionRulesResponse + public function getPaymentInstrument(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrument { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}/transactionRules"); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\TransactionRulesResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaymentInstrument::class); } /** - * Update a payment instrument + * List network tokens * * @param string $id - * @param \Adyen\Model\BalancePlatform\PaymentInstrumentUpdateRequest $paymentInstrumentUpdateRequest * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\UpdatePaymentInstrument + * @return \Adyen\Model\BalancePlatform\ListNetworkTokensResponse * @throws AdyenException */ - public function updatePaymentInstrument(string $id, \Adyen\Model\BalancePlatform\PaymentInstrumentUpdateRequest $paymentInstrumentUpdateRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\UpdatePaymentInstrument + public function listNetworkTokens(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\ListNetworkTokensResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $paymentInstrumentUpdateRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\UpdatePaymentInstrument::class); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}/networkTokens"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\ListNetworkTokensResponse::class); } /** - * Create a payment instrument + * Update a payment instrument * - * @param \Adyen\Model\BalancePlatform\PaymentInstrumentInfo $paymentInstrumentInfo + * @param string $id + * @param \Adyen\Model\BalancePlatform\PaymentInstrumentUpdateRequest $paymentInstrumentUpdateRequest * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\PaymentInstrument + * @return \Adyen\Model\BalancePlatform\UpdatePaymentInstrument * @throws AdyenException */ - public function createPaymentInstrument(\Adyen\Model\BalancePlatform\PaymentInstrumentInfo $paymentInstrumentInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaymentInstrument + public function updatePaymentInstrument(string $id, \Adyen\Model\BalancePlatform\PaymentInstrumentUpdateRequest $paymentInstrumentUpdateRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\UpdatePaymentInstrument { - $endpoint = $this->baseURL . "/paymentInstruments"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentInstrumentInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaymentInstrument::class); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/paymentInstruments/{id}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $paymentInstrumentUpdateRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\UpdatePaymentInstrument::class); } } diff --git a/src/Adyen/Service/BalancePlatform/PlatformApi.php b/src/Adyen/Service/BalancePlatform/PlatformApi.php index 165328e2f..1fbecfc0d 100644 --- a/src/Adyen/Service/BalancePlatform/PlatformApi.php +++ b/src/Adyen/Service/BalancePlatform/PlatformApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,32 +40,32 @@ public function __construct(Client $client) } /** - * Get a balance platform + * Get all account holders under a balance platform * * @param string $id - * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\BalancePlatform + * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\BalancePlatform\PaginatedAccountHoldersResponse * @throws AdyenException */ - public function getBalancePlatform(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\BalancePlatform + public function getAllAccountHoldersUnderBalancePlatform(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedAccountHoldersResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balancePlatforms/{id}"); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balancePlatforms/{id}/accountHolders"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalancePlatform::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedAccountHoldersResponse::class); } /** - * Get all account holders under a balance platform + * Get a balance platform * * @param string $id - * @param array|null $requestOptions ['queryParams' => ['offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\BalancePlatform\PaginatedAccountHoldersResponse + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\BalancePlatform * @throws AdyenException */ - public function getAllAccountHoldersUnderBalancePlatform(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\PaginatedAccountHoldersResponse + public function getBalancePlatform(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\BalancePlatform { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balancePlatforms/{id}/accountHolders"); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/balancePlatforms/{id}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedAccountHoldersResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\BalancePlatform::class); } } diff --git a/src/Adyen/Service/BalancePlatform/TransactionRulesApi.php b/src/Adyen/Service/BalancePlatform/TransactionRulesApi.php index e1035cd61..59fc7ccf7 100644 --- a/src/Adyen/Service/BalancePlatform/TransactionRulesApi.php +++ b/src/Adyen/Service/BalancePlatform/TransactionRulesApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,6 +39,21 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); } + /** + * Create a transaction rule + * + * @param \Adyen\Model\BalancePlatform\TransactionRuleInfo $transactionRuleInfo + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\TransactionRule + * @throws AdyenException + */ + public function createTransactionRule(\Adyen\Model\BalancePlatform\TransactionRuleInfo $transactionRuleInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\TransactionRule + { + $endpoint = $this->baseURL . "/transactionRules"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transactionRuleInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\TransactionRule::class); + } + /** * Delete a transaction rule * @@ -84,19 +99,4 @@ public function updateTransactionRule(string $transactionRuleId, \Adyen\Model\Ba $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $transactionRuleInfo->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\TransactionRule::class); } - - /** - * Create a transaction rule - * - * @param \Adyen\Model\BalancePlatform\TransactionRuleInfo $transactionRuleInfo - * @param array|null $requestOptions - * @return \Adyen\Model\BalancePlatform\TransactionRule - * @throws AdyenException - */ - public function createTransactionRule(\Adyen\Model\BalancePlatform\TransactionRuleInfo $transactionRuleInfo, array $requestOptions = null): \Adyen\Model\BalancePlatform\TransactionRule - { - $endpoint = $this->baseURL . "/transactionRules"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transactionRuleInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\TransactionRule::class); - } } diff --git a/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php b/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php index 7c592f27b..237e537b7 100644 --- a/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php +++ b/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 2 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/BinLookup/GeneralApi.php b/src/Adyen/Service/BinLookup/GeneralApi.php new file mode 100644 index 000000000..0b64ae5b4 --- /dev/null +++ b/src/Adyen/Service/BinLookup/GeneralApi.php @@ -0,0 +1,71 @@ +baseURL = $this->createBaseUrl("https://pal-test.adyen.com/pal/servlet/BinLookup/v54"); + } + + /** + * Check if 3D Secure is available + * + * @param \Adyen\Model\BinLookup\ThreeDSAvailabilityRequest $threeDSAvailabilityRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BinLookup\ThreeDSAvailabilityResponse + * @throws AdyenException + */ + public function get3dsAvailability(\Adyen\Model\BinLookup\ThreeDSAvailabilityRequest $threeDSAvailabilityRequest, array $requestOptions = null): \Adyen\Model\BinLookup\ThreeDSAvailabilityResponse + { + $endpoint = $this->baseURL . "/get3dsAvailability"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $threeDSAvailabilityRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BinLookup\ThreeDSAvailabilityResponse::class); + } + + /** + * Get a fees cost estimate + * + * @param \Adyen\Model\BinLookup\CostEstimateRequest $costEstimateRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BinLookup\CostEstimateResponse + * @throws AdyenException + */ + public function getCostEstimate(\Adyen\Model\BinLookup\CostEstimateRequest $costEstimateRequest, array $requestOptions = null): \Adyen\Model\BinLookup\CostEstimateResponse + { + $endpoint = $this->baseURL . "/getCostEstimate"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $costEstimateRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BinLookup\CostEstimateResponse::class); + } +} diff --git a/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php b/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php index 1e113d8b1..1f4de6dd0 100644 --- a/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php +++ b/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Checkout/ModificationsApi.php b/src/Adyen/Service/Checkout/ModificationsApi.php index 17c3d4d95..98a2271fd 100644 --- a/src/Adyen/Service/Checkout/ModificationsApi.php +++ b/src/Adyen/Service/Checkout/ModificationsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -54,22 +54,6 @@ public function cancelAuthorisedPayment(\Adyen\Model\Checkout\StandalonePaymentC return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\StandalonePaymentCancelResponse::class); } - /** - * Update an authorised amount - * - * @param string $paymentPspReference - * @param \Adyen\Model\Checkout\PaymentAmountUpdateRequest $paymentAmountUpdateRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Checkout\PaymentAmountUpdateResponse - * @throws AdyenException - */ - public function updateAuthorisedAmount(string $paymentPspReference, \Adyen\Model\Checkout\PaymentAmountUpdateRequest $paymentAmountUpdateRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentAmountUpdateResponse - { - $endpoint = $this->baseURL . str_replace(['{paymentPspReference}'], [$paymentPspReference], "/payments/{paymentPspReference}/amountUpdates"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentAmountUpdateRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentAmountUpdateResponse::class); - } - /** * Cancel an authorised payment * @@ -133,4 +117,20 @@ public function refundOrCancelPayment(string $paymentPspReference, \Adyen\Model\ $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentReversalRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentReversalResponse::class); } + + /** + * Update an authorised amount + * + * @param string $paymentPspReference + * @param \Adyen\Model\Checkout\PaymentAmountUpdateRequest $paymentAmountUpdateRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Checkout\PaymentAmountUpdateResponse + * @throws AdyenException + */ + public function updateAuthorisedAmount(string $paymentPspReference, \Adyen\Model\Checkout\PaymentAmountUpdateRequest $paymentAmountUpdateRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentAmountUpdateResponse + { + $endpoint = $this->baseURL . str_replace(['{paymentPspReference}'], [$paymentPspReference], "/payments/{paymentPspReference}/amountUpdates"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentAmountUpdateRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentAmountUpdateResponse::class); + } } diff --git a/src/Adyen/Service/Checkout/OrdersApi.php b/src/Adyen/Service/Checkout/OrdersApi.php index 718453537..fe4513ce3 100644 --- a/src/Adyen/Service/Checkout/OrdersApi.php +++ b/src/Adyen/Service/Checkout/OrdersApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,21 +39,6 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } - /** - * Create an order - * - * @param \Adyen\Model\Checkout\CreateOrderRequest $createOrderRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Checkout\CreateOrderResponse - * @throws AdyenException - */ - public function orders(\Adyen\Model\Checkout\CreateOrderRequest $createOrderRequest, array $requestOptions = null): \Adyen\Model\Checkout\CreateOrderResponse - { - $endpoint = $this->baseURL . "/orders"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createOrderRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\CreateOrderResponse::class); - } - /** * Cancel an order * @@ -83,4 +68,19 @@ public function getBalanceOfGiftCard(\Adyen\Model\Checkout\BalanceCheckRequest $ $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $balanceCheckRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\BalanceCheckResponse::class); } + + /** + * Create an order + * + * @param \Adyen\Model\Checkout\CreateOrderRequest $createOrderRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Checkout\CreateOrderResponse + * @throws AdyenException + */ + public function orders(\Adyen\Model\Checkout\CreateOrderRequest $createOrderRequest, array $requestOptions = null): \Adyen\Model\Checkout\CreateOrderResponse + { + $endpoint = $this->baseURL . "/orders"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createOrderRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\CreateOrderResponse::class); + } } diff --git a/src/Adyen/Service/Checkout/PaymentLinksApi.php b/src/Adyen/Service/Checkout/PaymentLinksApi.php index 195d7765f..0deba7e73 100644 --- a/src/Adyen/Service/Checkout/PaymentLinksApi.php +++ b/src/Adyen/Service/Checkout/PaymentLinksApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -55,33 +55,33 @@ public function getPaymentLink(string $linkId, array $requestOptions = null): \A } /** - * Update the status of a payment link + * Create a payment link * - * @param string $linkId - * @param \Adyen\Model\Checkout\UpdatePaymentLinkRequest $updatePaymentLinkRequest + * @param \Adyen\Model\Checkout\PaymentLinkRequest $paymentLinkRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\PaymentLinkResponse * @throws AdyenException */ - public function updatePaymentLink(string $linkId, \Adyen\Model\Checkout\UpdatePaymentLinkRequest $updatePaymentLinkRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentLinkResponse + public function paymentLinks(\Adyen\Model\Checkout\PaymentLinkRequest $paymentLinkRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentLinkResponse { - $endpoint = $this->baseURL . str_replace(['{linkId}'], [$linkId], "/paymentLinks/{linkId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updatePaymentLinkRequest->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . "/paymentLinks"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentLinkRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentLinkResponse::class); } /** - * Create a payment link + * Update the status of a payment link * - * @param \Adyen\Model\Checkout\PaymentLinkRequest $paymentLinkRequest + * @param string $linkId + * @param \Adyen\Model\Checkout\UpdatePaymentLinkRequest $updatePaymentLinkRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\PaymentLinkResponse * @throws AdyenException */ - public function paymentLinks(\Adyen\Model\Checkout\PaymentLinkRequest $paymentLinkRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentLinkResponse + public function updatePaymentLink(string $linkId, \Adyen\Model\Checkout\UpdatePaymentLinkRequest $updatePaymentLinkRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentLinkResponse { - $endpoint = $this->baseURL . "/paymentLinks"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentLinkRequest->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . str_replace(['{linkId}'], [$linkId], "/paymentLinks/{linkId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updatePaymentLinkRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentLinkResponse::class); } } diff --git a/src/Adyen/Service/Checkout/PaymentsApi.php b/src/Adyen/Service/Checkout/PaymentsApi.php index 262c05e8c..e620b5eac 100644 --- a/src/Adyen/Service/Checkout/PaymentsApi.php +++ b/src/Adyen/Service/Checkout/PaymentsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,21 +39,6 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } - /** - * 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 * @@ -84,6 +69,21 @@ public function donations(\Adyen\Model\Checkout\DonationPaymentRequest $donation return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\DonationPaymentResponse::class); } + /** + * 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 a list of available payment methods * diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 58ef0e9df..0486c983d 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index c467b1b20..6bef73138 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/DataProtection/GeneralApi.php b/src/Adyen/Service/DataProtection/GeneralApi.php new file mode 100644 index 000000000..65f2c54c9 --- /dev/null +++ b/src/Adyen/Service/DataProtection/GeneralApi.php @@ -0,0 +1,56 @@ +baseURL = $this->createBaseUrl("https://ca-test.adyen.com/ca/services/DataProtectionService/v1"); + } + + /** + * Submit a Subject Erasure Request. + * + * @param \Adyen\Model\DataProtection\SubjectErasureByPspReferenceRequest $subjectErasureByPspReferenceRequest + * @param array|null $requestOptions + * @return \Adyen\Model\DataProtection\SubjectErasureResponse + * @throws AdyenException + */ + public function requestSubjectErasure(\Adyen\Model\DataProtection\SubjectErasureByPspReferenceRequest $subjectErasureByPspReferenceRequest, array $requestOptions = null): \Adyen\Model\DataProtection\SubjectErasureResponse + { + $endpoint = $this->baseURL . "/requestSubjectErasure"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $subjectErasureByPspReferenceRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\DataProtection\SubjectErasureResponse::class); + } +} diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index fac04a46e..2551bbc54 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,18 +39,34 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://kyc-test.adyen.com/lem/v3"); } + /** + * Create a business line + * + * @param \Adyen\Model\LegalEntityManagement\BusinessLineInfo $businessLineInfo + * @param array|null $requestOptions + * @return \Adyen\Model\LegalEntityManagement\BusinessLine + * @throws AdyenException + */ + public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLineInfo $businessLineInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\BusinessLine + { + $endpoint = $this->baseURL . "/businessLines"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $businessLineInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\BusinessLine::class); + } + /** * Delete a business line * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -83,19 +99,4 @@ public function updateBusinessLine(string $id, \Adyen\Model\LegalEntityManagemen $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $businessLineInfoUpdate->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\BusinessLine::class); } - - /** - * Create a business line - * - * @param \Adyen\Model\LegalEntityManagement\BusinessLineInfo $businessLineInfo - * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\BusinessLine - * @throws AdyenException - */ - public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLineInfo $businessLineInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\BusinessLine - { - $endpoint = $this->baseURL . "/businessLines"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $businessLineInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\BusinessLine::class); - } } diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index 30c191e2f..ef76b3ad3 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/HostedOnboardingApi.php b/src/Adyen/Service/LegalEntityManagement/HostedOnboardingApi.php index fc15d4156..49b1eace5 100644 --- a/src/Adyen/Service/LegalEntityManagement/HostedOnboardingApi.php +++ b/src/Adyen/Service/LegalEntityManagement/HostedOnboardingApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,17 +40,19 @@ public function __construct(Client $client) } /** - * Get a list of hosted onboarding page themes + * Get a link to an Adyen-hosted onboarding page * + * @param string $id + * @param \Adyen\Model\LegalEntityManagement\OnboardingLinkInfo $onboardingLinkInfo * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\OnboardingThemes + * @return \Adyen\Model\LegalEntityManagement\OnboardingLink * @throws AdyenException */ - public function listHostedOnboardingPageThemes(array $requestOptions = null): \Adyen\Model\LegalEntityManagement\OnboardingThemes + public function getLinkToAdyenhostedOnboardingPage(string $id, \Adyen\Model\LegalEntityManagement\OnboardingLinkInfo $onboardingLinkInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\OnboardingLink { - $endpoint = $this->baseURL . "/themes"; - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\OnboardingThemes::class); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/onboardingLinks"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $onboardingLinkInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\OnboardingLink::class); } /** @@ -69,18 +71,16 @@ public function getOnboardingLinkTheme(string $id, array $requestOptions = null) } /** - * Get a link to an Adyen-hosted onboarding page + * Get a list of hosted onboarding page themes * - * @param string $id - * @param \Adyen\Model\LegalEntityManagement\OnboardingLinkInfo $onboardingLinkInfo * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\OnboardingLink + * @return \Adyen\Model\LegalEntityManagement\OnboardingThemes * @throws AdyenException */ - public function getLinkToAdyenhostedOnboardingPage(string $id, \Adyen\Model\LegalEntityManagement\OnboardingLinkInfo $onboardingLinkInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\OnboardingLink + public function listHostedOnboardingPageThemes(array $requestOptions = null): \Adyen\Model\LegalEntityManagement\OnboardingThemes { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/onboardingLinks"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $onboardingLinkInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\OnboardingLink::class); + $endpoint = $this->baseURL . "/themes"; + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\OnboardingThemes::class); } } diff --git a/src/Adyen/Service/LegalEntityManagement/LegalEntitiesApi.php b/src/Adyen/Service/LegalEntityManagement/LegalEntitiesApi.php index 2d7815396..6a27b7ab8 100644 --- a/src/Adyen/Service/LegalEntityManagement/LegalEntitiesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/LegalEntitiesApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,17 +40,47 @@ public function __construct(Client $client) } /** - * Get a legal entity + * Check a legal entity's verification errors * * @param string $id * @param array|null $requestOptions + * @return \Adyen\Model\LegalEntityManagement\VerificationErrors + * @throws AdyenException + */ + public function checkLegalEntitysVerificationErrors(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\VerificationErrors + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/checkVerificationErrors"); + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\VerificationErrors::class); + } + + /** + * Confirm data review + * + * @param string $id + * @param array|null $requestOptions + * @return \Adyen\Model\LegalEntityManagement\DataReviewConfirmationResponse + * @throws AdyenException + */ + public function confirmDataReview(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\DataReviewConfirmationResponse + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/confirmDataReview"); + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\DataReviewConfirmationResponse::class); + } + + /** + * Create a legal entity + * + * @param \Adyen\Model\LegalEntityManagement\LegalEntityInfoRequiredType $legalEntityInfoRequiredType + * @param array|null $requestOptions * @return \Adyen\Model\LegalEntityManagement\LegalEntity * @throws AdyenException */ - public function getLegalEntity(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\LegalEntity + public function createLegalEntity(\Adyen\Model\LegalEntityManagement\LegalEntityInfoRequiredType $legalEntityInfoRequiredType, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\LegalEntity { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + $endpoint = $this->baseURL . "/legalEntities"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $legalEntityInfoRequiredType->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\LegalEntity::class); } @@ -70,48 +100,33 @@ public function getAllBusinessLinesUnderLegalEntity(string $id, array $requestOp } /** - * Update a legal entity + * Get a legal entity * * @param string $id - * @param \Adyen\Model\LegalEntityManagement\LegalEntityInfo $legalEntityInfo * @param array|null $requestOptions * @return \Adyen\Model\LegalEntityManagement\LegalEntity * @throws AdyenException */ - public function updateLegalEntity(string $id, \Adyen\Model\LegalEntityManagement\LegalEntityInfo $legalEntityInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\LegalEntity + public function getLegalEntity(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\LegalEntity { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $legalEntityInfo->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\LegalEntity::class); } /** - * Create a legal entity + * Update a legal entity * - * @param \Adyen\Model\LegalEntityManagement\LegalEntityInfoRequiredType $legalEntityInfoRequiredType + * @param string $id + * @param \Adyen\Model\LegalEntityManagement\LegalEntityInfo $legalEntityInfo * @param array|null $requestOptions * @return \Adyen\Model\LegalEntityManagement\LegalEntity * @throws AdyenException */ - public function createLegalEntity(\Adyen\Model\LegalEntityManagement\LegalEntityInfoRequiredType $legalEntityInfoRequiredType, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\LegalEntity + public function updateLegalEntity(string $id, \Adyen\Model\LegalEntityManagement\LegalEntityInfo $legalEntityInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\LegalEntity { - $endpoint = $this->baseURL . "/legalEntities"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $legalEntityInfoRequiredType->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $legalEntityInfo->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\LegalEntity::class); } - - /** - * Check a legal entity's verification errors - * - * @param string $id - * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\VerificationErrors - * @throws AdyenException - */ - public function checkLegalEntitysVerificationErrors(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\VerificationErrors - { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/checkVerificationErrors"); - $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\VerificationErrors::class); - } } diff --git a/src/Adyen/Service/LegalEntityManagement/PCIQuestionnairesApi.php b/src/Adyen/Service/LegalEntityManagement/PCIQuestionnairesApi.php index 7b87bfb56..4aa7683c8 100644 --- a/src/Adyen/Service/LegalEntityManagement/PCIQuestionnairesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/PCIQuestionnairesApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,18 +40,19 @@ public function __construct(Client $client) } /** - * Get PCI questionnaire details + * Generate PCI questionnaire * * @param string $id + * @param \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionRequest $generatePciDescriptionRequest * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\GetPciQuestionnaireInfosResponse + * @return \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionResponse * @throws AdyenException */ - public function getPciQuestionnaireDetails(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GetPciQuestionnaireInfosResponse + public function generatePciQuestionnaire(string $id, \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionRequest $generatePciDescriptionRequest, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/pciQuestionnaires"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetPciQuestionnaireInfosResponse::class); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/pciQuestionnaires/generatePciTemplates"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $generatePciDescriptionRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionResponse::class); } /** @@ -71,19 +72,18 @@ public function getPciQuestionnaire(string $id, string $pciid, array $requestOpt } /** - * Generate PCI questionnaire + * Get PCI questionnaire details * * @param string $id - * @param \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionRequest $generatePciDescriptionRequest * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionResponse + * @return \Adyen\Model\LegalEntityManagement\GetPciQuestionnaireInfosResponse * @throws AdyenException */ - public function generatePciQuestionnaire(string $id, \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionRequest $generatePciDescriptionRequest, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionResponse + public function getPciQuestionnaireDetails(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GetPciQuestionnaireInfosResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/pciQuestionnaires/generatePciTemplates"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $generatePciDescriptionRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GeneratePciDescriptionResponse::class); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/pciQuestionnaires"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetPciQuestionnaireInfosResponse::class); } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php b/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php index 3728a1886..4db8819b7 100644 --- a/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TermsOfServiceApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,65 +40,65 @@ public function __construct(Client $client) } /** - * Get Terms of Service information for a legal entity + * Accept Terms of Service * * @param string $id + * @param string $termsofservicedocumentid + * @param \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceRequest $acceptTermsOfServiceRequest * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse + * @return \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceResponse * @throws AdyenException */ - public function getTermsOfServiceInformationForLegalEntity(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse + public function acceptTermsOfService(string $id, string $termsofservicedocumentid, \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceRequest $acceptTermsOfServiceRequest, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/termsOfServiceAcceptanceInfos"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse::class); + $endpoint = $this->baseURL . str_replace(['{id}', '{termsofservicedocumentid}'], [$id, $termsofservicedocumentid], "/legalEntities/{id}/termsOfService/{termsofservicedocumentid}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $acceptTermsOfServiceRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceResponse::class); } /** - * Get Terms of Service status + * Get Terms of Service document * * @param string $id + * @param \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentRequest $getTermsOfServiceDocumentRequest * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse + * @return \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentResponse * @throws AdyenException */ - public function getTermsOfServiceStatus(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse + public function getTermsOfServiceDocument(string $id, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentRequest $getTermsOfServiceDocumentRequest, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentResponse { - $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); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/termsOfService"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getTermsOfServiceDocumentRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentResponse::class); } /** - * Accept Terms of Service + * Get Terms of Service information for a legal entity * * @param string $id - * @param string $termsofservicedocumentid - * @param \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceRequest $acceptTermsOfServiceRequest * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceResponse + * @return \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse * @throws AdyenException */ - public function acceptTermsOfService(string $id, string $termsofservicedocumentid, \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceRequest $acceptTermsOfServiceRequest, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceResponse + public function getTermsOfServiceInformationForLegalEntity(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse { - $endpoint = $this->baseURL . str_replace(['{id}', '{termsofservicedocumentid}'], [$id, $termsofservicedocumentid], "/legalEntities/{id}/termsOfService/{termsofservicedocumentid}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $acceptTermsOfServiceRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\AcceptTermsOfServiceResponse::class); + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/termsOfServiceAcceptanceInfos"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceAcceptanceInfosResponse::class); } /** - * Get Terms of Service document + * Get Terms of Service status * * @param string $id - * @param \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentRequest $getTermsOfServiceDocumentRequest * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentResponse + * @return \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse * @throws AdyenException */ - public function getTermsOfServiceDocument(string $id, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentRequest $getTermsOfServiceDocumentRequest, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentResponse + public function getTermsOfServiceStatus(string $id, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\CalculateTermsOfServiceStatusResponse { - $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/termsOfService"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getTermsOfServiceDocumentRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\GetTermsOfServiceDocumentResponse::class); + $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); } } diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 03323428e..3bf8aeaa4 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,18 +39,34 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://kyc-test.adyen.com/lem/v3"); } + /** + * Create a transfer instrument + * + * @param \Adyen\Model\LegalEntityManagement\TransferInstrumentInfo $transferInstrumentInfo + * @param array|null $requestOptions + * @return \Adyen\Model\LegalEntityManagement\TransferInstrument + * @throws AdyenException + */ + public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\TransferInstrumentInfo $transferInstrumentInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\TransferInstrument + { + $endpoint = $this->baseURL . "/transferInstruments"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transferInstrumentInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\TransferInstrument::class); + } + /** * Delete a transfer instrument * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -83,19 +99,4 @@ public function updateTransferInstrument(string $id, \Adyen\Model\LegalEntityMan $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $transferInstrumentInfo->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\TransferInstrument::class); } - - /** - * Create a transfer instrument - * - * @param \Adyen\Model\LegalEntityManagement\TransferInstrumentInfo $transferInstrumentInfo - * @param array|null $requestOptions - * @return \Adyen\Model\LegalEntityManagement\TransferInstrument - * @throws AdyenException - */ - public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\TransferInstrumentInfo $transferInstrumentInfo, array $requestOptions = null): \Adyen\Model\LegalEntityManagement\TransferInstrument - { - $endpoint = $this->baseURL . "/transferInstruments"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transferInstrumentInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\TransferInstrument::class); - } } diff --git a/src/Adyen/Service/Management/APICredentialsCompanyLevelApi.php b/src/Adyen/Service/Management/APICredentialsCompanyLevelApi.php index 9c11429ad..763e340b6 100644 --- a/src/Adyen/Service/Management/APICredentialsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/APICredentialsCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,18 +40,19 @@ public function __construct(Client $client) } /** - * Get a list of API credentials + * Create an API credential. * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] - * @return \Adyen\Model\Management\ListCompanyApiCredentialsResponse + * @param \Adyen\Model\Management\CreateCompanyApiCredentialRequest $createCompanyApiCredentialRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\CreateCompanyApiCredentialResponse * @throws AdyenException */ - public function listApiCredentials(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListCompanyApiCredentialsResponse + public function createApiCredential(string $companyId, \Adyen\Model\Management\CreateCompanyApiCredentialRequest $createCompanyApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\CreateCompanyApiCredentialResponse { $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/apiCredentials"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListCompanyApiCredentialsResponse::class); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createCompanyApiCredentialRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateCompanyApiCredentialResponse::class); } /** @@ -71,35 +72,34 @@ public function getApiCredential(string $companyId, string $apiCredentialId, arr } /** - * Update an API credential. + * Get a list of API credentials * * @param string $companyId - * @param string $apiCredentialId - * @param \Adyen\Model\Management\UpdateCompanyApiCredentialRequest $updateCompanyApiCredentialRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\CompanyApiCredential + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @return \Adyen\Model\Management\ListCompanyApiCredentialsResponse * @throws AdyenException */ - public function updateApiCredential(string $companyId, string $apiCredentialId, \Adyen\Model\Management\UpdateCompanyApiCredentialRequest $updateCompanyApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\CompanyApiCredential + public function listApiCredentials(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListCompanyApiCredentialsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}'], [$companyId, $apiCredentialId], "/companies/{companyId}/apiCredentials/{apiCredentialId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateCompanyApiCredentialRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CompanyApiCredential::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/apiCredentials"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListCompanyApiCredentialsResponse::class); } /** - * Create an API credential. + * Update an API credential. * * @param string $companyId - * @param \Adyen\Model\Management\CreateCompanyApiCredentialRequest $createCompanyApiCredentialRequest + * @param string $apiCredentialId + * @param \Adyen\Model\Management\UpdateCompanyApiCredentialRequest $updateCompanyApiCredentialRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\CreateCompanyApiCredentialResponse + * @return \Adyen\Model\Management\CompanyApiCredential * @throws AdyenException */ - public function createApiCredential(string $companyId, \Adyen\Model\Management\CreateCompanyApiCredentialRequest $createCompanyApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\CreateCompanyApiCredentialResponse + public function updateApiCredential(string $companyId, string $apiCredentialId, \Adyen\Model\Management\UpdateCompanyApiCredentialRequest $updateCompanyApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\CompanyApiCredential { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/apiCredentials"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createCompanyApiCredentialRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateCompanyApiCredentialResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}'], [$companyId, $apiCredentialId], "/companies/{companyId}/apiCredentials/{apiCredentialId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateCompanyApiCredentialRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CompanyApiCredential::class); } } diff --git a/src/Adyen/Service/Management/APICredentialsMerchantLevelApi.php b/src/Adyen/Service/Management/APICredentialsMerchantLevelApi.php index 24080d8c0..a8b842fba 100644 --- a/src/Adyen/Service/Management/APICredentialsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/APICredentialsMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,18 +40,19 @@ public function __construct(Client $client) } /** - * Get a list of API credentials + * Create an API credential * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] - * @return \Adyen\Model\Management\ListMerchantApiCredentialsResponse + * @param \Adyen\Model\Management\CreateMerchantApiCredentialRequest $createMerchantApiCredentialRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\CreateApiCredentialResponse * @throws AdyenException */ - public function listApiCredentials(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListMerchantApiCredentialsResponse + public function createApiCredential(string $merchantId, \Adyen\Model\Management\CreateMerchantApiCredentialRequest $createMerchantApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\CreateApiCredentialResponse { $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/apiCredentials"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListMerchantApiCredentialsResponse::class); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createMerchantApiCredentialRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateApiCredentialResponse::class); } /** @@ -71,35 +72,34 @@ public function getApiCredential(string $merchantId, string $apiCredentialId, ar } /** - * Update an API credential + * Get a list of API credentials * * @param string $merchantId - * @param string $apiCredentialId - * @param \Adyen\Model\Management\UpdateMerchantApiCredentialRequest $updateMerchantApiCredentialRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\ApiCredential + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @return \Adyen\Model\Management\ListMerchantApiCredentialsResponse * @throws AdyenException */ - public function updateApiCredential(string $merchantId, string $apiCredentialId, \Adyen\Model\Management\UpdateMerchantApiCredentialRequest $updateMerchantApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\ApiCredential + public function listApiCredentials(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListMerchantApiCredentialsResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}'], [$merchantId, $apiCredentialId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateMerchantApiCredentialRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ApiCredential::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/apiCredentials"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListMerchantApiCredentialsResponse::class); } /** - * Create an API credential + * Update an API credential * * @param string $merchantId - * @param \Adyen\Model\Management\CreateMerchantApiCredentialRequest $createMerchantApiCredentialRequest + * @param string $apiCredentialId + * @param \Adyen\Model\Management\UpdateMerchantApiCredentialRequest $updateMerchantApiCredentialRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\CreateApiCredentialResponse + * @return \Adyen\Model\Management\ApiCredential * @throws AdyenException */ - public function createApiCredential(string $merchantId, \Adyen\Model\Management\CreateMerchantApiCredentialRequest $createMerchantApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\CreateApiCredentialResponse + public function updateApiCredential(string $merchantId, string $apiCredentialId, \Adyen\Model\Management\UpdateMerchantApiCredentialRequest $updateMerchantApiCredentialRequest, array $requestOptions = null): \Adyen\Model\Management\ApiCredential { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/apiCredentials"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createMerchantApiCredentialRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateApiCredentialResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}'], [$merchantId, $apiCredentialId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateMerchantApiCredentialRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ApiCredential::class); } } diff --git a/src/Adyen/Service/Management/APIKeyCompanyLevelApi.php b/src/Adyen/Service/Management/APIKeyCompanyLevelApi.php index 71d5ed3a0..5c987b29f 100644 --- a/src/Adyen/Service/Management/APIKeyCompanyLevelApi.php +++ b/src/Adyen/Service/Management/APIKeyCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/APIKeyMerchantLevelApi.php b/src/Adyen/Service/Management/APIKeyMerchantLevelApi.php index 38e140ef3..20cdd603f 100644 --- a/src/Adyen/Service/Management/APIKeyMerchantLevelApi.php +++ b/src/Adyen/Service/Management/APIKeyMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/AccountCompanyLevelApi.php b/src/Adyen/Service/Management/AccountCompanyLevelApi.php index f29477b20..1dae51330 100644 --- a/src/Adyen/Service/Management/AccountCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AccountCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,32 +40,32 @@ public function __construct(Client $client) } /** - * Get a list of company accounts + * Get a company account * - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] - * @return \Adyen\Model\Management\ListCompanyResponse + * @param string $companyId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\Company * @throws AdyenException */ - public function listCompanyAccounts(array $requestOptions = null): \Adyen\Model\Management\ListCompanyResponse + public function getCompanyAccount(string $companyId, array $requestOptions = null): \Adyen\Model\Management\Company { - $endpoint = $this->baseURL . "/companies"; + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListCompanyResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Company::class); } /** - * Get a company account + * Get a list of company accounts * - * @param string $companyId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\Company + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @return \Adyen\Model\Management\ListCompanyResponse * @throws AdyenException */ - public function getCompanyAccount(string $companyId, array $requestOptions = null): \Adyen\Model\Management\Company + public function listCompanyAccounts(array $requestOptions = null): \Adyen\Model\Management\ListCompanyResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}"); + $endpoint = $this->baseURL . "/companies"; $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Company::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListCompanyResponse::class); } /** diff --git a/src/Adyen/Service/Management/AccountMerchantLevelApi.php b/src/Adyen/Service/Management/AccountMerchantLevelApi.php index 7d95763ec..7a33eed88 100644 --- a/src/Adyen/Service/Management/AccountMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AccountMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,17 +40,18 @@ public function __construct(Client $client) } /** - * Get a list of merchant accounts + * Create a merchant account * - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] - * @return \Adyen\Model\Management\ListMerchantResponse + * @param \Adyen\Model\Management\CreateMerchantRequest $createMerchantRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\CreateMerchantResponse * @throws AdyenException */ - public function listMerchantAccounts(array $requestOptions = null): \Adyen\Model\Management\ListMerchantResponse + public function createMerchantAccount(\Adyen\Model\Management\CreateMerchantRequest $createMerchantRequest, array $requestOptions = null): \Adyen\Model\Management\CreateMerchantResponse { $endpoint = $this->baseURL . "/merchants"; - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListMerchantResponse::class); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createMerchantRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateMerchantResponse::class); } /** @@ -69,18 +70,17 @@ public function getMerchantAccount(string $merchantId, array $requestOptions = n } /** - * Create a merchant account + * Get a list of merchant accounts * - * @param \Adyen\Model\Management\CreateMerchantRequest $createMerchantRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\CreateMerchantResponse + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @return \Adyen\Model\Management\ListMerchantResponse * @throws AdyenException */ - public function createMerchantAccount(\Adyen\Model\Management\CreateMerchantRequest $createMerchantRequest, array $requestOptions = null): \Adyen\Model\Management\CreateMerchantResponse + public function listMerchantAccounts(array $requestOptions = null): \Adyen\Model\Management\ListMerchantResponse { $endpoint = $this->baseURL . "/merchants"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createMerchantRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateMerchantResponse::class); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListMerchantResponse::class); } /** diff --git a/src/Adyen/Service/Management/AccountStoreLevelApi.php b/src/Adyen/Service/Management/AccountStoreLevelApi.php index ecb98213f..d845e9ee1 100644 --- a/src/Adyen/Service/Management/AccountStoreLevelApi.php +++ b/src/Adyen/Service/Management/AccountStoreLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,18 +40,34 @@ public function __construct(Client $client) } /** - * Get a list of stores + * Create a store + * + * @param \Adyen\Model\Management\StoreCreationWithMerchantCodeRequest $storeCreationWithMerchantCodeRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\Store + * @throws AdyenException + */ + public function createStore(\Adyen\Model\Management\StoreCreationWithMerchantCodeRequest $storeCreationWithMerchantCodeRequest, array $requestOptions = null): \Adyen\Model\Management\Store + { + $endpoint = $this->baseURL . "/stores"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storeCreationWithMerchantCodeRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); + } + + /** + * Create a store * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'reference'=> string]] - * @return \Adyen\Model\Management\ListStoresResponse + * @param \Adyen\Model\Management\StoreCreationRequest $storeCreationRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\Store * @throws AdyenException */ - public function listStoresByMerchantId(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListStoresResponse + public function createStoreByMerchantId(string $merchantId, \Adyen\Model\Management\StoreCreationRequest $storeCreationRequest, array $requestOptions = null): \Adyen\Model\Management\Store { $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/stores"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListStoresResponse::class); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storeCreationRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); } /** @@ -70,6 +86,21 @@ public function getStore(string $merchantId, string $storeId, array $requestOpti return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); } + /** + * Get a store + * + * @param string $storeId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\Store + * @throws AdyenException + */ + public function getStoreById(string $storeId, array $requestOptions = null): \Adyen\Model\Management\Store + { + $endpoint = $this->baseURL . str_replace(['{storeId}'], [$storeId], "/stores/{storeId}"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); + } + /** * Get a list of stores * @@ -85,18 +116,18 @@ public function listStores(array $requestOptions = null): \Adyen\Model\Managemen } /** - * Get a store + * Get a list of stores * - * @param string $storeId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\Store + * @param string $merchantId + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'reference'=> string]] + * @return \Adyen\Model\Management\ListStoresResponse * @throws AdyenException */ - public function getStoreById(string $storeId, array $requestOptions = null): \Adyen\Model\Management\Store + public function listStoresByMerchantId(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListStoresResponse { - $endpoint = $this->baseURL . str_replace(['{storeId}'], [$storeId], "/stores/{storeId}"); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/stores"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListStoresResponse::class); } /** @@ -131,35 +162,4 @@ public function updateStoreById(string $storeId, \Adyen\Model\Management\UpdateS $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateStoreRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); } - - /** - * Create a store - * - * @param string $merchantId - * @param \Adyen\Model\Management\StoreCreationRequest $storeCreationRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\Store - * @throws AdyenException - */ - public function createStoreByMerchantId(string $merchantId, \Adyen\Model\Management\StoreCreationRequest $storeCreationRequest, array $requestOptions = null): \Adyen\Model\Management\Store - { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/stores"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storeCreationRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); - } - - /** - * Create a store - * - * @param \Adyen\Model\Management\StoreCreationWithMerchantCodeRequest $storeCreationWithMerchantCodeRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\Store - * @throws AdyenException - */ - public function createStore(\Adyen\Model\Management\StoreCreationWithMerchantCodeRequest $storeCreationWithMerchantCodeRequest, array $requestOptions = null): \Adyen\Model\Management\Store - { - $endpoint = $this->baseURL . "/stores"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storeCreationWithMerchantCodeRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Store::class); - } } diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index ffff7949d..2be1d91c0 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,35 +40,37 @@ public function __construct(Client $client) } /** - * Delete an allowed origin + * Create an allowed origin * * @param string $companyId * @param string $apiCredentialId - * @param string $originId + * @param \Adyen\Model\Management\AllowedOrigin $allowedOrigin * @param array|null $requestOptions - + * @return \Adyen\Model\Management\AllowedOriginsResponse * @throws AdyenException */ - public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) + public function createAllowedOrigin(string $companyId, string $apiCredentialId, \Adyen\Model\Management\AllowedOrigin $allowedOrigin, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}'], [$companyId, $apiCredentialId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $allowedOrigin->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); } /** - * Get a list of allowed origins + * Delete an allowed origin * * @param string $companyId * @param string $apiCredentialId + * @param string $originId * @param array|null $requestOptions - * @return \Adyen\Model\Management\AllowedOriginsResponse + * @throws AdyenException */ - public function listAllowedOrigins(string $companyId, string $apiCredentialId, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse + public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}'], [$companyId, $apiCredentialId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -89,19 +91,18 @@ public function getAllowedOrigin(string $companyId, string $apiCredentialId, str } /** - * Create an allowed origin + * Get a list of allowed origins * * @param string $companyId * @param string $apiCredentialId - * @param \Adyen\Model\Management\AllowedOrigin $allowedOrigin * @param array|null $requestOptions * @return \Adyen\Model\Management\AllowedOriginsResponse * @throws AdyenException */ - public function createAllowedOrigin(string $companyId, string $apiCredentialId, \Adyen\Model\Management\AllowedOrigin $allowedOrigin, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse + public function listAllowedOrigins(string $companyId, string $apiCredentialId, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}'], [$companyId, $apiCredentialId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $allowedOrigin->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); } } diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index 6a31a0958..02afdeebe 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,35 +40,37 @@ public function __construct(Client $client) } /** - * Delete an allowed origin + * Create an allowed origin * * @param string $merchantId * @param string $apiCredentialId - * @param string $originId + * @param \Adyen\Model\Management\AllowedOrigin $allowedOrigin * @param array|null $requestOptions - + * @return \Adyen\Model\Management\AllowedOriginsResponse * @throws AdyenException */ - public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) + public function createAllowedOrigin(string $merchantId, string $apiCredentialId, \Adyen\Model\Management\AllowedOrigin $allowedOrigin, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}'], [$merchantId, $apiCredentialId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $allowedOrigin->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); } /** - * Get a list of allowed origins + * Delete an allowed origin * * @param string $merchantId * @param string $apiCredentialId + * @param string $originId * @param array|null $requestOptions - * @return \Adyen\Model\Management\AllowedOriginsResponse + * @throws AdyenException */ - public function listAllowedOrigins(string $merchantId, string $apiCredentialId, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse + public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}'], [$merchantId, $apiCredentialId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -89,19 +91,18 @@ public function getAllowedOrigin(string $merchantId, string $apiCredentialId, st } /** - * Create an allowed origin + * Get a list of allowed origins * * @param string $merchantId * @param string $apiCredentialId - * @param \Adyen\Model\Management\AllowedOrigin $allowedOrigin * @param array|null $requestOptions * @return \Adyen\Model\Management\AllowedOriginsResponse * @throws AdyenException */ - public function createAllowedOrigin(string $merchantId, string $apiCredentialId, \Adyen\Model\Management\AllowedOrigin $allowedOrigin, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse + public function listAllowedOrigins(string $merchantId, string $apiCredentialId, array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}'], [$merchantId, $apiCredentialId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $allowedOrigin->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); } } diff --git a/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php b/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php index 4ccda5dfd..15929e6cf 100644 --- a/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,34 +40,34 @@ public function __construct(Client $client) } /** - * Get a list of Android apps + * Get Android app * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'packageName'=> string, 'versionCode'=> int]] - * @return \Adyen\Model\Management\AndroidAppsResponse + * @param string $id + * @param array|null $requestOptions + * @return \Adyen\Model\Management\AndroidApp * @throws AdyenException */ - public function listAndroidApps(string $companyId, array $requestOptions = null): \Adyen\Model\Management\AndroidAppsResponse + public function getAndroidApp(string $companyId, string $id, array $requestOptions = null): \Adyen\Model\Management\AndroidApp { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidApps"); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{id}'], [$companyId, $id], "/companies/{companyId}/androidApps/{id}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidAppsResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidApp::class); } /** - * Get Android app + * Get a list of Android apps * * @param string $companyId - * @param string $id - * @param array|null $requestOptions - * @return \Adyen\Model\Management\AndroidApp + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'packageName'=> string, 'versionCode'=> int]] + * @return \Adyen\Model\Management\AndroidAppsResponse * @throws AdyenException */ - public function getAndroidApp(string $companyId, string $id, array $requestOptions = null): \Adyen\Model\Management\AndroidApp + public function listAndroidApps(string $companyId, array $requestOptions = null): \Adyen\Model\Management\AndroidAppsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{id}'], [$companyId, $id], "/companies/{companyId}/androidApps/{id}"); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidApps"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidApp::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidAppsResponse::class); } /** @@ -90,12 +90,13 @@ public function listAndroidCertificates(string $companyId, array $requestOptions * * @param string $companyId * @param array|null $requestOptions - + * @throws AdyenException */ public function uploadAndroidApp(string $companyId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidApps"); $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/ClientKeyCompanyLevelApi.php b/src/Adyen/Service/Management/ClientKeyCompanyLevelApi.php index bbf996c68..57dab370c 100644 --- a/src/Adyen/Service/Management/ClientKeyCompanyLevelApi.php +++ b/src/Adyen/Service/Management/ClientKeyCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/ClientKeyMerchantLevelApi.php b/src/Adyen/Service/Management/ClientKeyMerchantLevelApi.php index a2556d984..4b7df1280 100644 --- a/src/Adyen/Service/Management/ClientKeyMerchantLevelApi.php +++ b/src/Adyen/Service/Management/ClientKeyMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index f6c93f4f5..65cdadc59 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,88 +40,89 @@ public function __construct(Client $client) } /** - * Remove allowed origin + * Add allowed origin * - * @param string $originId + * @param \Adyen\Model\Management\CreateAllowedOriginRequest $createAllowedOriginRequest * @param array|null $requestOptions - + * @return \Adyen\Model\Management\AllowedOrigin * @throws AdyenException */ - public function removeAllowedOrigin(string $originId, array $requestOptions = null) + public function addAllowedOrigin(\Adyen\Model\Management\CreateAllowedOriginRequest $createAllowedOriginRequest, array $requestOptions = null): \Adyen\Model\Management\AllowedOrigin { - $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $endpoint = $this->baseURL . "/me/allowedOrigins"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createAllowedOriginRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOrigin::class); } /** - * Get API credential details + * Generate a client key * * @param array|null $requestOptions - * @return \Adyen\Model\Management\MeApiCredential + * @return \Adyen\Model\Management\GenerateClientKeyResponse * @throws AdyenException */ - public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Model\Management\MeApiCredential + public function generateClientKey(array $requestOptions = null): \Adyen\Model\Management\GenerateClientKeyResponse { - $endpoint = $this->baseURL . "/me"; - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\MeApiCredential::class); + $endpoint = $this->baseURL . "/me/generateClientKey"; + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateClientKeyResponse::class); } /** - * Get allowed origins + * Get allowed origin details * + * @param string $originId * @param array|null $requestOptions - * @return \Adyen\Model\Management\AllowedOriginsResponse + * @return \Adyen\Model\Management\AllowedOrigin * @throws AdyenException */ - public function getAllowedOrigins(array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse + public function getAllowedOriginDetails(string $originId, array $requestOptions = null): \Adyen\Model\Management\AllowedOrigin { - $endpoint = $this->baseURL . "/me/allowedOrigins"; + $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOrigin::class); } /** - * Get allowed origin details + * Get allowed origins * - * @param string $originId * @param array|null $requestOptions - * @return \Adyen\Model\Management\AllowedOrigin + * @return \Adyen\Model\Management\AllowedOriginsResponse * @throws AdyenException */ - public function getAllowedOriginDetails(string $originId, array $requestOptions = null): \Adyen\Model\Management\AllowedOrigin + public function getAllowedOrigins(array $requestOptions = null): \Adyen\Model\Management\AllowedOriginsResponse { - $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); + $endpoint = $this->baseURL . "/me/allowedOrigins"; $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOrigin::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOriginsResponse::class); } /** - * Add allowed origin + * Get API credential details * - * @param \Adyen\Model\Management\CreateAllowedOriginRequest $createAllowedOriginRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\AllowedOrigin + * @return \Adyen\Model\Management\MeApiCredential * @throws AdyenException */ - public function addAllowedOrigin(\Adyen\Model\Management\CreateAllowedOriginRequest $createAllowedOriginRequest, array $requestOptions = null): \Adyen\Model\Management\AllowedOrigin + public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Model\Management\MeApiCredential { - $endpoint = $this->baseURL . "/me/allowedOrigins"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createAllowedOriginRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOrigin::class); + $endpoint = $this->baseURL . "/me"; + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\MeApiCredential::class); } /** - * Generate a client key + * Remove allowed origin * + * @param string $originId * @param array|null $requestOptions - * @return \Adyen\Model\Management\GenerateClientKeyResponse + * @throws AdyenException */ - public function generateClientKey(array $requestOptions = null): \Adyen\Model\Management\GenerateClientKeyResponse + public function removeAllowedOrigin(string $originId, array $requestOptions = null) { - $endpoint = $this->baseURL . "/me/generateClientKey"; - $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateClientKeyResponse::class); + $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index 96f1ccdc1..4f955b8ba 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,34 +40,35 @@ public function __construct(Client $client) } /** - * Get all payment methods + * Add an Apple Pay domain * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['storeId'=> string, 'businessLineId'=> string, 'pageSize'=> int, 'pageNumber'=> int]] - * @return \Adyen\Model\Management\PaymentMethodResponse + * @param string $paymentMethodId + * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo + * @param array|null $requestOptions + * @throws AdyenException */ - public function getAllPaymentMethods(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\PaymentMethodResponse + public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/paymentMethodSettings"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PaymentMethodResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); + $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + } /** - * Get payment method details + * Get all payment methods * * @param string $merchantId - * @param string $paymentMethodId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\PaymentMethod + * @param array|null $requestOptions ['queryParams' => ['storeId'=> string, 'businessLineId'=> string, 'pageSize'=> int, 'pageNumber'=> int]] + * @return \Adyen\Model\Management\PaymentMethodResponse * @throws AdyenException */ - public function getPaymentMethodDetails(string $merchantId, string $paymentMethodId, array $requestOptions = null): \Adyen\Model\Management\PaymentMethod + public function getAllPaymentMethods(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\PaymentMethodResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/paymentMethodSettings"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PaymentMethod::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PaymentMethodResponse::class); } /** @@ -87,19 +88,18 @@ public function getApplePayDomains(string $merchantId, string $paymentMethodId, } /** - * Update a payment method + * Get payment method details * * @param string $merchantId * @param string $paymentMethodId - * @param \Adyen\Model\Management\UpdatePaymentMethodInfo $updatePaymentMethodInfo * @param array|null $requestOptions * @return \Adyen\Model\Management\PaymentMethod * @throws AdyenException */ - public function updatePaymentMethod(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\UpdatePaymentMethodInfo $updatePaymentMethodInfo, array $requestOptions = null): \Adyen\Model\Management\PaymentMethod + public function getPaymentMethodDetails(string $merchantId, string $paymentMethodId, array $requestOptions = null): \Adyen\Model\Management\PaymentMethod { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updatePaymentMethodInfo->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PaymentMethod::class); } @@ -120,18 +120,19 @@ public function requestPaymentMethod(string $merchantId, \Adyen\Model\Management } /** - * Add an Apple Pay domain + * Update a payment method * * @param string $merchantId * @param string $paymentMethodId - * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo + * @param \Adyen\Model\Management\UpdatePaymentMethodInfo $updatePaymentMethodInfo * @param array|null $requestOptions - + * @return \Adyen\Model\Management\PaymentMethod * @throws AdyenException */ - public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) + public function updatePaymentMethod(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\UpdatePaymentMethodInfo $updatePaymentMethodInfo, array $requestOptions = null): \Adyen\Model\Management\PaymentMethod { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); - $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updatePaymentMethodInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PaymentMethod::class); } } diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index ef2926a03..499e78957 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,33 +40,35 @@ public function __construct(Client $client) } /** - * Delete a payout setting + * Add a payout setting * * @param string $merchantId - * @param string $payoutSettingsId + * @param \Adyen\Model\Management\PayoutSettingsRequest $payoutSettingsRequest * @param array|null $requestOptions - + * @return \Adyen\Model\Management\PayoutSettings * @throws AdyenException */ - public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) + public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\PayoutSettingsRequest $payoutSettingsRequest, array $requestOptions = null): \Adyen\Model\Management\PayoutSettings { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/payoutSettings"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $payoutSettingsRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PayoutSettings::class); } /** - * Get a list of payout settings + * Delete a payout setting * * @param string $merchantId + * @param string $payoutSettingsId * @param array|null $requestOptions - * @return \Adyen\Model\Management\PayoutSettingsResponse + * @throws AdyenException */ - public function listPayoutSettings(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\PayoutSettingsResponse + public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/payoutSettings"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PayoutSettingsResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -86,35 +88,34 @@ public function getPayoutSetting(string $merchantId, string $payoutSettingsId, a } /** - * Update a payout setting + * Get a list of payout settings * * @param string $merchantId - * @param string $payoutSettingsId - * @param \Adyen\Model\Management\UpdatePayoutSettingsRequest $updatePayoutSettingsRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\PayoutSettings + * @return \Adyen\Model\Management\PayoutSettingsResponse * @throws AdyenException */ - public function updatePayoutSetting(string $merchantId, string $payoutSettingsId, \Adyen\Model\Management\UpdatePayoutSettingsRequest $updatePayoutSettingsRequest, array $requestOptions = null): \Adyen\Model\Management\PayoutSettings + public function listPayoutSettings(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\PayoutSettingsResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updatePayoutSettingsRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PayoutSettings::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/payoutSettings"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PayoutSettingsResponse::class); } /** - * Add a payout setting + * Update a payout setting * * @param string $merchantId - * @param \Adyen\Model\Management\PayoutSettingsRequest $payoutSettingsRequest + * @param string $payoutSettingsId + * @param \Adyen\Model\Management\UpdatePayoutSettingsRequest $updatePayoutSettingsRequest * @param array|null $requestOptions * @return \Adyen\Model\Management\PayoutSettings * @throws AdyenException */ - public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\PayoutSettingsRequest $payoutSettingsRequest, array $requestOptions = null): \Adyen\Model\Management\PayoutSettings + public function updatePayoutSetting(string $merchantId, string $payoutSettingsId, \Adyen\Model\Management\UpdatePayoutSettingsRequest $updatePayoutSettingsRequest, array $requestOptions = null): \Adyen\Model\Management\PayoutSettings { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/payoutSettings"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $payoutSettingsRequest->jsonSerialize(), $requestOptions); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updatePayoutSettingsRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\PayoutSettings::class); } } diff --git a/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php b/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php index 763d28bde..6f9355462 100644 --- a/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php +++ b/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,153 +40,153 @@ public function __construct(Client $client) } /** - * Delete a split configuration + * 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 deleteSplitConfiguration(string $merchantId, string $splitConfigurationId, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + 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('DELETE'), null, $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $splitConfigurationRule->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); } /** - * Delete a split configuration rule + * Create a split configuration * * @param string $merchantId - * @param string $splitConfigurationId - * @param string $ruleId + * @param \Adyen\Model\Management\SplitConfiguration $splitConfiguration * @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 + public function createSplitConfiguration(string $merchantId, \Adyen\Model\Management\SplitConfiguration $splitConfiguration, 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); + $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); } /** - * Get a list of split configurations + * Delete a split configuration * * @param string $merchantId + * @param string $splitConfigurationId * @param array|null $requestOptions - * @return \Adyen\Model\Management\SplitConfigurationList + * @return \Adyen\Model\Management\SplitConfiguration * @throws AdyenException */ - public function listSplitConfigurations(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\SplitConfigurationList + public function deleteSplitConfiguration(string $merchantId, string $splitConfigurationId, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration { - $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); + $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); } /** - * Get a split configuration + * 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 getSplitConfiguration(string $merchantId, string $splitConfigurationId, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + public function deleteSplitConfigurationRule(string $merchantId, string $splitConfigurationId, string $ruleId, 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); + $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); } /** - * Update split configuration description + * Get a split configuration * * @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 + 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('PATCH'), (array) $updateSplitConfigurationRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\SplitConfiguration::class); } /** - * Update split conditions + * Get a list of split configurations * * @param string $merchantId - * @param string $splitConfigurationId - * @param string $ruleId - * @param \Adyen\Model\Management\UpdateSplitConfigurationRuleRequest $updateSplitConfigurationRuleRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\SplitConfiguration + * @return \Adyen\Model\Management\SplitConfigurationList * @throws AdyenException */ - public function updateSplitConditions(string $merchantId, string $splitConfigurationId, string $ruleId, \Adyen\Model\Management\UpdateSplitConfigurationRuleRequest $updateSplitConfigurationRuleRequest, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + public function listSplitConfigurations(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\SplitConfigurationList { - $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); + $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); } /** - * Update the split logic + * Update split conditions * * @param string $merchantId * @param string $splitConfigurationId * @param string $ruleId - * @param string $splitLogicId - * @param \Adyen\Model\Management\UpdateSplitConfigurationLogicRequest $updateSplitConfigurationLogicRequest + * @param \Adyen\Model\Management\UpdateSplitConfigurationRuleRequest $updateSplitConfigurationRuleRequest * @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 + 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}', '{splitLogicId}'], [$merchantId, $splitConfigurationId, $ruleId, $splitLogicId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateSplitConfigurationLogicRequest->jsonSerialize(), $requestOptions); + $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); } /** - * Create a split configuration + * Update split configuration description * * @param string $merchantId - * @param \Adyen\Model\Management\SplitConfiguration $splitConfiguration + * @param string $splitConfigurationId + * @param \Adyen\Model\Management\UpdateSplitConfigurationRequest $updateSplitConfigurationRequest * @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 + 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}'], [$merchantId], "/merchants/{merchantId}/splitConfigurations"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $splitConfiguration->jsonSerialize(), $requestOptions); + $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); } /** - * Create a rule + * Update the split logic * * @param string $merchantId * @param string $splitConfigurationId - * @param \Adyen\Model\Management\SplitConfigurationRule $splitConfigurationRule + * @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 createRule(string $merchantId, string $splitConfigurationId, \Adyen\Model\Management\SplitConfigurationRule $splitConfigurationRule, array $requestOptions = null): \Adyen\Model\Management\SplitConfiguration + 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}'], [$merchantId, $splitConfigurationId], "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $splitConfigurationRule->jsonSerialize(), $requestOptions); + $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); } } diff --git a/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php b/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php index 06e647c73..1d92adca3 100644 --- a/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,33 +40,33 @@ public function __construct(Client $client) } /** - * Get a list of terminal actions + * Get terminal action * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'status'=> string, 'type'=> string]] - * @return \Adyen\Model\Management\ListExternalTerminalActionsResponse + * @param string $actionId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\ExternalTerminalAction * @throws AdyenException */ - public function listTerminalActions(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListExternalTerminalActionsResponse + public function getTerminalAction(string $companyId, string $actionId, array $requestOptions = null): \Adyen\Model\Management\ExternalTerminalAction { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalActions"); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{actionId}'], [$companyId, $actionId], "/companies/{companyId}/terminalActions/{actionId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListExternalTerminalActionsResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ExternalTerminalAction::class); } /** - * Get terminal action + * Get a list of terminal actions * * @param string $companyId - * @param string $actionId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\ExternalTerminalAction + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'status'=> string, 'type'=> string]] + * @return \Adyen\Model\Management\ListExternalTerminalActionsResponse * @throws AdyenException */ - public function getTerminalAction(string $companyId, string $actionId, array $requestOptions = null): \Adyen\Model\Management\ExternalTerminalAction + public function listTerminalActions(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListExternalTerminalActionsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{actionId}'], [$companyId, $actionId], "/companies/{companyId}/terminalActions/{actionId}"); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalActions"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ExternalTerminalAction::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListExternalTerminalActionsResponse::class); } } diff --git a/src/Adyen/Service/Management/TerminalActionsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalActionsTerminalLevelApi.php index d9c0f16a8..7e3281cb1 100644 --- a/src/Adyen/Service/Management/TerminalActionsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalActionsTerminalLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/TerminalOrdersCompanyLevelApi.php b/src/Adyen/Service/Management/TerminalOrdersCompanyLevelApi.php index a5247d521..2906edbd0 100644 --- a/src/Adyen/Service/Management/TerminalOrdersCompanyLevelApi.php +++ b/src/Adyen/Service/Management/TerminalOrdersCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,158 +40,158 @@ public function __construct(Client $client) } /** - * Get a list of billing entities + * Cancel an order * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['name'=> string]] - * @return \Adyen\Model\Management\BillingEntitiesResponse + * @param string $orderId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function listBillingEntities(string $companyId, array $requestOptions = null): \Adyen\Model\Management\BillingEntitiesResponse + public function cancelOrder(string $companyId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/billingEntities"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\BillingEntitiesResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{orderId}'], [$companyId, $orderId], "/companies/{companyId}/terminalOrders/{orderId}/cancel"); + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } /** - * Get a list of shipping locations + * Create an order * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['name'=> string, 'offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\Management\ShippingLocationsResponse + * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function listShippingLocations(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ShippingLocationsResponse + public function createOrder(string $companyId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/shippingLocations"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocationsResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalOrders"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } /** - * Get a list of terminal models + * Create a shipping location * * @param string $companyId + * @param \Adyen\Model\Management\ShippingLocation $shippingLocation * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalModelsResponse + * @return \Adyen\Model\Management\ShippingLocation * @throws AdyenException */ - public function listTerminalModels(string $companyId, array $requestOptions = null): \Adyen\Model\Management\TerminalModelsResponse + public function createShippingLocation(string $companyId, \Adyen\Model\Management\ShippingLocation $shippingLocation, array $requestOptions = null): \Adyen\Model\Management\ShippingLocation { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalModels"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalModelsResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/shippingLocations"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $shippingLocation->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocation::class); } /** - * Get a list of orders + * Get an order * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['customerOrderReference'=> string, 'status'=> string, 'offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\Management\TerminalOrdersResponse + * @param string $orderId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function listOrders(string $companyId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrdersResponse + public function getOrder(string $companyId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalOrders"); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{orderId}'], [$companyId, $orderId], "/companies/{companyId}/terminalOrders/{orderId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrdersResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } /** - * Get an order + * Get a list of billing entities * * @param string $companyId - * @param string $orderId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalOrder + * @param array|null $requestOptions ['queryParams' => ['name'=> string]] + * @return \Adyen\Model\Management\BillingEntitiesResponse * @throws AdyenException */ - public function getOrder(string $companyId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function listBillingEntities(string $companyId, array $requestOptions = null): \Adyen\Model\Management\BillingEntitiesResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{orderId}'], [$companyId, $orderId], "/companies/{companyId}/terminalOrders/{orderId}"); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/billingEntities"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\BillingEntitiesResponse::class); } /** - * Get a list of terminal products + * Get a list of orders * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['country'=> string, 'terminalModelId'=> string, 'offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\Management\TerminalProductsResponse + * @param array|null $requestOptions ['queryParams' => ['customerOrderReference'=> string, 'status'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\Management\TerminalOrdersResponse * @throws AdyenException */ - public function listTerminalProducts(string $companyId, array $requestOptions = null): \Adyen\Model\Management\TerminalProductsResponse + public function listOrders(string $companyId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrdersResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalProducts"); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalOrders"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalProductsResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrdersResponse::class); } /** - * Update an order + * Get a list of shipping locations * * @param string $companyId - * @param string $orderId - * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalOrder + * @param array|null $requestOptions ['queryParams' => ['name'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\Management\ShippingLocationsResponse * @throws AdyenException */ - public function updateOrder(string $companyId, string $orderId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function listShippingLocations(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ShippingLocationsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{orderId}'], [$companyId, $orderId], "/companies/{companyId}/terminalOrders/{orderId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/shippingLocations"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocationsResponse::class); } /** - * Create a shipping location + * Get a list of terminal models * * @param string $companyId - * @param \Adyen\Model\Management\ShippingLocation $shippingLocation * @param array|null $requestOptions - * @return \Adyen\Model\Management\ShippingLocation + * @return \Adyen\Model\Management\TerminalModelsResponse * @throws AdyenException */ - public function createShippingLocation(string $companyId, \Adyen\Model\Management\ShippingLocation $shippingLocation, array $requestOptions = null): \Adyen\Model\Management\ShippingLocation + public function listTerminalModels(string $companyId, array $requestOptions = null): \Adyen\Model\Management\TerminalModelsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/shippingLocations"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $shippingLocation->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocation::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalModels"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalModelsResponse::class); } /** - * Create an order + * Get a list of terminal products * * @param string $companyId - * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalOrder + * @param array|null $requestOptions ['queryParams' => ['country'=> string, 'terminalModelId'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\Management\TerminalProductsResponse * @throws AdyenException */ - public function createOrder(string $companyId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function listTerminalProducts(string $companyId, array $requestOptions = null): \Adyen\Model\Management\TerminalProductsResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalOrders"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/terminalProducts"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalProductsResponse::class); } /** - * Cancel an order + * Update an order * * @param string $companyId * @param string $orderId + * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest * @param array|null $requestOptions * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function cancelOrder(string $companyId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function updateOrder(string $companyId, string $orderId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{orderId}'], [$companyId, $orderId], "/companies/{companyId}/terminalOrders/{orderId}/cancel"); - $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{orderId}'], [$companyId, $orderId], "/companies/{companyId}/terminalOrders/{orderId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } } diff --git a/src/Adyen/Service/Management/TerminalOrdersMerchantLevelApi.php b/src/Adyen/Service/Management/TerminalOrdersMerchantLevelApi.php index 5bb54189f..40bc63cc9 100644 --- a/src/Adyen/Service/Management/TerminalOrdersMerchantLevelApi.php +++ b/src/Adyen/Service/Management/TerminalOrdersMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,158 +40,158 @@ public function __construct(Client $client) } /** - * Get a list of billing entities + * Cancel an order * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['name'=> string]] - * @return \Adyen\Model\Management\BillingEntitiesResponse + * @param string $orderId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function listBillingEntities(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\BillingEntitiesResponse + public function cancelOrder(string $merchantId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/billingEntities"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\BillingEntitiesResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{orderId}'], [$merchantId, $orderId], "/merchants/{merchantId}/terminalOrders/{orderId}/cancel"); + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } /** - * Get a list of shipping locations + * Create an order * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['name'=> string, 'offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\Management\ShippingLocationsResponse + * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function listShippingLocations(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ShippingLocationsResponse + public function createOrder(string $merchantId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/shippingLocations"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocationsResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalOrders"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } /** - * Get a list of terminal models + * Create a shipping location * * @param string $merchantId + * @param \Adyen\Model\Management\ShippingLocation $shippingLocation * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalModelsResponse + * @return \Adyen\Model\Management\ShippingLocation * @throws AdyenException */ - public function listTerminalModels(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\TerminalModelsResponse + public function createShippingLocation(string $merchantId, \Adyen\Model\Management\ShippingLocation $shippingLocation, array $requestOptions = null): \Adyen\Model\Management\ShippingLocation { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalModels"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalModelsResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/shippingLocations"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $shippingLocation->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocation::class); } /** - * Get a list of orders + * Get an order * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['customerOrderReference'=> string, 'status'=> string, 'offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\Management\TerminalOrdersResponse + * @param string $orderId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function listOrders(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrdersResponse + public function getOrder(string $merchantId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalOrders"); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{orderId}'], [$merchantId, $orderId], "/merchants/{merchantId}/terminalOrders/{orderId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrdersResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } /** - * Get an order + * Get a list of billing entities * * @param string $merchantId - * @param string $orderId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalOrder + * @param array|null $requestOptions ['queryParams' => ['name'=> string]] + * @return \Adyen\Model\Management\BillingEntitiesResponse * @throws AdyenException */ - public function getOrder(string $merchantId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function listBillingEntities(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\BillingEntitiesResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{orderId}'], [$merchantId, $orderId], "/merchants/{merchantId}/terminalOrders/{orderId}"); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/billingEntities"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\BillingEntitiesResponse::class); } /** - * Get a list of terminal products + * Get a list of orders * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['country'=> string, 'terminalModelId'=> string, 'offset'=> int, 'limit'=> int]] - * @return \Adyen\Model\Management\TerminalProductsResponse + * @param array|null $requestOptions ['queryParams' => ['customerOrderReference'=> string, 'status'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\Management\TerminalOrdersResponse * @throws AdyenException */ - public function listTerminalProducts(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\TerminalProductsResponse + public function listOrders(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrdersResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalProducts"); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalOrders"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalProductsResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrdersResponse::class); } /** - * Update an order + * Get a list of shipping locations * * @param string $merchantId - * @param string $orderId - * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalOrder + * @param array|null $requestOptions ['queryParams' => ['name'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\Management\ShippingLocationsResponse * @throws AdyenException */ - public function updateOrder(string $merchantId, string $orderId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function listShippingLocations(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ShippingLocationsResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{orderId}'], [$merchantId, $orderId], "/merchants/{merchantId}/terminalOrders/{orderId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/shippingLocations"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocationsResponse::class); } /** - * Create a shipping location + * Get a list of terminal models * * @param string $merchantId - * @param \Adyen\Model\Management\ShippingLocation $shippingLocation * @param array|null $requestOptions - * @return \Adyen\Model\Management\ShippingLocation + * @return \Adyen\Model\Management\TerminalModelsResponse * @throws AdyenException */ - public function createShippingLocation(string $merchantId, \Adyen\Model\Management\ShippingLocation $shippingLocation, array $requestOptions = null): \Adyen\Model\Management\ShippingLocation + public function listTerminalModels(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\TerminalModelsResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/shippingLocations"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $shippingLocation->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ShippingLocation::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalModels"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalModelsResponse::class); } /** - * Create an order + * Get a list of terminal products * * @param string $merchantId - * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalOrder + * @param array|null $requestOptions ['queryParams' => ['country'=> string, 'terminalModelId'=> string, 'offset'=> int, 'limit'=> int]] + * @return \Adyen\Model\Management\TerminalProductsResponse * @throws AdyenException */ - public function createOrder(string $merchantId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function listTerminalProducts(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\TerminalProductsResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalOrders"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/terminalProducts"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalProductsResponse::class); } /** - * Cancel an order + * Update an order * * @param string $merchantId * @param string $orderId + * @param \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest * @param array|null $requestOptions * @return \Adyen\Model\Management\TerminalOrder * @throws AdyenException */ - public function cancelOrder(string $merchantId, string $orderId, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder + public function updateOrder(string $merchantId, string $orderId, \Adyen\Model\Management\TerminalOrderRequest $terminalOrderRequest, array $requestOptions = null): \Adyen\Model\Management\TerminalOrder { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{orderId}'], [$merchantId, $orderId], "/merchants/{merchantId}/terminalOrders/{orderId}/cancel"); - $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{orderId}'], [$merchantId, $orderId], "/merchants/{merchantId}/terminalOrders/{orderId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $terminalOrderRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalOrder::class); } } diff --git a/src/Adyen/Service/Management/TerminalSettingsCompanyLevelApi.php b/src/Adyen/Service/Management/TerminalSettingsCompanyLevelApi.php index caf1f5b3e..19e08f853 100644 --- a/src/Adyen/Service/Management/TerminalSettingsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/TerminalSettingsCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/TerminalSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/TerminalSettingsMerchantLevelApi.php index 09f58b176..d8b226de0 100644 --- a/src/Adyen/Service/Management/TerminalSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/TerminalSettingsMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/TerminalSettingsStoreLevelApi.php b/src/Adyen/Service/Management/TerminalSettingsStoreLevelApi.php index 155e5225a..536212718 100644 --- a/src/Adyen/Service/Management/TerminalSettingsStoreLevelApi.php +++ b/src/Adyen/Service/Management/TerminalSettingsStoreLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -56,34 +56,34 @@ public function getTerminalLogo(string $merchantId, string $reference, array $re } /** - * Get terminal settings + * Get the terminal logo * - * @param string $merchantId - * @param string $reference - * @param array|null $requestOptions - * @return \Adyen\Model\Management\TerminalSettings + * @param string $storeId + * @param array|null $requestOptions ['queryParams' => ['model'=> string]] + * @return \Adyen\Model\Management\Logo * @throws AdyenException */ - public function getTerminalSettings(string $merchantId, string $reference, array $requestOptions = null): \Adyen\Model\Management\TerminalSettings + public function getTerminalLogoByStoreId(string $storeId, array $requestOptions = null): \Adyen\Model\Management\Logo { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{reference}'], [$merchantId, $reference], "/merchants/{merchantId}/stores/{reference}/terminalSettings"); + $endpoint = $this->baseURL . str_replace(['{storeId}'], [$storeId], "/stores/{storeId}/terminalLogos"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalSettings::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Logo::class); } /** - * Get the terminal logo + * Get terminal settings * - * @param string $storeId - * @param array|null $requestOptions ['queryParams' => ['model'=> string]] - * @return \Adyen\Model\Management\Logo + * @param string $merchantId + * @param string $reference + * @param array|null $requestOptions + * @return \Adyen\Model\Management\TerminalSettings * @throws AdyenException */ - public function getTerminalLogoByStoreId(string $storeId, array $requestOptions = null): \Adyen\Model\Management\Logo + public function getTerminalSettings(string $merchantId, string $reference, array $requestOptions = null): \Adyen\Model\Management\TerminalSettings { - $endpoint = $this->baseURL . str_replace(['{storeId}'], [$storeId], "/stores/{storeId}/terminalLogos"); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{reference}'], [$merchantId, $reference], "/merchants/{merchantId}/stores/{reference}/terminalSettings"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Logo::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalSettings::class); } /** @@ -118,6 +118,22 @@ public function updateTerminalLogo(string $merchantId, string $reference, \Adyen return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Logo::class); } + /** + * Update the terminal logo + * + * @param string $storeId + * @param \Adyen\Model\Management\Logo $logo + * @param array|null $requestOptions ['queryParams' => ['model'=> string]] + * @return \Adyen\Model\Management\Logo + * @throws AdyenException + */ + public function updateTerminalLogoByStoreId(string $storeId, \Adyen\Model\Management\Logo $logo, array $requestOptions = null): \Adyen\Model\Management\Logo + { + $endpoint = $this->baseURL . str_replace(['{storeId}'], [$storeId], "/stores/{storeId}/terminalLogos"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $logo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Logo::class); + } + /** * Update terminal settings * @@ -135,22 +151,6 @@ public function updateTerminalSettings(string $merchantId, string $reference, \A return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TerminalSettings::class); } - /** - * Update the terminal logo - * - * @param string $storeId - * @param \Adyen\Model\Management\Logo $logo - * @param array|null $requestOptions ['queryParams' => ['model'=> string]] - * @return \Adyen\Model\Management\Logo - * @throws AdyenException - */ - public function updateTerminalLogoByStoreId(string $storeId, \Adyen\Model\Management\Logo $logo, array $requestOptions = null): \Adyen\Model\Management\Logo - { - $endpoint = $this->baseURL . str_replace(['{storeId}'], [$storeId], "/stores/{storeId}/terminalLogos"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $logo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Logo::class); - } - /** * Update terminal settings * diff --git a/src/Adyen/Service/Management/TerminalSettingsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalSettingsTerminalLevelApi.php index ee72e7b69..9d6dd5881 100644 --- a/src/Adyen/Service/Management/TerminalSettingsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalSettingsTerminalLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 7a9f17f8a..8b6d78c7f 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -59,12 +59,13 @@ public function listTerminals(array $requestOptions = null): \Adyen\Model\Manage * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Management/UsersCompanyLevelApi.php b/src/Adyen/Service/Management/UsersCompanyLevelApi.php index f8e4ed33b..30896eea8 100644 --- a/src/Adyen/Service/Management/UsersCompanyLevelApi.php +++ b/src/Adyen/Service/Management/UsersCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,18 +40,19 @@ public function __construct(Client $client) } /** - * Get a list of users + * Create a new user * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'username'=> string]] - * @return \Adyen\Model\Management\ListCompanyUsersResponse + * @param \Adyen\Model\Management\CreateCompanyUserRequest $createCompanyUserRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\CreateCompanyUserResponse * @throws AdyenException */ - public function listUsers(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListCompanyUsersResponse + public function createNewUser(string $companyId, \Adyen\Model\Management\CreateCompanyUserRequest $createCompanyUserRequest, array $requestOptions = null): \Adyen\Model\Management\CreateCompanyUserResponse { $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/users"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListCompanyUsersResponse::class); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createCompanyUserRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateCompanyUserResponse::class); } /** @@ -71,35 +72,34 @@ public function getUserDetails(string $companyId, string $userId, array $request } /** - * Update user details + * Get a list of users * * @param string $companyId - * @param string $userId - * @param \Adyen\Model\Management\UpdateCompanyUserRequest $updateCompanyUserRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\CompanyUser + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'username'=> string]] + * @return \Adyen\Model\Management\ListCompanyUsersResponse * @throws AdyenException */ - public function updateUserDetails(string $companyId, string $userId, \Adyen\Model\Management\UpdateCompanyUserRequest $updateCompanyUserRequest, array $requestOptions = null): \Adyen\Model\Management\CompanyUser + public function listUsers(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListCompanyUsersResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{userId}'], [$companyId, $userId], "/companies/{companyId}/users/{userId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateCompanyUserRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CompanyUser::class); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/users"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListCompanyUsersResponse::class); } /** - * Create a new user + * Update user details * * @param string $companyId - * @param \Adyen\Model\Management\CreateCompanyUserRequest $createCompanyUserRequest + * @param string $userId + * @param \Adyen\Model\Management\UpdateCompanyUserRequest $updateCompanyUserRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\CreateCompanyUserResponse + * @return \Adyen\Model\Management\CompanyUser * @throws AdyenException */ - public function createNewUser(string $companyId, \Adyen\Model\Management\CreateCompanyUserRequest $createCompanyUserRequest, array $requestOptions = null): \Adyen\Model\Management\CreateCompanyUserResponse + public function updateUserDetails(string $companyId, string $userId, \Adyen\Model\Management\UpdateCompanyUserRequest $updateCompanyUserRequest, array $requestOptions = null): \Adyen\Model\Management\CompanyUser { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/users"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createCompanyUserRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateCompanyUserResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{userId}'], [$companyId, $userId], "/companies/{companyId}/users/{userId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateCompanyUserRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CompanyUser::class); } } diff --git a/src/Adyen/Service/Management/UsersMerchantLevelApi.php b/src/Adyen/Service/Management/UsersMerchantLevelApi.php index 62f1437b1..ec10a6f75 100644 --- a/src/Adyen/Service/Management/UsersMerchantLevelApi.php +++ b/src/Adyen/Service/Management/UsersMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,18 +40,19 @@ public function __construct(Client $client) } /** - * Get a list of users + * Create a new user * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'username'=> string]] - * @return \Adyen\Model\Management\ListMerchantUsersResponse + * @param \Adyen\Model\Management\CreateMerchantUserRequest $createMerchantUserRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Management\CreateUserResponse * @throws AdyenException */ - public function listUsers(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListMerchantUsersResponse + public function createNewUser(string $merchantId, \Adyen\Model\Management\CreateMerchantUserRequest $createMerchantUserRequest, array $requestOptions = null): \Adyen\Model\Management\CreateUserResponse { $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/users"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListMerchantUsersResponse::class); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createMerchantUserRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateUserResponse::class); } /** @@ -71,35 +72,34 @@ public function getUserDetails(string $merchantId, string $userId, array $reques } /** - * Update a user + * Get a list of users * * @param string $merchantId - * @param string $userId - * @param \Adyen\Model\Management\UpdateMerchantUserRequest $updateMerchantUserRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Management\User + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'username'=> string]] + * @return \Adyen\Model\Management\ListMerchantUsersResponse * @throws AdyenException */ - public function updateUser(string $merchantId, string $userId, \Adyen\Model\Management\UpdateMerchantUserRequest $updateMerchantUserRequest, array $requestOptions = null): \Adyen\Model\Management\User + public function listUsers(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListMerchantUsersResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{userId}'], [$merchantId, $userId], "/merchants/{merchantId}/users/{userId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateMerchantUserRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\User::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/users"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListMerchantUsersResponse::class); } /** - * Create a new user + * Update a user * * @param string $merchantId - * @param \Adyen\Model\Management\CreateMerchantUserRequest $createMerchantUserRequest + * @param string $userId + * @param \Adyen\Model\Management\UpdateMerchantUserRequest $updateMerchantUserRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\CreateUserResponse + * @return \Adyen\Model\Management\User * @throws AdyenException */ - public function createNewUser(string $merchantId, \Adyen\Model\Management\CreateMerchantUserRequest $createMerchantUserRequest, array $requestOptions = null): \Adyen\Model\Management\CreateUserResponse + public function updateUser(string $merchantId, string $userId, \Adyen\Model\Management\UpdateMerchantUserRequest $updateMerchantUserRequest, array $requestOptions = null): \Adyen\Model\Management\User { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/users"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createMerchantUserRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\CreateUserResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{userId}'], [$merchantId, $userId], "/merchants/{merchantId}/users/{userId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateMerchantUserRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\User::class); } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index 467170b45..6caa292a6 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,66 +40,66 @@ public function __construct(Client $client) } /** - * Remove a webhook + * Generate an HMAC key * * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @return \Adyen\Model\Management\GenerateHmacKeyResponse * @throws AdyenException */ - public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) + public function generateHmacKey(string $companyId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\GenerateHmacKeyResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}/generateHmac"); + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateHmacKeyResponse::class); } /** - * List all webhooks + * Get a webhook * * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] - * @return \Adyen\Model\Management\ListWebhooksResponse + * @param string $webhookId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\Webhook * @throws AdyenException */ - public function listAllWebhooks(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListWebhooksResponse + public function getWebhook(string $companyId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\Webhook { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/webhooks"); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListWebhooksResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); } /** - * Get a webhook + * List all webhooks * * @param string $companyId - * @param string $webhookId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\Webhook + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @return \Adyen\Model\Management\ListWebhooksResponse * @throws AdyenException */ - public function getWebhook(string $companyId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\Webhook + public function listAllWebhooks(string $companyId, array $requestOptions = null): \Adyen\Model\Management\ListWebhooksResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/webhooks"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListWebhooksResponse::class); } /** - * Update a webhook + * Remove a webhook * * @param string $companyId * @param string $webhookId - * @param \Adyen\Model\Management\UpdateCompanyWebhookRequest $updateCompanyWebhookRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\Webhook + * @throws AdyenException */ - public function updateWebhook(string $companyId, string $webhookId, \Adyen\Model\Management\UpdateCompanyWebhookRequest $updateCompanyWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\Webhook + public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateCompanyWebhookRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -119,35 +119,36 @@ public function setUpWebhook(string $companyId, \Adyen\Model\Management\CreateCo } /** - * Generate an HMAC key + * Test a webhook * * @param string $companyId * @param string $webhookId + * @param \Adyen\Model\Management\TestCompanyWebhookRequest $testCompanyWebhookRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\GenerateHmacKeyResponse + * @return \Adyen\Model\Management\TestWebhookResponse * @throws AdyenException */ - public function generateHmacKey(string $companyId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\GenerateHmacKeyResponse + public function testWebhook(string $companyId, string $webhookId, \Adyen\Model\Management\TestCompanyWebhookRequest $testCompanyWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\TestWebhookResponse { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}/generateHmac"); - $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateHmacKeyResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}/test"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $testCompanyWebhookRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TestWebhookResponse::class); } /** - * Test a webhook + * Update a webhook * * @param string $companyId * @param string $webhookId - * @param \Adyen\Model\Management\TestCompanyWebhookRequest $testCompanyWebhookRequest + * @param \Adyen\Model\Management\UpdateCompanyWebhookRequest $updateCompanyWebhookRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\TestWebhookResponse + * @return \Adyen\Model\Management\Webhook * @throws AdyenException */ - public function testWebhook(string $companyId, string $webhookId, \Adyen\Model\Management\TestCompanyWebhookRequest $testCompanyWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\TestWebhookResponse + public function updateWebhook(string $companyId, string $webhookId, \Adyen\Model\Management\UpdateCompanyWebhookRequest $updateCompanyWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\Webhook { - $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}/test"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $testCompanyWebhookRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TestWebhookResponse::class); + $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateCompanyWebhookRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); } } diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 97b690bae..7113c9c39 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -40,66 +40,66 @@ public function __construct(Client $client) } /** - * Remove a webhook + * Generate an HMAC key * * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @return \Adyen\Model\Management\GenerateHmacKeyResponse * @throws AdyenException */ - public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) + public function generateHmacKey(string $merchantId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\GenerateHmacKeyResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}/generateHmac"); + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateHmacKeyResponse::class); } /** - * List all webhooks + * Get a webhook * * @param string $merchantId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] - * @return \Adyen\Model\Management\ListWebhooksResponse + * @param string $webhookId + * @param array|null $requestOptions + * @return \Adyen\Model\Management\Webhook * @throws AdyenException */ - public function listAllWebhooks(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListWebhooksResponse + public function getWebhook(string $merchantId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\Webhook { - $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/webhooks"); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListWebhooksResponse::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); } /** - * Get a webhook + * List all webhooks * * @param string $merchantId - * @param string $webhookId - * @param array|null $requestOptions - * @return \Adyen\Model\Management\Webhook + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int]] + * @return \Adyen\Model\Management\ListWebhooksResponse * @throws AdyenException */ - public function getWebhook(string $merchantId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\Webhook + public function listAllWebhooks(string $merchantId, array $requestOptions = null): \Adyen\Model\Management\ListWebhooksResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); + $endpoint = $this->baseURL . str_replace(['{merchantId}'], [$merchantId], "/merchants/{merchantId}/webhooks"); $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\ListWebhooksResponse::class); } /** - * Update a webhook + * Remove a webhook * * @param string $merchantId * @param string $webhookId - * @param \Adyen\Model\Management\UpdateMerchantWebhookRequest $updateMerchantWebhookRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\Webhook + * @throws AdyenException */ - public function updateWebhook(string $merchantId, string $webhookId, \Adyen\Model\Management\UpdateMerchantWebhookRequest $updateMerchantWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\Webhook + public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); - $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateMerchantWebhookRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** @@ -119,35 +119,36 @@ public function setUpWebhook(string $merchantId, \Adyen\Model\Management\CreateM } /** - * Generate an HMAC key + * Test a webhook * * @param string $merchantId * @param string $webhookId + * @param \Adyen\Model\Management\TestWebhookRequest $testWebhookRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\GenerateHmacKeyResponse + * @return \Adyen\Model\Management\TestWebhookResponse * @throws AdyenException */ - public function generateHmacKey(string $merchantId, string $webhookId, array $requestOptions = null): \Adyen\Model\Management\GenerateHmacKeyResponse + public function testWebhook(string $merchantId, string $webhookId, \Adyen\Model\Management\TestWebhookRequest $testWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\TestWebhookResponse { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}/generateHmac"); - $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateHmacKeyResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}/test"); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $testWebhookRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TestWebhookResponse::class); } /** - * Test a webhook + * Update a webhook * * @param string $merchantId * @param string $webhookId - * @param \Adyen\Model\Management\TestWebhookRequest $testWebhookRequest + * @param \Adyen\Model\Management\UpdateMerchantWebhookRequest $updateMerchantWebhookRequest * @param array|null $requestOptions - * @return \Adyen\Model\Management\TestWebhookResponse + * @return \Adyen\Model\Management\Webhook * @throws AdyenException */ - public function testWebhook(string $merchantId, string $webhookId, \Adyen\Model\Management\TestWebhookRequest $testWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\TestWebhookResponse + public function updateWebhook(string $merchantId, string $webhookId, \Adyen\Model\Management\UpdateMerchantWebhookRequest $updateMerchantWebhookRequest, array $requestOptions = null): \Adyen\Model\Management\Webhook { - $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}/test"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $testWebhookRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\TestWebhookResponse::class); + $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); + $response = $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateMerchantWebhookRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\Webhook::class); } } diff --git a/src/Adyen/Service/POSTerminalManagement/GeneralApi.php b/src/Adyen/Service/POSTerminalManagement/GeneralApi.php new file mode 100644 index 000000000..4b7c7aede --- /dev/null +++ b/src/Adyen/Service/POSTerminalManagement/GeneralApi.php @@ -0,0 +1,116 @@ +baseURL = $this->createBaseUrl("https://postfmapi-test.adyen.com/postfmapi/terminal/v1"); + } + + /** + * Assign terminals + * + * @param \Adyen\Model\POSTerminalManagement\AssignTerminalsRequest $assignTerminalsRequest + * @param array|null $requestOptions + * @return \Adyen\Model\POSTerminalManagement\AssignTerminalsResponse + * @throws AdyenException + */ + public function assignTerminals(\Adyen\Model\POSTerminalManagement\AssignTerminalsRequest $assignTerminalsRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\AssignTerminalsResponse + { + $endpoint = $this->baseURL . "/assignTerminals"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $assignTerminalsRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\AssignTerminalsResponse::class); + } + + /** + * Get the account or store of a terminal + * + * @param \Adyen\Model\POSTerminalManagement\FindTerminalRequest $findTerminalRequest + * @param array|null $requestOptions + * @return \Adyen\Model\POSTerminalManagement\FindTerminalResponse + * @throws AdyenException + */ + public function findTerminal(\Adyen\Model\POSTerminalManagement\FindTerminalRequest $findTerminalRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\FindTerminalResponse + { + $endpoint = $this->baseURL . "/findTerminal"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $findTerminalRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\FindTerminalResponse::class); + } + + /** + * Get the stores of an account + * + * @param \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountRequest $getStoresUnderAccountRequest + * @param array|null $requestOptions + * @return \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountResponse + * @throws AdyenException + */ + public function getStoresUnderAccount(\Adyen\Model\POSTerminalManagement\GetStoresUnderAccountRequest $getStoresUnderAccountRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountResponse + { + $endpoint = $this->baseURL . "/getStoresUnderAccount"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getStoresUnderAccountRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\GetStoresUnderAccountResponse::class); + } + + /** + * Get the details of a terminal + * + * @param \Adyen\Model\POSTerminalManagement\GetTerminalDetailsRequest $getTerminalDetailsRequest + * @param array|null $requestOptions + * @return \Adyen\Model\POSTerminalManagement\GetTerminalDetailsResponse + * @throws AdyenException + */ + public function getTerminalDetails(\Adyen\Model\POSTerminalManagement\GetTerminalDetailsRequest $getTerminalDetailsRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\GetTerminalDetailsResponse + { + $endpoint = $this->baseURL . "/getTerminalDetails"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getTerminalDetailsRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\GetTerminalDetailsResponse::class); + } + + /** + * Get the list of terminals + * + * @param \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountRequest $getTerminalsUnderAccountRequest + * @param array|null $requestOptions + * @return \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountResponse + * @throws AdyenException + */ + public function getTerminalsUnderAccount(\Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountRequest $getTerminalsUnderAccountRequest, array $requestOptions = null): \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountResponse + { + $endpoint = $this->baseURL . "/getTerminalsUnderAccount"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $getTerminalsUnderAccountRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\POSTerminalManagement\GetTerminalsUnderAccountResponse::class); + } +} diff --git a/src/Adyen/Service/Payment/ModificationsApi.php b/src/Adyen/Service/Payment/ModificationsApi.php new file mode 100644 index 000000000..ba1de0186 --- /dev/null +++ b/src/Adyen/Service/Payment/ModificationsApi.php @@ -0,0 +1,161 @@ +baseURL = $this->createBaseUrl("https://pal-test.adyen.com/pal/servlet/Payment/v68"); + } + + /** + * Change the authorised amount + * + * @param \Adyen\Model\Payment\AdjustAuthorisationRequest $adjustAuthorisationRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function adjustAuthorisation(\Adyen\Model\Payment\AdjustAuthorisationRequest $adjustAuthorisationRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/adjustAuthorisation"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $adjustAuthorisationRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Cancel an authorisation + * + * @param \Adyen\Model\Payment\CancelRequest $cancelRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function cancel(\Adyen\Model\Payment\CancelRequest $cancelRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/cancel"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $cancelRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Cancel or refund a payment + * + * @param \Adyen\Model\Payment\CancelOrRefundRequest $cancelOrRefundRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function cancelOrRefund(\Adyen\Model\Payment\CancelOrRefundRequest $cancelOrRefundRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/cancelOrRefund"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $cancelOrRefundRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Capture an authorisation + * + * @param \Adyen\Model\Payment\CaptureRequest $captureRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function capture(\Adyen\Model\Payment\CaptureRequest $captureRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/capture"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $captureRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Create a donation + * + * @param \Adyen\Model\Payment\DonationRequest $donationRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function donate(\Adyen\Model\Payment\DonationRequest $donationRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/donate"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $donationRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Refund a captured payment + * + * @param \Adyen\Model\Payment\RefundRequest $refundRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function refund(\Adyen\Model\Payment\RefundRequest $refundRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/refund"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $refundRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Cancel an authorisation using your reference + * + * @param \Adyen\Model\Payment\TechnicalCancelRequest $technicalCancelRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function technicalCancel(\Adyen\Model\Payment\TechnicalCancelRequest $technicalCancelRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/technicalCancel"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $technicalCancelRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } + + /** + * Cancel an in-person refund + * + * @param \Adyen\Model\Payment\VoidPendingRefundRequest $voidPendingRefundRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ModificationResult + * @throws AdyenException + */ + public function voidPendingRefund(\Adyen\Model\Payment\VoidPendingRefundRequest $voidPendingRefundRequest, array $requestOptions = null): \Adyen\Model\Payment\ModificationResult + { + $endpoint = $this->baseURL . "/voidPendingRefund"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $voidPendingRefundRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ModificationResult::class); + } +} diff --git a/src/Adyen/Service/Payment/PaymentsApi.php b/src/Adyen/Service/Payment/PaymentsApi.php new file mode 100644 index 000000000..d4362649d --- /dev/null +++ b/src/Adyen/Service/Payment/PaymentsApi.php @@ -0,0 +1,116 @@ +baseURL = $this->createBaseUrl("https://pal-test.adyen.com/pal/servlet/Payment/v68"); + } + + /** + * Create an authorisation + * + * @param \Adyen\Model\Payment\PaymentRequest $paymentRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\PaymentResult + * @throws AdyenException + */ + public function authorise(\Adyen\Model\Payment\PaymentRequest $paymentRequest, array $requestOptions = null): \Adyen\Model\Payment\PaymentResult + { + $endpoint = $this->baseURL . "/authorise"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\PaymentResult::class); + } + + /** + * Complete a 3DS authorisation + * + * @param \Adyen\Model\Payment\PaymentRequest3d $paymentRequest3d + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\PaymentResult + * @throws AdyenException + */ + public function authorise3d(\Adyen\Model\Payment\PaymentRequest3d $paymentRequest3d, array $requestOptions = null): \Adyen\Model\Payment\PaymentResult + { + $endpoint = $this->baseURL . "/authorise3d"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentRequest3d->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\PaymentResult::class); + } + + /** + * Complete a 3DS2 authorisation + * + * @param \Adyen\Model\Payment\PaymentRequest3ds2 $paymentRequest3ds2 + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\PaymentResult + * @throws AdyenException + */ + public function authorise3ds2(\Adyen\Model\Payment\PaymentRequest3ds2 $paymentRequest3ds2, array $requestOptions = null): \Adyen\Model\Payment\PaymentResult + { + $endpoint = $this->baseURL . "/authorise3ds2"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentRequest3ds2->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\PaymentResult::class); + } + + /** + * Get the 3DS authentication result + * + * @param \Adyen\Model\Payment\AuthenticationResultRequest $authenticationResultRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\AuthenticationResultResponse + * @throws AdyenException + */ + public function getAuthenticationResult(\Adyen\Model\Payment\AuthenticationResultRequest $authenticationResultRequest, array $requestOptions = null): \Adyen\Model\Payment\AuthenticationResultResponse + { + $endpoint = $this->baseURL . "/getAuthenticationResult"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $authenticationResultRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\AuthenticationResultResponse::class); + } + + /** + * Get the 3DS2 authentication result + * + * @param \Adyen\Model\Payment\ThreeDS2ResultRequest $threeDS2ResultRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Payment\ThreeDS2ResultResponse + * @throws AdyenException + */ + public function retrieve3ds2Result(\Adyen\Model\Payment\ThreeDS2ResultRequest $threeDS2ResultRequest, array $requestOptions = null): \Adyen\Model\Payment\ThreeDS2ResultResponse + { + $endpoint = $this->baseURL . "/retrieve3ds2Result"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $threeDS2ResultRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Payment\ThreeDS2ResultResponse::class); + } +} diff --git a/src/Adyen/Service/Payout/InitializationApi.php b/src/Adyen/Service/Payout/InitializationApi.php index 715e2cfa9..9674b5652 100644 --- a/src/Adyen/Service/Payout/InitializationApi.php +++ b/src/Adyen/Service/Payout/InitializationApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Payout/InstantPayoutsApi.php b/src/Adyen/Service/Payout/InstantPayoutsApi.php index 12f68ac36..2342a45ab 100644 --- a/src/Adyen/Service/Payout/InstantPayoutsApi.php +++ b/src/Adyen/Service/Payout/InstantPayoutsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Payout/ReviewingApi.php b/src/Adyen/Service/Payout/ReviewingApi.php index 622e706e7..bcff3dd36 100644 --- a/src/Adyen/Service/Payout/ReviewingApi.php +++ b/src/Adyen/Service/Payout/ReviewingApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 68 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Recurring/GeneralApi.php b/src/Adyen/Service/Recurring/GeneralApi.php new file mode 100644 index 000000000..68b18e390 --- /dev/null +++ b/src/Adyen/Service/Recurring/GeneralApi.php @@ -0,0 +1,131 @@ +baseURL = $this->createBaseUrl("https://pal-test.adyen.com/pal/servlet/Recurring/v68"); + } + + /** + * Create new permits linked to a recurring contract. + * + * @param \Adyen\Model\Recurring\CreatePermitRequest $createPermitRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Recurring\CreatePermitResult + * @throws AdyenException + */ + public function createPermit(\Adyen\Model\Recurring\CreatePermitRequest $createPermitRequest, array $requestOptions = null): \Adyen\Model\Recurring\CreatePermitResult + { + $endpoint = $this->baseURL . "/createPermit"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createPermitRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Recurring\CreatePermitResult::class); + } + + /** + * Disable stored payment details + * + * @param \Adyen\Model\Recurring\DisableRequest $disableRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Recurring\DisableResult + * @throws AdyenException + */ + public function disable(\Adyen\Model\Recurring\DisableRequest $disableRequest, array $requestOptions = null): \Adyen\Model\Recurring\DisableResult + { + $endpoint = $this->baseURL . "/disable"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $disableRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Recurring\DisableResult::class); + } + + /** + * Disable an existing permit. + * + * @param \Adyen\Model\Recurring\DisablePermitRequest $disablePermitRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Recurring\DisablePermitResult + * @throws AdyenException + */ + public function disablePermit(\Adyen\Model\Recurring\DisablePermitRequest $disablePermitRequest, array $requestOptions = null): \Adyen\Model\Recurring\DisablePermitResult + { + $endpoint = $this->baseURL . "/disablePermit"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $disablePermitRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Recurring\DisablePermitResult::class); + } + + /** + * Get stored payment details + * + * @param \Adyen\Model\Recurring\RecurringDetailsRequest $recurringDetailsRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Recurring\RecurringDetailsResult + * @throws AdyenException + */ + public function listRecurringDetails(\Adyen\Model\Recurring\RecurringDetailsRequest $recurringDetailsRequest, array $requestOptions = null): \Adyen\Model\Recurring\RecurringDetailsResult + { + $endpoint = $this->baseURL . "/listRecurringDetails"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $recurringDetailsRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Recurring\RecurringDetailsResult::class); + } + + /** + * Ask issuer to notify the shopper + * + * @param \Adyen\Model\Recurring\NotifyShopperRequest $notifyShopperRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Recurring\NotifyShopperResult + * @throws AdyenException + */ + public function notifyShopper(\Adyen\Model\Recurring\NotifyShopperRequest $notifyShopperRequest, array $requestOptions = null): \Adyen\Model\Recurring\NotifyShopperResult + { + $endpoint = $this->baseURL . "/notifyShopper"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $notifyShopperRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Recurring\NotifyShopperResult::class); + } + + /** + * Schedule running the Account Updater + * + * @param \Adyen\Model\Recurring\ScheduleAccountUpdaterRequest $scheduleAccountUpdaterRequest + * @param array|null $requestOptions + * @return \Adyen\Model\Recurring\ScheduleAccountUpdaterResult + * @throws AdyenException + */ + public function scheduleAccountUpdater(\Adyen\Model\Recurring\ScheduleAccountUpdaterRequest $scheduleAccountUpdaterRequest, array $requestOptions = null): \Adyen\Model\Recurring\ScheduleAccountUpdaterResult + { + $endpoint = $this->baseURL . "/scheduleAccountUpdater"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $scheduleAccountUpdaterRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Recurring\ScheduleAccountUpdaterResult::class); + } +} diff --git a/src/Adyen/Service/StoredValue/GeneralApi.php b/src/Adyen/Service/StoredValue/GeneralApi.php new file mode 100644 index 000000000..694b956e2 --- /dev/null +++ b/src/Adyen/Service/StoredValue/GeneralApi.php @@ -0,0 +1,131 @@ +baseURL = $this->createBaseUrl("https://pal-test.adyen.com/pal/servlet/StoredValue/v46"); + } + + /** + * Changes the status of the payment method. + * + * @param \Adyen\Model\StoredValue\StoredValueStatusChangeRequest $storedValueStatusChangeRequest + * @param array|null $requestOptions + * @return \Adyen\Model\StoredValue\StoredValueStatusChangeResponse + * @throws AdyenException + */ + public function changeStatus(\Adyen\Model\StoredValue\StoredValueStatusChangeRequest $storedValueStatusChangeRequest, array $requestOptions = null): \Adyen\Model\StoredValue\StoredValueStatusChangeResponse + { + $endpoint = $this->baseURL . "/changeStatus"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storedValueStatusChangeRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\StoredValue\StoredValueStatusChangeResponse::class); + } + + /** + * Checks the balance. + * + * @param \Adyen\Model\StoredValue\StoredValueBalanceCheckRequest $storedValueBalanceCheckRequest + * @param array|null $requestOptions + * @return \Adyen\Model\StoredValue\StoredValueBalanceCheckResponse + * @throws AdyenException + */ + public function checkBalance(\Adyen\Model\StoredValue\StoredValueBalanceCheckRequest $storedValueBalanceCheckRequest, array $requestOptions = null): \Adyen\Model\StoredValue\StoredValueBalanceCheckResponse + { + $endpoint = $this->baseURL . "/checkBalance"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storedValueBalanceCheckRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\StoredValue\StoredValueBalanceCheckResponse::class); + } + + /** + * Issues a new card. + * + * @param \Adyen\Model\StoredValue\StoredValueIssueRequest $storedValueIssueRequest + * @param array|null $requestOptions + * @return \Adyen\Model\StoredValue\StoredValueIssueResponse + * @throws AdyenException + */ + public function issue(\Adyen\Model\StoredValue\StoredValueIssueRequest $storedValueIssueRequest, array $requestOptions = null): \Adyen\Model\StoredValue\StoredValueIssueResponse + { + $endpoint = $this->baseURL . "/issue"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storedValueIssueRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\StoredValue\StoredValueIssueResponse::class); + } + + /** + * Loads the payment method. + * + * @param \Adyen\Model\StoredValue\StoredValueLoadRequest $storedValueLoadRequest + * @param array|null $requestOptions + * @return \Adyen\Model\StoredValue\StoredValueLoadResponse + * @throws AdyenException + */ + public function load(\Adyen\Model\StoredValue\StoredValueLoadRequest $storedValueLoadRequest, array $requestOptions = null): \Adyen\Model\StoredValue\StoredValueLoadResponse + { + $endpoint = $this->baseURL . "/load"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storedValueLoadRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\StoredValue\StoredValueLoadResponse::class); + } + + /** + * Merge the balance of two cards. + * + * @param \Adyen\Model\StoredValue\StoredValueBalanceMergeRequest $storedValueBalanceMergeRequest + * @param array|null $requestOptions + * @return \Adyen\Model\StoredValue\StoredValueBalanceMergeResponse + * @throws AdyenException + */ + public function mergeBalance(\Adyen\Model\StoredValue\StoredValueBalanceMergeRequest $storedValueBalanceMergeRequest, array $requestOptions = null): \Adyen\Model\StoredValue\StoredValueBalanceMergeResponse + { + $endpoint = $this->baseURL . "/mergeBalance"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storedValueBalanceMergeRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\StoredValue\StoredValueBalanceMergeResponse::class); + } + + /** + * Voids a transaction. + * + * @param \Adyen\Model\StoredValue\StoredValueVoidRequest $storedValueVoidRequest + * @param array|null $requestOptions + * @return \Adyen\Model\StoredValue\StoredValueVoidResponse + * @throws AdyenException + */ + public function voidTransaction(\Adyen\Model\StoredValue\StoredValueVoidRequest $storedValueVoidRequest, array $requestOptions = null): \Adyen\Model\StoredValue\StoredValueVoidResponse + { + $endpoint = $this->baseURL . "/voidTransaction"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $storedValueVoidRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\StoredValue\StoredValueVoidResponse::class); + } +} diff --git a/src/Adyen/Service/Transfers/CapitalApi.php b/src/Adyen/Service/Transfers/CapitalApi.php index 2285efa0a..ecb1614fe 100644 --- a/src/Adyen/Service/Transfers/CapitalApi.php +++ b/src/Adyen/Service/Transfers/CapitalApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Transfers/TransactionsApi.php b/src/Adyen/Service/Transfers/TransactionsApi.php index 8dd10271b..a09ac4ebe 100644 --- a/src/Adyen/Service/Transfers/TransactionsApi.php +++ b/src/Adyen/Service/Transfers/TransactionsApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/Adyen/Service/Transfers/TransfersApi.php b/src/Adyen/Service/Transfers/TransfersApi.php index 0ca23ccc3..0a46460c5 100644 --- a/src/Adyen/Service/Transfers/TransfersApi.php +++ b/src/Adyen/Service/Transfers/TransfersApi.php @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.4.0 + * OpenAPI Generator version: 6.0.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -39,21 +39,6 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/btl/v4"); } - /** - * Transfer funds - * - * @param \Adyen\Model\Transfers\TransferInfo $transferInfo - * @param array|null $requestOptions - * @return \Adyen\Model\Transfers\Transfer - * @throws AdyenException - */ - public function transferFunds(\Adyen\Model\Transfers\TransferInfo $transferInfo, array $requestOptions = null): \Adyen\Model\Transfers\Transfer - { - $endpoint = $this->baseURL . "/transfers"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transferInfo->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Transfers\Transfer::class); - } - /** * Return a transfer * @@ -69,4 +54,19 @@ public function returnTransfer(string $id, \Adyen\Model\Transfers\ReturnTransfer $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $returnTransferRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Transfers\ReturnTransferResponse::class); } + + /** + * Transfer funds + * + * @param \Adyen\Model\Transfers\TransferInfo $transferInfo + * @param array|null $requestOptions + * @return \Adyen\Model\Transfers\Transfer + * @throws AdyenException + */ + public function transferFunds(\Adyen\Model\Transfers\TransferInfo $transferInfo, array $requestOptions = null): \Adyen\Model\Transfers\Transfer + { + $endpoint = $this->baseURL . "/transfers"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transferInfo->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Transfers\Transfer::class); + } }